forked from pool/python-setuptools
- Make wheel a separate build run to avoid the setuptools/wheel build
cycle. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=202
This commit is contained in:
@@ -24,10 +24,15 @@
|
||||
%bcond_without test
|
||||
%bcond_with wheel
|
||||
%else
|
||||
%if "%{flavor}" == "wheel"
|
||||
%define psuffix -wheel
|
||||
%bcond_without wheel
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%bcond_without wheel
|
||||
%endif
|
||||
%endif
|
||||
%bcond_without python2
|
||||
Name: python-setuptools%{psuffix}
|
||||
Version: 44.1.1
|
||||
@@ -137,21 +142,22 @@ find ./ -type f -name \*.py -exec sed -i \
|
||||
{} \;
|
||||
|
||||
%build
|
||||
%if ! %{with wheel}
|
||||
%python_build
|
||||
%if %{with wheel}
|
||||
%else
|
||||
%python_exec setup.py bdist_wheel --universal
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%if !%{with test} && !%{with wheel}
|
||||
%python_install
|
||||
%prepare_alternative easy_install
|
||||
|
||||
%if %{with wheel}
|
||||
%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%if %{with wheel}
|
||||
%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
|
||||
%endif
|
||||
|
||||
%check
|
||||
@@ -164,7 +170,7 @@ export PYTHONPATH=$(pwd)
|
||||
%pytest -k 'not (test_clean_env_install or test_pip_upgrade_from_source or test_test_command_install_requirements or test_no_missing_dependencies)'
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%if !%{with test} && !%{with wheel}
|
||||
%post
|
||||
%python_install_alternative easy_install
|
||||
|
||||
|
Reference in New Issue
Block a user