diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:03:37 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:03:37 +0000 |
commit | 4149e7d5692c825b9dc7a5643d505b7fc38de385 (patch) | |
tree | 876eb9a72c1149ece329ece18868436ef4d19d58 | |
parent | 7844d4b1160e7bb8e455d1e5542dbc3dd3d04ace (diff) |
automatic import of python-pint
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pint.spec | 142 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 144 insertions, 0 deletions
@@ -0,0 +1 @@ +/Pint-0.20.1.tar.gz diff --git a/python-pint.spec b/python-pint.spec new file mode 100644 index 0000000..3a65262 --- /dev/null +++ b/python-pint.spec @@ -0,0 +1,142 @@ +%global _empty_manifest_terminate_build 0 +Name: python-Pint +Version: 0.20.1 +Release: 1 +Summary: Physical quantities module +License: BSD +URL: https://github.com/hgrecco/pint +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f3/d1/56923579866231eb4e61f86f4728ccd84fc2add7ad111ee25e4b64df47ec/Pint-0.20.1.tar.gz +BuildArch: noarch + +Requires: python3-babel +Requires: python3-dask +Requires: python3-numpy +Requires: python3-pint-pandas +Requires: python3-pytest +Requires: python3-pytest-mpl +Requires: python3-pytest-cov +Requires: python3-pytest-subtests +Requires: python3-uncertainties +Requires: python3-xarray + +%description +Pint is a Python package to define, operate and manipulate physical +quantities: the product of a numerical value and a unit of measurement. +It allows arithmetic operations between them and conversions from and +to different units. +It is distributed with a comprehensive list of physical units, prefixes +and constants. Due to its modular design, you can extend (or even rewrite!) +the complete list without changing the source code. It supports a lot of +numpy mathematical operations **without monkey patching or wrapping numpy**. +It has a complete test coverage. It runs in Python 3.8+ with no other dependency. +It is licensed under BSD. +It is extremely easy and natural to use: + >>> import pint + >>> ureg = pint.UnitRegistry() + >>> 3 * ureg.meter + 4 * ureg.cm + <Quantity(3.04, 'meter')> +and you can make good use of numpy if you want: + >>> import numpy as np + >>> [3, 4] * ureg.meter + [4, 3] * ureg.cm + <Quantity([ 3.04 4.03], 'meter')> + >>> np.sum(_) + <Quantity(7.07, 'meter')> + +%package -n python3-Pint +Summary: Physical quantities module +Provides: python-Pint +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-Pint +Pint is a Python package to define, operate and manipulate physical +quantities: the product of a numerical value and a unit of measurement. +It allows arithmetic operations between them and conversions from and +to different units. +It is distributed with a comprehensive list of physical units, prefixes +and constants. Due to its modular design, you can extend (or even rewrite!) +the complete list without changing the source code. It supports a lot of +numpy mathematical operations **without monkey patching or wrapping numpy**. +It has a complete test coverage. It runs in Python 3.8+ with no other dependency. +It is licensed under BSD. +It is extremely easy and natural to use: + >>> import pint + >>> ureg = pint.UnitRegistry() + >>> 3 * ureg.meter + 4 * ureg.cm + <Quantity(3.04, 'meter')> +and you can make good use of numpy if you want: + >>> import numpy as np + >>> [3, 4] * ureg.meter + [4, 3] * ureg.cm + <Quantity([ 3.04 4.03], 'meter')> + >>> np.sum(_) + <Quantity(7.07, 'meter')> + +%package help +Summary: Development documents and examples for Pint +Provides: python3-Pint-doc +%description help +Pint is a Python package to define, operate and manipulate physical +quantities: the product of a numerical value and a unit of measurement. +It allows arithmetic operations between them and conversions from and +to different units. +It is distributed with a comprehensive list of physical units, prefixes +and constants. Due to its modular design, you can extend (or even rewrite!) +the complete list without changing the source code. It supports a lot of +numpy mathematical operations **without monkey patching or wrapping numpy**. +It has a complete test coverage. It runs in Python 3.8+ with no other dependency. +It is licensed under BSD. +It is extremely easy and natural to use: + >>> import pint + >>> ureg = pint.UnitRegistry() + >>> 3 * ureg.meter + 4 * ureg.cm + <Quantity(3.04, 'meter')> +and you can make good use of numpy if you want: + >>> import numpy as np + >>> [3, 4] * ureg.meter + [4, 3] * ureg.cm + <Quantity([ 3.04 4.03], 'meter')> + >>> np.sum(_) + <Quantity(7.07, 'meter')> + +%prep +%autosetup -n Pint-0.20.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-Pint -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.20.1-1 +- Package Spec generated @@ -0,0 +1 @@ +522a8e633e487e92ba54ccbec395947a Pint-0.20.1.tar.gz |