Update to 0.6.0

modernize spec file, adjust python2 requirements
This commit is contained in:
Matthias Runge 2018-01-29 11:01:06 +01:00
parent 5c021fa551
commit eb8f273c59
3 changed files with 21 additions and 48 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/pluggy-0.3.0.tar.gz
/pluggy-0.3.1.tar.gz
/python-pluggy-0.6.0.tar.gz

View File

@ -1,10 +1,5 @@
%global pypiname pluggy
%{!?__python2:%global __python2 %{__python}}
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
%{!?python2_version: %global python2_version %{python_version}}
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%else
@ -12,19 +7,19 @@
%endif
Name: python-pluggy
Version: 0.3.1
Release: 10%{?dist}
Version: 0.6.0
Release: 1%{?dist}
Summary: The plugin manager stripped of pytest specific details
License: MIT
URL: https://github.com/hpk42/pluggy
Source0: http://pypi.python.org/packages/source/p/%{pypiname}/%{pypiname}-%{version}.tar.gz
URL: https://github.com/pytest-dev/pluggy
Source0: https://github.com/pytest-dev/%{pypiname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: pytest
BuildRequires: python-setuptools
BuildRequires: python2-pytest
BuildRequires: python2-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-pytest
@ -53,71 +48,44 @@ The plugin manager stripped of pytest specific details.
%prep
%setup -qc
mv %{pypiname}-%{version} python2
pushd python2
cp -a LICENSE ..
cp -a README.rst ..
rm -rf {pypiname}.egg-info
popd
%if 0%{?with_python3}
cp -a python2 python3
%endif # with python3
%autosetup -n %{pypiname}-%{version}
%build
pushd python2
%{__python2} setup.py build
popd
%py2_build
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py build
popd
%py3_build
%endif # with python3
%install
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%py3_install
%endif # with python3
pushd python2
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
popd
%py2_install
%check
pushd python2
export PYTHONPATH=.:$PYTHONPATH
py.test testing/test_pluggy.py
popd
py.test testing
%if 0%{?with_python3}
pushd python3
py.test-%{python3_version} testing/test_pluggy.py
popd
py.test-%{python3_version} testing
%endif
%files -n python2-%{pypiname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pypiname}.py
%{python2_sitelib}/%{pypiname}.pyc
%{python2_sitelib}/%{pypiname}.pyo
%{python2_sitelib}/%{pypiname}
%{python2_sitelib}/%{pypiname}-%{version}-py%{python2_version}.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypiname}
%{python3_sitelib}/%{pypiname}.py
%{python3_sitelib}/__pycache__/%{pypiname}.cpython-%{python3_version_nodots}*.pyc
%{python3_sitelib}/%{pypiname}
%{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info
%doc README.rst
%license LICENSE
@ -125,6 +93,10 @@ popd
%changelog
* Mon Jan 29 2018 Matthias Runge <mrunge@redhat.com> - 0.6.0-1
- update to 0.6.0
- requirement renames to meet python2 names
* Tue Jan 23 2018 Karsten Hopp <karsten@redhat.com> - 0.3.1-10
- fix conditional

View File

@ -1 +1 @@
ecdd791e309f60668b66fec97c2ee7db pluggy-0.3.1.tar.gz
SHA512 (python-pluggy-0.6.0.tar.gz) = ed8fe81907c7dc476ebfbf0f7e0f902577323d64014765e7d7bfe22c2dc7e4977e1ce7ad55ce7f4e923ae23d206d6c3bcc6663de760c877fce82298cc21079db