diff --git a/python-wheel.changes b/python-wheel.changes index e99c0fb..36b4001 100644 --- a/python-wheel.changes +++ b/python-wheel.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Aug 11 14:12:36 UTC 2017 - sebix+novell.com@sebix.at + +- require python-setuptools (fixes boo#1037032) + +------------------------------------------------------------------- +Thu Jul 20 08:20:17 UTC 2017 - sebix+novell.com@sebix.at + +- convert to singlespec + ------------------------------------------------------------------- Mon May 9 22:31:35 UTC 2016 - hpj@urpla.net diff --git a/python-wheel.spec b/python-wheel.spec index a304077..fdc8e5f 100644 --- a/python-wheel.spec +++ b/python-wheel.spec @@ -1,7 +1,7 @@ # # spec file for package python-wheel # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{!?license: %global license %doc} Name: python-wheel Version: 0.29.0 Release: 0 @@ -23,33 +25,32 @@ Summary: A built-package format for Python License: MIT Group: Development/Languages/Python Url: http://bitbucket.org/pypa/wheel/ -Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -# Test requirements: -BuildRequires: python-cov-core >= 1.6 -BuildRequires: python-coverage -BuildRequires: python-jsonschema -BuildRequires: python-keyring -BuildRequires: python-keyrings.alt -BuildRequires: python-pytest -BuildRequires: python-pytest-cov -BuildRequires: python-pyxdg -Recommends: python-ed25519ll +Source: https://files.pythonhosted.org/packages/source/w/wheel/wheel-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +# SECTION test +BuildRequires: %{python_module cov-core >= 1.6} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module jsonschema} +# Not compatible currently, see https://github.com/jaraco/keyrings.alt/issues/20 +#BuildRequires: %%{python_module keyrings.alt} +BuildRequires: %{python_module keyring} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pyxdg} +# /SECTION +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-dirspec +Recommends: python-ed25519ll Recommends: python-keyring Recommends: python-keyrings.alt Recommends: python-pyxdg -Requires(post): update-alternatives -Requires(postun): update-alternatives -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -BuildRequires: python-argparse -Requires: python-argparse -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif + +%{python_subpackages} %description A built-package format for Python. @@ -75,38 +76,34 @@ The reference implementation is at http://bitbucket.org/dholth/wheel/ %prep %setup -q -n wheel-%{version} +sed -i '1s/^#!.*//' wheel/wininst2wheel.py wheel/egg2wheel.py %build -python setup.py build +%{python_build} %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -for b in wheel ; do - mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/$b-%{py_ver} - touch %{buildroot}%{_sysconfdir}/alternatives/$b - ln -sf %{_sysconfdir}/alternatives/$b %{buildroot}/%{_bindir}/$b -done +%{python_install} +%python_clone -a %{buildroot}%{_bindir}/wheel %check -PYTHONPATH=%{buildroot}%{python_sitelib} py.test -rm -rf %{buildroot}%{python_sitelib}/wheel/test/headers.dist +# Requires keyrings.alt +rm wheel/test/test_tool.py +%{python_expand rm -rf _build.python2 _build.python3 +PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} +rm -rf %{buildroot}%{$python_sitelib}/wheel/test/headers.dist +} %post -update-alternatives --install %{_bindir}/wheel wheel %{_bindir}/wheel-%{py_ver} 20 +%python_install_alternative wheel %postun -if [ $1 -eq 0 ] ; then - update-alternatives --remove wheel %{_bindir}/wheel-%{py_ver} -fi +%python_uninstall_alternative wheel -%files -%defattr(-,root,root,-) -%doc CHANGES.txt README.txt LICENSE.txt -%{_bindir}/wheel -%{_bindir}/wheel-%{py_ver} -%ghost %{_sysconfdir}/alternatives/wheel -%{python_sitelib}/wheel-%{version}-py%{py_ver}.egg-info +%files %{python_files} +%doc CHANGES.txt README.txt +%license LICENSE.txt +%python_alternative %{_bindir}/wheel +%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info %{python_sitelib}/wheel/ %changelog