2008-09-17 21:43:14 +02:00
|
|
|
#
|
2024-05-28 07:21:21 +02:00
|
|
|
# spec file for package python-setuptools
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
2024-01-02 22:56:22 +01:00
|
|
|
# Copyright (c) 2024 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
|
|
|
%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
|
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
|
|
|
|
%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
|
2023-05-03 16:57:58 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-08-21 15:08:44 +02:00
|
|
|
Name: python-setuptools%{psuffix}
|
2024-05-28 07:21:21 +02:00
|
|
|
Version: 70.0.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
|
2024-01-02 18:38:05 +01:00
|
|
|
# Bootstrap: Don't BuildRequire pip here!
|
|
|
|
BuildRequires: %{python_module base >= 3.9}
|
|
|
|
# The rpm python-wheel build is bootstrap friendly since 0.42
|
|
|
|
BuildRequires: %{python_module wheel >= 0.42}
|
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
|
2024-05-28 07:21:21 +02:00
|
|
|
Requires(postun): update-alternatives
|
2018-03-19 11:57:18 +01:00
|
|
|
BuildArch: noarch
|
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}
|
2023-09-02 21:36:07 +02:00
|
|
|
BuildRequires: %{python_module jaraco.develop >= 7.21}
|
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}
|
2024-05-28 07:21:21 +02:00
|
|
|
BuildRequires: %{python_module pytest-home}
|
|
|
|
BuildRequires: %{python_module pytest-subprocess}
|
2022-11-14 11:33:55 +01:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
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}}
|
2023-05-04 14:50:47 +02:00
|
|
|
BuildRequires: %{python_module setuptools-wheel = %{version}}
|
2022-07-14 10:12:35 +02:00
|
|
|
BuildRequires: %{python_module tomli-w >= 1.0.0}
|
2021-06-26 10:43:14 +02:00
|
|
|
BuildRequires: %{python_module virtualenv >= 13.0.0}
|
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
|
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.
|
|
|
|
|
2024-01-02 18:38:05 +01:00
|
|
|
%package wheel
|
|
|
|
Summary: The setuptools wheel for custom tests and install requirements
|
|
|
|
Requires: %mypython(abi) = %python_version
|
|
|
|
|
|
|
|
%description wheel
|
|
|
|
This packages provides the setuptools wheel as separate file for cases where
|
|
|
|
the wheel needs to be used directly in test or install setups
|
|
|
|
|
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
|
|
|
|
2023-10-16 14:07:54 +02:00
|
|
|
# Remove bundled exes
|
|
|
|
rm -f setuptools/*.exe
|
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%build
|
2024-01-02 18:38:05 +01:00
|
|
|
%if !%{with test}
|
|
|
|
%{python_expand # bootstrap with built-in pip
|
|
|
|
$python -m venv build/env
|
|
|
|
build/env/bin/python -m ensurepip
|
|
|
|
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
|
|
|
|
%{$python_pyproject_wheel}
|
|
|
|
}
|
2020-11-10 13:57:57 +01:00
|
|
|
%endif
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%install
|
2024-01-02 18:38:05 +01:00
|
|
|
%if !%{with test}
|
|
|
|
%{python_expand # use pip bootstrapped above
|
|
|
|
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
|
|
|
|
%{$python_pyproject_install}
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
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}
|
2024-01-02 18:38:05 +01:00
|
|
|
%{python_expand # just use the last one from the expansion, they're all the same
|
|
|
|
mkdir -p dist/
|
|
|
|
cp %{$python_sitelib}/../wheels/setuptools-%{version}-py3-none-any.whl $PWD/dist/
|
|
|
|
}
|
|
|
|
export PRE_BUILT_SETUPTOOLS_WHEEL=$PWD/dist/setuptools-%{version}-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)"
|
2022-10-19 11:33:51 +02:00
|
|
|
# test_pbr_integration tries to install pbr from network using pip
|
|
|
|
donttest+=" or test_pbr_integration"
|
2024-05-28 07:21:21 +02:00
|
|
|
# test_example_file_in_sdist wants wheel.whl
|
|
|
|
donttest+=" or test_example_file_in_sdist"
|
2022-07-16 13:29:01 +02:00
|
|
|
%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
|
2023-09-02 21:36:07 +02:00
|
|
|
%doc NEWS.rst README.rst
|
2013-06-25 11:01:42 +02:00
|
|
|
%{python_sitelib}/setuptools
|
2024-01-02 18:38:05 +01:00
|
|
|
%{python_sitelib}/setuptools-%{version}.dist-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
|
|
|
|
2024-01-02 18:38:05 +01:00
|
|
|
%files %{python_files wheel}
|
2020-11-10 13:57:57 +01:00
|
|
|
%dir %{python_sitelib}/../wheels
|
|
|
|
%{python_sitelib}/../wheels/*
|
|
|
|
%endif
|
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%changelog
|