|
Fedora Release Engineering |
84201d3 |
%global pypi_name Pint
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%if 0%{?fedora}
|
|
|
3c722e9 |
%global with_python3 1
|
|
|
3c722e9 |
%endif
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
|
|
3c722e9 |
|
|
Fedora Release Engineering |
84201d3 |
Name: python-pint
|
|
Fedora Release Engineering |
84201d3 |
Version: 0.6
|
|
|
16e02af |
Release: 6%{?dist}
|
|
Fedora Release Engineering |
84201d3 |
Summary: Physical quantities module
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
License: BSD
|
|
Fedora Release Engineering |
84201d3 |
URL: https://github.com/hgrecco/pint
|
|
Fedora Release Engineering |
84201d3 |
Source0: https://pypi.python.org/packages/source/P/%{pypi_name}/%{pypi_name}-%{version}.zip
|
|
Fedora Release Engineering |
84201d3 |
BuildArch: noarch
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
3c722e9 |
%description
|
|
|
3c722e9 |
Pint is Python module/package to define, operate and manipulate physical
|
|
|
3c722e9 |
quantities: the product of a numerical value and a unit of measurement.
|
|
|
3c722e9 |
It allows arithmetic operations between them and conversions from and
|
|
|
3c722e9 |
to different units.
|
|
|
3c722e9 |
|
|
|
3c722e9 |
It is distributed with a comprehensive list of physical units, prefixes
|
|
|
3c722e9 |
and constants.
|
|
|
3c722e9 |
|
|
|
c979544 |
%package -n python2-pint
|
|
|
3c722e9 |
Summary: Physical quantities module
|
|
|
c979544 |
Provides: python-pint = %{version}-%{release}
|
|
|
c979544 |
Obsoletes: python-pint < 0.6-4
|
|
|
3c722e9 |
|
|
Fedora Release Engineering |
84201d3 |
BuildRequires: python2-devel
|
|
Fedora Release Engineering |
84201d3 |
BuildRequires: python-sphinx
|
|
Fedora Release Engineering |
84201d3 |
BuildRequires: python-setuptools
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
3c722e9 |
# python_provide does not exist in CBS Cloud buildroot
|
|
|
c979544 |
%{?python_provide:%python_provide python2-pint}
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
c979544 |
%description -n python2-pint
|
|
Fedora Release Engineering |
84201d3 |
Pint is Python module/package to define, operate and manipulate physical
|
|
Fedora Release Engineering |
84201d3 |
quantities: the product of a numerical value and a unit of measurement.
|
|
Fedora Release Engineering |
84201d3 |
It allows arithmetic operations between them and conversions from and
|
|
Fedora Release Engineering |
84201d3 |
to different units.
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
It is distributed with a comprehensive list of physical units, prefixes
|
|
Fedora Release Engineering |
84201d3 |
and constants.
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
c979544 |
%package -n python2-pint-doc
|
|
|
3c722e9 |
Summary: Documentation for the pint module
|
|
|
c979544 |
%{?python_provide:%python_provide python2-pint-doc}
|
|
|
3c722e9 |
# python_provide does not exist in CBS Cloud buildroot
|
|
|
c979544 |
Provides: python-pint-doc = %{version}-%{release}
|
|
|
c979544 |
Obsoletes: python-pint-doc < 0.6-4
|
|
|
3c722e9 |
|
|
|
c979544 |
%description -n python2-pint-doc
|
|
|
3c722e9 |
Documentation for the pint module
|
|
|
3c722e9 |
|
|
|
3c722e9 |
#python3 subpackage
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
c979544 |
%package -n python3-pint
|
|
|
3c722e9 |
Summary: Physical quantities module
|
|
|
c979544 |
%{?python_provide:%python_provide python3-pint}
|
|
|
3c722e9 |
|
|
|
3c722e9 |
BuildRequires: python3-devel
|
|
|
3c722e9 |
BuildRequires: python3-sphinx
|
|
|
3c722e9 |
BuildRequires: python3-setuptools
|
|
|
3c722e9 |
|
|
|
c979544 |
%description -n python3-pint
|
|
|
3c722e9 |
Pint is Python module/package to define, operate and manipulate physical
|
|
|
3c722e9 |
quantities: the product of a numerical value and a unit of measurement.
|
|
|
3c722e9 |
It allows arithmetic operations between them and conversions from and
|
|
|
3c722e9 |
to different units.
|
|
|
3c722e9 |
|
|
|
3c722e9 |
It is distributed with a comprehensive list of physical units, prefixes
|
|
|
3c722e9 |
and constants.
|
|
|
3c722e9 |
%endif
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
c979544 |
%package -n python3-pint-doc
|
|
|
3c722e9 |
Summary: Documentation for the pint module
|
|
|
c979544 |
%{?python_provide:%python_provide python3-pint-doc}
|
|
|
3c722e9 |
BuildRequires: python3-sphinx
|
|
|
3c722e9 |
|
|
|
c979544 |
%description -n python3-pint-doc
|
|
|
3c722e9 |
Documentation for the pint module
|
|
|
3c722e9 |
%endif
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
%prep
|
|
Fedora Release Engineering |
84201d3 |
%setup -q -n %{pypi_name}-%{version}
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
%build
|
|
Fedora Release Engineering |
84201d3 |
%{__python2} setup.py build
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
# generate html docs
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
export PYTHONPATH="$( pwd ):$PYTHONPATH"
|
|
Fedora Release Engineering |
84201d3 |
sphinx-build docs html
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
3c722e9 |
%{__python3} setup.py build
|
|
|
3c722e9 |
export PYTHONPATH="$( pwd ):$PYTHONPATH"
|
|
|
3c722e9 |
sphinx-build-3 docs html
|
|
Fedora Release Engineering |
84201d3 |
# remove the sphinx-build leftovers
|
|
Fedora Release Engineering |
84201d3 |
rm -rf html/.{doctrees,buildinfo}
|
|
|
3c722e9 |
%endif
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
%install
|
|
Fedora Release Engineering |
84201d3 |
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
3c722e9 |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
|
3c722e9 |
%endif
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
%check
|
|
Fedora Release Engineering |
84201d3 |
%{__python2} setup.py test
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
3c722e9 |
%{__python3} setup.py test
|
|
|
3c722e9 |
%endif
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
c979544 |
%files -n python2-pint
|
|
|
3c722e9 |
%doc README
|
|
|
3c722e9 |
%license LICENSE
|
|
Fedora Release Engineering |
84201d3 |
%{python2_sitelib}/pint
|
|
Fedora Release Engineering |
84201d3 |
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
Fedora Release Engineering |
84201d3 |
|
|
|
c979544 |
%files -n python2-pint-doc
|
|
|
3c722e9 |
%doc html
|
|
|
3c722e9 |
%license docs/_themes/LICENSE
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
c979544 |
%files -n python3-pint
|
|
|
3c722e9 |
%doc README
|
|
|
3c722e9 |
%license LICENSE
|
|
|
3c722e9 |
%{python3_sitelib}/pint
|
|
|
3c722e9 |
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
3c722e9 |
%endif
|
|
|
3c722e9 |
|
|
|
3c722e9 |
%if 0%{?with_python3}
|
|
|
c979544 |
%files -n python3-pint-doc
|
|
|
3c722e9 |
%doc html
|
|
|
3c722e9 |
%license docs/_themes/LICENSE
|
|
|
3c722e9 |
%endif
|
|
|
3c722e9 |
|
|
Fedora Release Engineering |
84201d3 |
%changelog
|
|
|
16e02af |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-6
|
|
|
16e02af |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
16e02af |
|
|
|
c979544 |
* Sun Sep 06 2015 Matthias Runge <mrunge@redhat.com> - 0.6-5
|
|
|
c979544 |
- fix uppercase/lowercase naming, fix obsoletes
|
|
|
c979544 |
|
|
|
3c722e9 |
* Fri Sep 04 2015 Chandan Kumar <chkumar246@gmail.com> - 0.6-4
|
|
|
3c722e9 |
- Add python2 and python3 subpackages
|
|
|
3c722e9 |
|
|
|
4811217 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
|
|
|
4811217 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
4811217 |
|
|
Fedora Release Engineering |
84201d3 |
* Mon Dec 15 2014 Matthias Runge <mrunge@redhat.com> - 0.6-2
|
|
Fedora Release Engineering |
84201d3 |
- change BR python-devel to python2-devel (rhbz#1173109)
|
|
Fedora Release Engineering |
84201d3 |
|
|
Fedora Release Engineering |
84201d3 |
* Thu Dec 11 2014 Matthias Runge <mrunge@redhat.com> - 0.6-1
|
|
Fedora Release Engineering |
84201d3 |
- Initial package.
|