2008-09-17 21:43:14 +02:00
|
|
|
#
|
2021-06-18 21:35:18 +02:00
|
|
|
# spec file
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
2022-02-07 12:04:33 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2013-07-18 12:09:01 +02:00
|
|
|
|
2018-10-01 09:05:28 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
|
|
|
|
2009-07-30 18:02:49 +02:00
|
|
|
|
2021-06-26 10:43:14 +02:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2019-08-21 15:08:44 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
2020-11-10 13:57:57 +01:00
|
|
|
%bcond_with wheel
|
2022-07-14 10:12:35 +02:00
|
|
|
%endif
|
2020-11-12 17:09:42 +01:00
|
|
|
%if "%{flavor}" == "wheel"
|
|
|
|
%define psuffix -wheel
|
2022-07-14 10:12:35 +02:00
|
|
|
%bcond_with test
|
2020-11-12 17:09:42 +01:00
|
|
|
%bcond_without wheel
|
2022-07-14 10:12:35 +02:00
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == ""
|
2019-08-21 15:08:44 +02:00
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
2020-11-16 15:03:11 +01:00
|
|
|
%bcond_with wheel
|
2019-08-21 15:08:44 +02:00
|
|
|
%endif
|
2022-07-14 10:12:35 +02:00
|
|
|
|
2021-06-18 21:35:18 +02:00
|
|
|
# in order to avoid rewriting for subpackage generator
|
|
|
|
%define mypython python
|
2019-08-21 15:08:44 +02:00
|
|
|
Name: python-setuptools%{psuffix}
|
2022-07-17 00:07:12 +02:00
|
|
|
Version: 63.2.0
|
2011-09-23 09:04:42 +02:00
|
|
|
Release: 0
|
2021-06-26 10:43:14 +02:00
|
|
|
Summary: Download, build, install, upgrade, and uninstall Python packages
|
2022-07-14 10:12:35 +02:00
|
|
|
License: Apache-2.0 AND MIT AND BSD-2-Clause AND Python-2.0
|
2018-05-07 15:48:53 +02:00
|
|
|
URL: https://github.com/pypa/setuptools
|
2021-06-26 10:43:14 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
|
2019-10-16 14:00:39 +02:00
|
|
|
Patch0: sort-for-reproducibility.patch
|
2021-06-26 10:43:14 +02:00
|
|
|
# PATCH-FIX-OPENSUSE remove_mock.patch mcepl@suse.com
|
|
|
|
Patch1: remove_mock.patch
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2017-02-23 14:35:50 +01:00
|
|
|
BuildRequires: fdupes
|
2017-02-17 16:46:38 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2013-07-18 12:09:01 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-06-18 21:35:18 +02:00
|
|
|
Requires(postun):update-alternatives
|
2018-03-19 11:57:18 +01:00
|
|
|
BuildArch: noarch
|
2022-07-14 10:12:35 +02:00
|
|
|
%if %{with wheel}
|
|
|
|
Requires: %mypython(abi) = %python_version
|
|
|
|
%endif
|
2019-08-21 15:08:44 +02:00
|
|
|
%if %{with test}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module build}
|
2019-08-21 15:08:44 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module filelock >= 3.4.0}
|
2022-07-16 13:29:01 +02:00
|
|
|
BuildRequires: %{python_module ini2toml-lite >= 0.9}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module jaraco.envs >= 2.2}
|
2021-06-26 10:43:14 +02:00
|
|
|
BuildRequires: %{python_module jaraco.path >= 3.2.0}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module pip >= 19.1}
|
|
|
|
BuildRequires: %{python_module pip-run >= 8.8}
|
|
|
|
BuildRequires: %{python_module pytest >= 6}
|
2021-06-26 10:43:14 +02:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module setuptools = %{version}}
|
|
|
|
BuildRequires: %{python_module tomli-w >= 1.0.0}
|
2021-06-26 10:43:14 +02:00
|
|
|
BuildRequires: %{python_module virtualenv >= 13.0.0}
|
2019-08-21 15:08:44 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: python3-setuptools-wheel = %{version}
|
2020-03-13 14:17:24 +01:00
|
|
|
%endif
|
2018-03-19 11:57:18 +01:00
|
|
|
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
2017-11-27 10:57:16 +01:00
|
|
|
Recommends: ca-certificates-mozilla
|
2018-02-27 17:52:49 +01:00
|
|
|
%endif
|
2020-11-10 13:57:57 +01:00
|
|
|
%if %{with wheel}
|
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
%endif
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%description
|
2008-09-17 21:43:14 +02:00
|
|
|
setuptools is a collection of enhancements to the Python distutils that
|
2017-11-17 17:46:23 +01:00
|
|
|
allow you to build and distribute Python packages,
|
2008-09-17 21:43:14 +02:00
|
|
|
especially ones that have dependencies on other packages.
|
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%prep
|
2021-06-26 10:43:14 +02:00
|
|
|
%autosetup -p1 -n setuptools-%{version}
|
2016-08-31 17:37:24 +02:00
|
|
|
|
|
|
|
# strip shebangs to fix rpmlint warnings
|
|
|
|
# "explain the sed":
|
|
|
|
# 1 = first line only
|
|
|
|
# s@...@...@ = same as s/.../.../ except with @ instead of /
|
|
|
|
# ^ = start; #!/ = shebang leading characters; .* = rest of line; $ = end
|
|
|
|
# replace with nothing
|
2021-06-26 10:43:14 +02:00
|
|
|
sed -r -i '1s@^#!/.*$@@' pkg_resources/_vendor/appdirs.py
|
2016-08-31 17:37:24 +02:00
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%build
|
2020-11-12 17:09:42 +01:00
|
|
|
%if ! %{with wheel}
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_build
|
2020-11-12 17:09:42 +01:00
|
|
|
%else
|
2020-11-10 13:57:57 +01:00
|
|
|
%python_exec setup.py bdist_wheel --universal
|
|
|
|
%endif
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%install
|
2020-11-12 17:09:42 +01:00
|
|
|
%if !%{with test} && !%{with wheel}
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_install
|
2020-11-12 17:09:42 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2020-11-10 13:57:57 +01:00
|
|
|
%endif
|
|
|
|
|
2020-11-12 17:09:42 +01:00
|
|
|
%if %{with wheel}
|
|
|
|
%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
|
2019-08-21 15:08:44 +02:00
|
|
|
%endif
|
2007-06-13 10:31:39 +02:00
|
|
|
|
2019-08-21 15:08:44 +02:00
|
|
|
%check
|
|
|
|
%if %{with test}
|
2022-07-14 10:12:35 +02:00
|
|
|
export PRE_BUILT_SETUPTOOLS_WHEEL=%{python3_sitelib}/../wheels/setuptools-%{version}-py2.py3-none-any.whl
|
2019-09-16 11:18:31 +02:00
|
|
|
export LANG=en_US.UTF-8
|
2022-07-14 10:12:35 +02:00
|
|
|
# tests need imports from local source dir
|
2020-06-23 18:44:57 +02:00
|
|
|
export PYTHONPATH=$(pwd)
|
2022-07-16 13:29:01 +02:00
|
|
|
# no online comparisons in obs
|
|
|
|
donttest="(test_apply_pyproject_equivalent_to_setupcfg and https)"
|
|
|
|
%pytest -rfE -n auto -k "not ($donttest)"
|
2020-11-16 15:03:11 +01:00
|
|
|
%endif
|
2013-07-18 12:09:01 +02:00
|
|
|
|
2021-06-18 21:35:18 +02:00
|
|
|
%if !%{with test}
|
2017-11-27 10:57:16 +01:00
|
|
|
%files %{python_files}
|
2021-06-18 21:35:18 +02:00
|
|
|
%if !%{with wheel}
|
2020-04-06 19:14:21 +02:00
|
|
|
%license LICENSE
|
2016-07-04 10:17:56 +02:00
|
|
|
%doc CHANGES.rst README.rst
|
2013-06-25 11:01:42 +02:00
|
|
|
%{python_sitelib}/setuptools
|
2022-07-16 13:29:01 +02:00
|
|
|
%{python_sitelib}/setuptools-%{version}*-info
|
2016-02-01 13:01:25 +01:00
|
|
|
%dir %{python_sitelib}/pkg_resources
|
|
|
|
%{python_sitelib}/pkg_resources/*
|
2021-06-26 10:43:14 +02:00
|
|
|
%{python_sitelib}/_distutils_hack
|
|
|
|
%{python_sitelib}/distutils-precedence.pth
|
2019-08-21 15:08:44 +02:00
|
|
|
%endif
|
2006-10-27 14:17:57 +02:00
|
|
|
|
2020-11-10 13:57:57 +01:00
|
|
|
%if %{with wheel}
|
|
|
|
%dir %{python_sitelib}/../wheels
|
|
|
|
%{python_sitelib}/../wheels/*
|
|
|
|
%endif
|
2021-06-18 21:35:18 +02:00
|
|
|
%endif
|
2020-11-10 13:57:57 +01:00
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%changelog
|