diff --git a/python-setuptools.changes b/python-setuptools.changes index d8ff5d8..f517e8c 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 16 13:58:35 UTC 2019 - Tomáš Chvátal + +- Try to use system packages rather than the vendored variants + ------------------------------------------------------------------- Wed Oct 16 11:55:57 UTC 2019 - Tomáš Chvátal diff --git a/python-setuptools.spec b/python-setuptools.spec index 27cbb11..f57b7a4 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -39,6 +39,7 @@ Patch0: sort-for-reproducibility.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 @@ -59,17 +60,12 @@ 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 Recommends: ca-certificates-mozilla @@ -101,6 +97,21 @@ chmod -x README.rst # replace with nothing sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py +# 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' \ + {} \; + %build %python_build