Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
python3-setuptools
python3-setuptools.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python3-setuptools.spec of Package python3-setuptools
# # spec file for package python-setuptools # # Copyright (c) 2021 SUSE LLC # # 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. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %bcond_with wheel %else %if "%{flavor}" == "wheel" %define psuffix -wheel %bcond_without wheel %else %define psuffix %{nil} %bcond_with test %bcond_with wheel %endif %endif %bcond_without python2 Name: python3-setuptools%{psuffix} Version: 44.1.1 Release: 0 Summary: Enhancements to distutils for building and distributing Python packages License: MIT URL: https://github.com/pypa/setuptools Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip Source3: testdata.tar.gz Patch0: sort-for-reproducibility.patch Patch1: importlib.patch # PATCH-FIX-UPSTREAM remove_mock.patch bsc#[0-9]+ mcepl@suse.com # we don't need stinking mock Patch2: remove_mock.patch # PATCH-FIX-UPSTREAM CVE-2022-40897-ReDos.patch bsc#1206667 Patch3: CVE-2022-40897-ReDos.patch # PATCH-FIX-UPSTREAM CVE-2024-6345 bsc#1228105 Patch4: CVE-2024-6345-code-execution-via-download-funcs.patch BuildRequires: %{python_module appdirs} BuildRequires: %{python_module ordered-set} BuildRequires: %{python_module packaging} BuildRequires: %{python_module pyparsing >= 2.0.2} BuildRequires: %{python_module six} BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip Requires: python3-appdirs Requires: python3-base Requires: python3-ordered-set Requires: python3-packaging Requires: python3-six Requires: python3-xml Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch # The dependency download feature may require SSL, which is in python3-base and python(2) %ifpython2 Requires: python %endif %if %{with test} BuildRequires: %{python_module Paver} BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest-fixture-config} BuildRequires: %{python_module pytest-virtualenv} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= %{version}} BuildRequires: %{python_module wheel} %if %{with python2} BuildRequires: python-futures %endif %endif %if 0%{?suse_version} || 0%{?fedora_version} >= 24 Recommends: ca-certificates-mozilla %endif %ifpython2 Provides: %{oldpython}-distribute = %{version} Obsoletes: %{oldpython}-distribute < %{version} %endif %if %{with wheel} BuildRequires: %{python_module wheel} %endif %python_subpackages %description setuptools is a collection of enhancements to the Python distutils that allow you to build and distribute Python packages, especially ones that have dependencies on other packages. %prep %setup -q -n setuptools-%{version} tar -xzvf %{SOURCE3} %autopatch -p1 find . -type f -name "*.orig" -delete # fix rpmlint spurious-executable-perm chmod -x README.rst # 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 sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py %if ! %{with wheel} # replace the bundled stuff find ./ -type f -name \*.py -exec sed -i \ -e 's:from setuptools\.extern\.:from :g' \ -e 's:from pkg_resources\.extern\.:from :g' \ -e 's:pkg_resources\.extern\.::g' \ -e 's:setuptools\.extern\.::g' \ {} \; find ./ -type f -name \*.py -exec sed -i \ -e 's:from setuptools\.extern ::g' \ -e 's:from pkg_resources\.extern ::g' \ {} \; find ./ -type f -name \*.py -exec sed -i \ -e 's:from .extern ::g' \ {} \; %endif %build %if ! %{with wheel} %python_build %else %python_exec setup.py bdist_wheel --universal %endif %install %if !%{with test} && !%{with wheel} %python_install %prepare_alternative easy_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %if %{with wheel} %python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl %endif %check %if %{with test} # the 4 skipped test rely on the bundled packages but they are # not available on virtualenv; this is expected behaviour export LANG=en_US.UTF-8 # tests need imports local source dir 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} && !%{with wheel} %post %python_install_alternative easy_install %postun %python_uninstall_alternative easy_install %endif %files %{python_files} %if !%{with test} && !%{with wheel} %license LICENSE %doc CHANGES.rst README.rst %python_alternative %{_bindir}/easy_install %{python_sitelib}/setuptools %{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info %{python_sitelib}/easy_install.py* %pycache_only %{python_sitelib}/__pycache__/easy_install.* %dir %{python_sitelib}/pkg_resources %{python_sitelib}/pkg_resources/* %endif %if %{with wheel} %dir %{python_sitelib}/../wheels %{python_sitelib}/../wheels/* %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor