forked from pool/python-wheel
Accepting request 710332 from devel:languages:python
- Switch to mulitbuild to avoid dep on pytest by default (As pytest needs wheel to build itself) - Reduce build requires and recommends to what is really needed (hint: almost nothing) OBS-URL: https://build.opensuse.org/request/show/710332 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=20
This commit is contained in:
commit
6059a61046
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 17 10:35:46 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Switch to mulitbuild to avoid dep on pytest by default
|
||||||
|
(As pytest needs wheel to build itself)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 14 08:59:02 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Reduce build requires and recommends to what is really needed
|
||||||
|
(hint: almost nothing)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 15 20:46:24 UTC 2019 - Jonathan Harker <jharker@suse.com>
|
Wed May 15 20:46:24 UTC 2019 - Jonathan Harker <jharker@suse.com>
|
||||||
|
|
||||||
|
@ -17,7 +17,15 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-wheel
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
Name: python-wheel%{psuffix}
|
||||||
Version: 0.33.4
|
Version: 0.33.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A built-package format for Python
|
Summary: A built-package format for Python
|
||||||
@ -31,19 +39,11 @@ BuildRequires: python-rpm-macros
|
|||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Recommends: python-dirspec
|
|
||||||
Recommends: python-ed25519ll
|
|
||||||
Recommends: python-keyring
|
|
||||||
Recommends: python-keyrings.alt
|
|
||||||
Recommends: python-pyxdg
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test
|
%if %{with test}
|
||||||
# Not compatible currently, see https://github.com/jaraco/keyrings.alt/issues/20
|
BuildRequires: %{python_module pytest >= 3.0.0}
|
||||||
#BuildRequires: %%{python_module keyrings.alt}
|
BuildRequires: %{python_module wheel >= %{version}}
|
||||||
BuildRequires: %{python_module keyring}
|
%endif
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
BuildRequires: %{python_module pyxdg}
|
|
||||||
# /SECTION
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -57,39 +57,29 @@ step (simply extracting the file onto sys.path), and the unpacked archive
|
|||||||
preserves enough information to "Spread" (copy data and scripts to their
|
preserves enough information to "Spread" (copy data and scripts to their
|
||||||
final locations) at any later time.
|
final locations) at any later time.
|
||||||
|
|
||||||
The wheel project provides a bdist_wheel command for setuptools
|
|
||||||
(requires distribute >= 0.6.34). Wheel files can be
|
|
||||||
installed with a newer pip from https://github.com/pypa/pip
|
|
||||||
or with wheel's own command line utility.
|
|
||||||
|
|
||||||
The wheel documentation is at http://wheel.rtfd.org/. The
|
|
||||||
file format is documented in PEP 427
|
|
||||||
(http://www.python.org/dev/peps/pep-0427/).
|
|
||||||
|
|
||||||
The reference implementation is at http://bitbucket.org/dholth/wheel/
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n wheel-%{version}
|
%setup -q -n wheel-%{version}
|
||||||
# Remove addopts as it requires pytest-cov. The reported coverage is not
|
# Remove addopts as it requires pytest-cov
|
||||||
# nearly near 100%, and setup.cfg doesnt provide a minimum acceptable
|
|
||||||
# coverage percentage, so coverage is not a metric which can be used
|
|
||||||
# by automated QA to determine acceptance of the package.
|
|
||||||
sed -i '/addopts = /d' setup.cfg
|
sed -i '/addopts = /d' setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/wheel
|
%python_clone -a %{buildroot}%{_bindir}/wheel
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
export LC_ALL=en_US.utf8
|
export LC_ALL=en_US.utf8
|
||||||
%{python_expand rm -rf _build.python2 _build.python3
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version}
|
%pytest
|
||||||
rm -rf %{buildroot}%{$python_sitelib}/wheel/test/headers.dist}
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative wheel
|
%python_install_alternative wheel
|
||||||
|
|
||||||
@ -102,5 +92,6 @@ rm -rf %{buildroot}%{$python_sitelib}/wheel/test/headers.dist}
|
|||||||
%python_alternative %{_bindir}/wheel
|
%python_alternative %{_bindir}/wheel
|
||||||
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
|
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
|
||||||
%{python_sitelib}/wheel/
|
%{python_sitelib}/wheel/
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user