python-setuptools_scm/python-setuptools_scm.spec

119 lines
3.4 KiB
RPMSpec
Raw Normal View History

2016-01-04 17:31:29 +00:00
%{!?python3_pkgversion:%global python3_pkgversion 3}
# EL7 does not have a new enough python-setuptools
%if 0%{?rhel} && 0%{?rhel} <= 7
%global with_python2 0
%else
%global with_python2 1
%endif
2015-10-21 15:13:26 +00:00
%global srcname setuptools_scm
%global sum The blessed package to manage your versions by scm tags
Name: python-%{srcname}
2016-10-10 15:55:18 +00:00
Version: 1.13.0
Release: 1%{?dist}
2015-10-21 15:13:26 +00:00
Summary: %{sum}
License: MIT
2016-10-10 15:55:18 +00:00
URL: https://pypi.python.org/pypi/%{srcname}
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
2015-10-21 15:13:26 +00:00
BuildArch: noarch
2016-01-04 17:31:29 +00:00
BuildRequires: python2-devel
BuildRequires: python%{python3_pkgversion}-devel
2015-10-21 15:13:26 +00:00
BuildRequires: pytest
2016-01-04 17:31:29 +00:00
BuildRequires: python%{python3_pkgversion}-pytest
2015-10-21 15:13:26 +00:00
# For tests
BuildRequires: git-core
BuildRequires: mercurial
%description
Setuptools_scm handles managing your python package versions in scm metadata.
It also handles file finders for the suppertes scms.
%package -n python2-%{srcname}
Summary: %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
Setuptools_scm handles managing your python package versions in scm metadata.
It also handles file finders for the suppertes scms.
2016-01-04 17:31:29 +00:00
%package -n python%{python3_pkgversion}-%{srcname}
2015-10-21 15:13:26 +00:00
Summary: %{sum}
2016-01-04 17:31:29 +00:00
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
2015-10-21 15:13:26 +00:00
2016-01-04 17:31:29 +00:00
%description -n python%{python3_pkgversion}-%{srcname}
2015-10-21 15:13:26 +00:00
Setuptools_scm handles managing your python package versions in scm metadata.
It also handles file finders for the suppertes scms.
%prep
%autosetup -n %{srcname}-%{version}
%build
%if 0%{?with_python2}
2015-10-21 15:13:26 +00:00
%py2_build
%endif
2015-10-21 15:13:26 +00:00
%py3_build
%install
%if 0%{?with_python2}
2015-10-21 15:13:26 +00:00
%py2_install
%endif
2015-10-21 15:13:26 +00:00
%py3_install
%check
%if 0%{?with_python2}
2015-10-21 15:13:26 +00:00
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv
%endif
2015-10-21 15:13:26 +00:00
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv
# Cleanup stray .pyc files from running python in python3 tests
rm %{buildroot}%{python3_sitelib}/%{srcname}/*.pyc
%if 0%{?with_python2}
2015-10-21 15:13:26 +00:00
%files -n python2-%{srcname}
%license LICENSE
%doc CHANGELOG.rst README.rst
%{python2_sitelib}/*
%endif
2015-10-21 15:13:26 +00:00
2016-01-04 17:31:29 +00:00
%files -n python%{python3_pkgversion}-%{srcname}
2015-10-21 15:13:26 +00:00
%license LICENSE
%doc CHANGELOG.rst README.rst
%{python3_sitelib}/*
%changelog
2016-10-10 15:55:18 +00:00
* Mon Oct 10 2016 Parag Nemade <pnemade AT redhat DOT com> - 1.13.0-1
- Update to 1.13.0
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.1-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jan 4 2016 Orion Poplawski <orion@cora.nwra.com> - 1.10.1-2
- No python2 package on EPEL (setuptools too old)
2015-12-17 17:29:04 +00:00
* Thu Dec 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.10.1-1
- Update to 1.10.1
2015-12-02 16:46:25 +00:00
* Wed Dec 2 2015 Orion Poplawski <orion@cora.nwra.com> - 1.9.0-1
- Update to 1.9.0
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2015-10-21 15:13:26 +00:00
* Mon Oct 19 2015 Orion Poplawski <orion@cora.nwra.com> - 1.8.0-2
- Cleanup stray .pyc files from tests
* Sat Sep 19 2015 Orion Poplawski <orion@cora.nwra.com> - 1.8.0-1
- Update to 1.8.0
- Fix license tag
* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 1.7.0-1
- Initial package