forked from pool/python-setuptools
- Switch to multibuild to enable testsuite
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=175
This commit is contained in:
committed by
Git OBS Bridge
parent
91b3263796
commit
0577003532
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 21 12:40:01 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Switch to multibuild to enable testsuite
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 21 12:12:39 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Wed Aug 21 12:12:39 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@@ -18,7 +18,15 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
Name: python-setuptools
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
Name: python-setuptools%{psuffix}
|
||||||
Version: 41.2.0
|
Version: 41.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Enhancements to distutils for building and distributing Python packages
|
Summary: Enhancements to distutils for building and distributing Python packages
|
||||||
@@ -35,8 +43,6 @@ BuildRequires: %{python_module xml}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
#!BuildIgnore: python2-pyparsing
|
|
||||||
#!BuildIgnore: python3-pyparsing
|
|
||||||
# needed for SLE
|
# needed for SLE
|
||||||
Requires: python
|
Requires: python
|
||||||
Requires: python-appdirs
|
Requires: python-appdirs
|
||||||
@@ -46,11 +52,26 @@ Requires: python-xml
|
|||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module Paver}
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module mock}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pyparsing >= 2.0.2}
|
||||||
|
BuildRequires: %{python_module pytest-fixture-config}
|
||||||
|
BuildRequires: %{python_module pytest-virtualenv}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module setuptools >= %{version}}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: python-futures
|
||||||
|
%else
|
||||||
|
#!BuildIgnore: python-pyparsing
|
||||||
|
#!BuildIgnore: python2-pyparsing
|
||||||
|
#!BuildIgnore: python3-pyparsing
|
||||||
|
%endif
|
||||||
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
||||||
Recommends: ca-certificates-mozilla
|
Recommends: ca-certificates-mozilla
|
||||||
%endif
|
%endif
|
||||||
# NOTE(saschpe): Distribute was merged into 0.7.x, so even though distribute
|
|
||||||
# obsoletes setuptools < 0.6.45, current setuptools obsoletes distribute again
|
|
||||||
%ifpython2
|
%ifpython2
|
||||||
Provides: %{oldpython}-distribute = %{version}
|
Provides: %{oldpython}-distribute = %{version}
|
||||||
Obsoletes: %{oldpython}-distribute < %{version}
|
Obsoletes: %{oldpython}-distribute < %{version}
|
||||||
@@ -81,15 +102,18 @@ sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py
|
|||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%prepare_alternative easy_install
|
%prepare_alternative easy_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
# Can not run testsuite as this introduces build cycle
|
%check
|
||||||
#%%check
|
%if %{with test}
|
||||||
#export LANG="en_US.UTF-8"
|
%pytest
|
||||||
#python setup.py ptr --addopts='-rxs'
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative easy_install
|
%python_install_alternative easy_install
|
||||||
|
|
||||||
@@ -105,5 +129,6 @@ sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py
|
|||||||
%pycache_only %{python_sitelib}/__pycache__/easy_install.*
|
%pycache_only %{python_sitelib}/__pycache__/easy_install.*
|
||||||
%dir %{python_sitelib}/pkg_resources
|
%dir %{python_sitelib}/pkg_resources
|
||||||
%{python_sitelib}/pkg_resources/*
|
%{python_sitelib}/pkg_resources/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user