83 lines
2.3 KiB
RPMSpec
83 lines
2.3 KiB
RPMSpec
|
%global srcname setuptools_scm
|
||
|
%global sum The blessed package to manage your versions by scm tags
|
||
|
|
||
|
Name: python-%{srcname}
|
||
|
Version: 1.8.0
|
||
|
Release: 2%{?dist}
|
||
|
Summary: %{sum}
|
||
|
|
||
|
License: MIT
|
||
|
URL: http://pypi.python.org/pypi/%{srcname}
|
||
|
Source0: http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.bz2
|
||
|
|
||
|
BuildArch: noarch
|
||
|
BuildRequires: python2-devel python3-devel
|
||
|
BuildRequires: pytest
|
||
|
BuildRequires: python3-pytest
|
||
|
# 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.
|
||
|
|
||
|
|
||
|
%package -n python3-%{srcname}
|
||
|
Summary: %{sum}
|
||
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||
|
|
||
|
%description -n python3-%{srcname}
|
||
|
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
|
||
|
%py2_build
|
||
|
%py3_build
|
||
|
|
||
|
%install
|
||
|
# Must do the python2 install first because the scripts in /usr/bin are
|
||
|
# overwritten with every setup.py install, and in general we want the
|
||
|
# python3 version to be the default.
|
||
|
%py2_install
|
||
|
%py3_install
|
||
|
|
||
|
%check
|
||
|
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv
|
||
|
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
|
||
|
|
||
|
%files -n python2-%{srcname}
|
||
|
%license LICENSE
|
||
|
%doc CHANGELOG.rst README.rst
|
||
|
%{python2_sitelib}/*
|
||
|
|
||
|
%files -n python3-%{srcname}
|
||
|
%license LICENSE
|
||
|
%doc CHANGELOG.rst README.rst
|
||
|
%{python3_sitelib}/*
|
||
|
|
||
|
%changelog
|
||
|
* 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
|