Accepting request 902450 from home:bnavigator:branches:devel:languages:python
- Update to 57.0.0 * big changelog since 44.1, see CHANGES.rst. - No python2 support anymore. - Refresh sort-for-reproducibility.patch and remove_mock.patch. - Drop importlib.patch, fixed upstream. - Remove testdata.tar.gz, packaged upstream. - Update requirements. * New Ring-1 dep: python-jaraco.path <-- python-singledispatch OBS-URL: https://build.opensuse.org/request/show/902450 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=216
This commit is contained in:
parent
1ede3fffef
commit
9195e8307b
@ -1,39 +0,0 @@
|
|||||||
Index: setuptools-41.6.0/setuptools/_imp.py
|
|
||||||
===================================================================
|
|
||||||
--- setuptools-41.6.0.orig/setuptools/_imp.py
|
|
||||||
+++ setuptools-41.6.0/setuptools/_imp.py
|
|
||||||
@@ -19,7 +19,10 @@ PY_FROZEN = 7
|
|
||||||
|
|
||||||
def find_module(module, paths=None):
|
|
||||||
"""Just like 'imp.find_module()', but with package support"""
|
|
||||||
- spec = importlib.util.find_spec(module, paths)
|
|
||||||
+ if isinstance(paths, list):
|
|
||||||
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
|
|
||||||
+ else:
|
|
||||||
+ spec = importlib.util.find_spec(module, paths)
|
|
||||||
if spec is None:
|
|
||||||
raise ImportError("Can't find %s" % module)
|
|
||||||
if not spec.has_location and hasattr(spec, 'submodule_search_locations'):
|
|
||||||
@@ -60,14 +63,20 @@ def find_module(module, paths=None):
|
|
||||||
|
|
||||||
|
|
||||||
def get_frozen_object(module, paths=None):
|
|
||||||
- spec = importlib.util.find_spec(module, paths)
|
|
||||||
+ if isinstance(paths, list):
|
|
||||||
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
|
|
||||||
+ else:
|
|
||||||
+ spec = importlib.util.find_spec(module, paths)
|
|
||||||
if not spec:
|
|
||||||
raise ImportError("Can't find %s" % module)
|
|
||||||
return spec.loader.get_code(module)
|
|
||||||
|
|
||||||
|
|
||||||
def get_module(module, paths, info):
|
|
||||||
- spec = importlib.util.find_spec(module, paths)
|
|
||||||
+ if isinstance(paths, list):
|
|
||||||
+ spec = importlib.machinery.PathFinder.find_spec(module, paths)
|
|
||||||
+ else:
|
|
||||||
+ spec = importlib.util.find_spec(module, paths)
|
|
||||||
if not spec:
|
|
||||||
raise ImportError("Can't find %s" % module)
|
|
||||||
return module_from_spec(spec)
|
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 25 12:46:26 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 57.0.0
|
||||||
|
* big changelog since 44.1, see CHANGES.rst.
|
||||||
|
- No python2 support anymore.
|
||||||
|
- Refresh sort-for-reproducibility.patch and remove_mock.patch.
|
||||||
|
- Drop importlib.patch, fixed upstream.
|
||||||
|
- Remove testdata.tar.gz, packaged upstream.
|
||||||
|
- Update requirements.
|
||||||
|
* New Ring-1 dep: python-jaraco.path <-- python-singledispatch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 17 17:03:46 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Thu Jun 17 17:03:46 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%define oldpython python
|
%define skip_python2 1
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%define psuffix -test
|
%define psuffix -test
|
||||||
@ -33,74 +33,63 @@
|
|||||||
%bcond_with wheel
|
%bcond_with wheel
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%bcond_without python2
|
|
||||||
# in order to avoid rewriting for subpackage generator
|
# in order to avoid rewriting for subpackage generator
|
||||||
%define mypython python
|
%define mypython python
|
||||||
Name: python-setuptools%{psuffix}
|
Name: python-setuptools%{psuffix}
|
||||||
Version: 44.1.1
|
Version: 57.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Enhancements to distutils for building and distributing Python packages
|
Summary: Download, build, install, upgrade, and uninstall Python packages
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/pypa/setuptools
|
URL: https://github.com/pypa/setuptools
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip
|
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
|
||||||
Source3: testdata.tar.gz
|
|
||||||
Patch0: sort-for-reproducibility.patch
|
Patch0: sort-for-reproducibility.patch
|
||||||
Patch1: importlib.patch
|
# PATCH-FIX-OPENSUSE remove_mock.patch mcepl@suse.com
|
||||||
# PATCH-FIX-UPSTREAM remove_mock.patch bsc#[0-9]+ mcepl@suse.com
|
Patch1: remove_mock.patch
|
||||||
# we don't need stinking mock
|
BuildRequires: %{python_module appdirs >= 1.4.3}
|
||||||
Patch2: remove_mock.patch
|
BuildRequires: %{python_module more-itertools >= 8.8.0}
|
||||||
BuildRequires: %{python_module appdirs}
|
BuildRequires: %{python_module ordered-set >= 3.1.1}
|
||||||
BuildRequires: %{python_module ordered-set}
|
BuildRequires: %{python_module packaging >= 20.4}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module pyparsing >= 2.2.1}
|
||||||
BuildRequires: %{python_module pyparsing >= 2.0.2}
|
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: %{python_module xml}
|
BuildRequires: %{python_module xml}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
Requires: python-appdirs
|
Requires: python-appdirs >= 1.4.3
|
||||||
Requires: python-base
|
Requires: python-base >= 3.6
|
||||||
Requires: python-ordered-set
|
Requires: python-more-itertools >= 8.8.0
|
||||||
Requires: python-packaging
|
Requires: python-ordered-set >= 3.1.1
|
||||||
Requires: python-six
|
Requires: python-packaging >= 20.4
|
||||||
|
Requires: python-pyparsing >= 2.2.1
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# The dependency download feature may require SSL, which is in python3-base and python(2)
|
|
||||||
%ifpython2
|
|
||||||
Requires: python
|
|
||||||
%endif
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module Paver}
|
BuildRequires: %{python_module Paver}
|
||||||
|
BuildRequires: %{python_module Sphinx}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module jaraco.envs}
|
||||||
|
BuildRequires: %{python_module jaraco.path >= 3.2.0}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest-fixture-config}
|
BuildRequires: %{python_module pytest-fixture-config}
|
||||||
BuildRequires: %{python_module pytest-virtualenv}
|
BuildRequires: %{python_module pytest-virtualenv}
|
||||||
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools >= %{version}}
|
BuildRequires: %{python_module setuptools >= %{version}}
|
||||||
|
BuildRequires: %{python_module virtualenv >= 13.0.0}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python-futures
|
|
||||||
%endif
|
|
||||||
%endif
|
%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
|
||||||
%ifpython2
|
|
||||||
Provides: %{oldpython}-distribute = %{version}
|
|
||||||
Obsoletes: %{oldpython}-distribute < %{version}
|
|
||||||
%endif
|
|
||||||
%if %{with wheel}
|
%if %{with wheel}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
%endif
|
%endif
|
||||||
%if !%{with test} && !%{with wheel}
|
%if !%{with test} && !%{with wheel}
|
||||||
# work around boo#1186870
|
# work around boo#1186870
|
||||||
Provides: %{mypython}%{python_version}dist(setuptools) = %{version}
|
Provides: %{mypython}%{python_version}dist(setuptools) = %{version}
|
||||||
Provides: %{mypython}%{python_version}dist(easy_install) = %{version}
|
|
||||||
Provides: %{mypython}%{python_version}dist(pkg_resources) = %{version}
|
Provides: %{mypython}%{python_version}dist(pkg_resources) = %{version}
|
||||||
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
||||||
Provides: %{mypython}3dist(easy_install) = %{version}
|
|
||||||
Provides: %{mypython}3dist(pkg_resources) = %{version}
|
Provides: %{mypython}3dist(pkg_resources) = %{version}
|
||||||
Provides: %{mypython}3dist(setuptools) = %{version}
|
Provides: %{mypython}3dist(setuptools) = %{version}
|
||||||
%endif
|
%endif
|
||||||
@ -113,15 +102,7 @@ allow you to build and distribute Python packages,
|
|||||||
especially ones that have dependencies on other packages.
|
especially ones that have dependencies on other packages.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n setuptools-%{version}
|
%autosetup -p1 -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
|
# strip shebangs to fix rpmlint warnings
|
||||||
# "explain the sed":
|
# "explain the sed":
|
||||||
@ -129,7 +110,7 @@ chmod -x README.rst
|
|||||||
# s@...@...@ = same as s/.../.../ except with @ instead of /
|
# s@...@...@ = same as s/.../.../ except with @ instead of /
|
||||||
# ^ = start; #!/ = shebang leading characters; .* = rest of line; $ = end
|
# ^ = start; #!/ = shebang leading characters; .* = rest of line; $ = end
|
||||||
# replace with nothing
|
# replace with nothing
|
||||||
sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py
|
sed -r -i '1s@^#!/.*$@@' pkg_resources/_vendor/appdirs.py
|
||||||
|
|
||||||
%if ! %{with wheel}
|
%if ! %{with wheel}
|
||||||
# replace the bundled stuff
|
# replace the bundled stuff
|
||||||
@ -158,8 +139,6 @@ find ./ -type f -name \*.py -exec sed -i \
|
|||||||
%install
|
%install
|
||||||
%if !%{with test} && !%{with wheel}
|
%if !%{with test} && !%{with wheel}
|
||||||
%python_install
|
%python_install
|
||||||
%prepare_alternative easy_install
|
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -171,18 +150,13 @@ find ./ -type f -name \*.py -exec sed -i \
|
|||||||
%if %{with test}
|
%if %{with test}
|
||||||
# the 4 skipped test rely on the bundled packages but they are
|
# the 4 skipped test rely on the bundled packages but they are
|
||||||
# not available on virtualenv; this is expected behaviour
|
# not available on virtualenv; this is expected behaviour
|
||||||
|
donttest="test_clean_env_install or test_pip_upgrade_from_source or test_test_command_install_requirements or test_no_missing_dependencies"
|
||||||
|
# these 3 tests try to download the wheel wheel from PyPI
|
||||||
|
donttest="$donttest or (test_distutils_adoption and (distutils_stdlib or distutils_local))"
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
# tests need imports local source dir
|
# tests need imports local source dir
|
||||||
export PYTHONPATH=$(pwd)
|
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)'
|
%pytest -rfE -n auto -k "not ($donttest)"
|
||||||
%endif
|
|
||||||
|
|
||||||
%if !%{with test} && !%{with wheel}
|
|
||||||
%post
|
|
||||||
%python_install_alternative easy_install
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%python_uninstall_alternative easy_install
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
@ -190,13 +164,12 @@ export PYTHONPATH=$(pwd)
|
|||||||
%if !%{with wheel}
|
%if !%{with wheel}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.rst
|
||||||
%python_alternative %{_bindir}/easy_install
|
|
||||||
%{python_sitelib}/setuptools
|
%{python_sitelib}/setuptools
|
||||||
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
|
%{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
|
%dir %{python_sitelib}/pkg_resources
|
||||||
%{python_sitelib}/pkg_resources/*
|
%{python_sitelib}/pkg_resources/*
|
||||||
|
%{python_sitelib}/_distutils_hack
|
||||||
|
%{python_sitelib}/distutils-precedence.pth
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with wheel}
|
%if %{with wheel}
|
||||||
|
@ -11,17 +11,21 @@
|
|||||||
setuptools/tests/test_upload.py | 5 +----
|
setuptools/tests/test_upload.py | 5 +----
|
||||||
10 files changed, 13 insertions(+), 18 deletions(-)
|
10 files changed, 13 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
--- a/pkg_resources/tests/test_markers.py
|
Index: setuptools-57.0.0/pkg_resources/tests/test_markers.py
|
||||||
+++ b/pkg_resources/tests/test_markers.py
|
===================================================================
|
||||||
|
--- setuptools-57.0.0.orig/pkg_resources/tests/test_markers.py
|
||||||
|
+++ setuptools-57.0.0/pkg_resources/tests/test_markers.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-import mock
|
-import mock
|
||||||
+from . import mock
|
+from . import mock
|
||||||
|
|
||||||
from pkg_resources import evaluate_marker
|
from pkg_resources import evaluate_marker
|
||||||
|
|
||||||
--- a/pkg_resources/tests/test_pkg_resources.py
|
Index: setuptools-57.0.0/pkg_resources/tests/test_pkg_resources.py
|
||||||
+++ b/pkg_resources/tests/test_pkg_resources.py
|
===================================================================
|
||||||
@@ -12,10 +12,7 @@ import stat
|
--- setuptools-57.0.0.orig/pkg_resources/tests/test_pkg_resources.py
|
||||||
|
+++ setuptools-57.0.0/pkg_resources/tests/test_pkg_resources.py
|
||||||
|
@@ -9,10 +9,7 @@ import stat
|
||||||
import distutils.dist
|
import distutils.dist
|
||||||
import distutils.command.install_egg_info
|
import distutils.command.install_egg_info
|
||||||
|
|
||||||
@ -31,23 +35,27 @@
|
|||||||
- import mock
|
- import mock
|
||||||
+from . import mock
|
+from . import mock
|
||||||
|
|
||||||
from pkg_resources import DistInfoDistribution, Distribution, EggInfoDistribution
|
from pkg_resources import (
|
||||||
from setuptools.extern import six
|
DistInfoDistribution, Distribution, EggInfoDistribution,
|
||||||
--- a/setuptools/tests/__init__.py
|
Index: setuptools-57.0.0/setuptools/tests/__init__.py
|
||||||
+++ b/setuptools/tests/__init__.py
|
===================================================================
|
||||||
@@ -4,6 +4,10 @@ import pytest
|
--- setuptools-57.0.0.orig/setuptools/tests/__init__.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/__init__.py
|
||||||
|
@@ -5,6 +5,10 @@ import pytest
|
||||||
|
|
||||||
from setuptools.extern.six import PY2, PY3
|
__all__ = ['fail_on_ascii', 'ack_2to3']
|
||||||
|
|
||||||
+try:
|
+try:
|
||||||
+ import mock
|
+ import mock
|
||||||
+except ImportError:
|
+except ImportError:
|
||||||
+ from unittest import mock
|
+ from unittest import mock
|
||||||
|
|
||||||
__all__ = [
|
is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968'
|
||||||
'fail_on_ascii', 'py2_only', 'py3_only'
|
fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale")
|
||||||
--- a/setuptools/tests/test_build_clib.py
|
Index: setuptools-57.0.0/setuptools/tests/test_build_clib.py
|
||||||
+++ b/setuptools/tests/test_build_clib.py
|
===================================================================
|
||||||
|
--- setuptools-57.0.0.orig/setuptools/tests/test_build_clib.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_build_clib.py
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@ -56,19 +64,23 @@
|
|||||||
from distutils.errors import DistutilsSetupError
|
from distutils.errors import DistutilsSetupError
|
||||||
from setuptools.command.build_clib import build_clib
|
from setuptools.command.build_clib import build_clib
|
||||||
from setuptools.dist import Distribution
|
from setuptools.dist import Distribution
|
||||||
--- a/setuptools/tests/test_easy_install.py
|
Index: setuptools-57.0.0/setuptools/tests/test_easy_install.py
|
||||||
+++ b/setuptools/tests/test_easy_install.py
|
===================================================================
|
||||||
@@ -14,7 +14,7 @@ import itertools
|
--- setuptools-57.0.0.orig/setuptools/tests/test_easy_install.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_easy_install.py
|
||||||
|
@@ -12,7 +12,7 @@ import itertools
|
||||||
import distutils.errors
|
import distutils.errors
|
||||||
import io
|
import io
|
||||||
import zipfile
|
import zipfile
|
||||||
-import mock
|
-import mock
|
||||||
+from . import mock
|
+from . import mock
|
||||||
import time
|
import time
|
||||||
|
import re
|
||||||
from setuptools.extern import six
|
import subprocess
|
||||||
--- a/setuptools/tests/test_msvc.py
|
Index: setuptools-57.0.0/setuptools/tests/test_msvc.py
|
||||||
+++ b/setuptools/tests/test_msvc.py
|
===================================================================
|
||||||
|
--- setuptools-57.0.0.orig/setuptools/tests/test_msvc.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_msvc.py
|
||||||
@@ -5,7 +5,7 @@ Tests for msvc support module.
|
@@ -5,7 +5,7 @@ Tests for msvc support module.
|
||||||
import os
|
import os
|
||||||
import contextlib
|
import contextlib
|
||||||
@ -78,19 +90,23 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
--- a/setuptools/tests/test_packageindex.py
|
Index: setuptools-57.0.0/setuptools/tests/test_packageindex.py
|
||||||
+++ b/setuptools/tests/test_packageindex.py
|
===================================================================
|
||||||
@@ -6,7 +6,7 @@ import distutils.errors
|
--- setuptools-57.0.0.orig/setuptools/tests/test_packageindex.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_packageindex.py
|
||||||
|
@@ -6,7 +6,7 @@ import urllib.request
|
||||||
|
import urllib.error
|
||||||
|
import http.client
|
||||||
|
|
||||||
from setuptools.extern import six
|
|
||||||
from setuptools.extern.six.moves import urllib, http_client
|
|
||||||
-import mock
|
-import mock
|
||||||
+from . import mock
|
+from . import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import pkg_resources
|
import setuptools.package_index
|
||||||
--- a/setuptools/tests/test_register.py
|
Index: setuptools-57.0.0/setuptools/tests/test_register.py
|
||||||
+++ b/setuptools/tests/test_register.py
|
===================================================================
|
||||||
|
--- setuptools-57.0.0.orig/setuptools/tests/test_register.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_register.py
|
||||||
@@ -2,10 +2,7 @@ from setuptools.command.register import
|
@@ -2,10 +2,7 @@ from setuptools.command.register import
|
||||||
from setuptools.dist import Distribution
|
from setuptools.dist import Distribution
|
||||||
from setuptools.errors import RemovedCommandError
|
from setuptools.errors import RemovedCommandError
|
||||||
@ -103,19 +119,20 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
--- a/setuptools/tests/test_test.py
|
Index: setuptools-57.0.0/setuptools/tests/test_test.py
|
||||||
+++ b/setuptools/tests/test_test.py
|
===================================================================
|
||||||
@@ -2,7 +2,7 @@
|
--- setuptools-57.0.0.orig/setuptools/tests/test_test.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_test.py
|
||||||
from __future__ import unicode_literals
|
@@ -1,4 +1,4 @@
|
||||||
|
|
||||||
-import mock
|
-import mock
|
||||||
+from . import mock
|
+from . import mock
|
||||||
from distutils import log
|
from distutils import log
|
||||||
import os
|
import os
|
||||||
|
|
||||||
--- a/setuptools/tests/test_upload.py
|
Index: setuptools-57.0.0/setuptools/tests/test_upload.py
|
||||||
+++ b/setuptools/tests/test_upload.py
|
===================================================================
|
||||||
|
--- setuptools-57.0.0.orig/setuptools/tests/test_upload.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_upload.py
|
||||||
@@ -2,10 +2,7 @@ from setuptools.command.upload import up
|
@@ -2,10 +2,7 @@ from setuptools.command.upload import up
|
||||||
from setuptools.dist import Distribution
|
from setuptools.dist import Distribution
|
||||||
from setuptools.errors import RemovedCommandError
|
from setuptools.errors import RemovedCommandError
|
||||||
@ -128,9 +145,11 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
--- a/setuptools/tests/test_config.py
|
Index: setuptools-57.0.0/setuptools/tests/test_config.py
|
||||||
+++ b/setuptools/tests/test_config.py
|
===================================================================
|
||||||
@@ -5,7 +5,7 @@ import contextlib
|
--- setuptools-57.0.0.orig/setuptools/tests/test_config.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_config.py
|
||||||
|
@@ -7,7 +7,7 @@ import configparser
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from distutils.errors import DistutilsOptionError, DistutilsFileError
|
from distutils.errors import DistutilsOptionError, DistutilsFileError
|
||||||
@ -138,18 +157,20 @@
|
|||||||
+from setuptools.tests import mock
|
+from setuptools.tests import mock
|
||||||
from setuptools.dist import Distribution, _Distribution
|
from setuptools.dist import Distribution, _Distribution
|
||||||
from setuptools.config import ConfigHandler, read_configuration
|
from setuptools.config import ConfigHandler, read_configuration
|
||||||
from setuptools.extern.six.moves import configparser
|
from distutils.core import Command
|
||||||
@@ -880,7 +880,7 @@ class TestExternalSetters:
|
@@ -974,7 +974,7 @@ class TestExternalSetters:
|
||||||
})
|
})
|
||||||
return None
|
return None
|
||||||
|
|
||||||
- @patch.object(_Distribution, '__init__', autospec=True)
|
- @patch.object(_Distribution, '__init__', autospec=True)
|
||||||
+ @mock.patch.object(_Distribution, '__init__', autospec=True)
|
+ @mock.patch.object(_Distribution, '__init__', autospec=True)
|
||||||
def test_external_setters(self, mock_parent_init, tmpdir):
|
def test_external_setters(self, mock_parent_init, tmpdir):
|
||||||
mock_parent_init.side_effect = self._fake_distribution_init
|
mock_parent_init.side_effect = self._fake_distribution_init
|
||||||
|
|
||||||
|
Index: setuptools-57.0.0/pkg_resources/tests/__init__.py
|
||||||
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/pkg_resources/tests/__init__.py
|
+++ setuptools-57.0.0/pkg_resources/tests/__init__.py
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+try:
|
+try:
|
||||||
+ import mock
|
+ import mock
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b
|
|
||||||
size 858770
|
|
3
setuptools-57.0.0.tar.gz
Normal file
3
setuptools-57.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:401cbf33a7bf817d08014d51560fc003b895c4cdc1a5b521ad2969e928a07535
|
||||||
|
size 2144749
|
@ -1,6 +1,8 @@
|
|||||||
--- a/setuptools/command/easy_install.py
|
Index: setuptools-57.0.0/setuptools/command/easy_install.py
|
||||||
+++ b/setuptools/command/easy_install.py
|
===================================================================
|
||||||
@@ -423,7 +423,7 @@ class easy_install(Command):
|
--- setuptools-57.0.0.orig/setuptools/command/easy_install.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/command/easy_install.py
|
||||||
|
@@ -407,7 +407,7 @@ class easy_install(Command):
|
||||||
for spec in self.args:
|
for spec in self.args:
|
||||||
self.easy_install(spec, not self.no_deps)
|
self.easy_install(spec, not self.no_deps)
|
||||||
if self.record:
|
if self.record:
|
||||||
@ -9,20 +11,24 @@
|
|||||||
if self.root: # strip any package prefix
|
if self.root: # strip any package prefix
|
||||||
root_len = len(self.root)
|
root_len = len(self.root)
|
||||||
for counter in range(len(outputs)):
|
for counter in range(len(outputs)):
|
||||||
--- a/setuptools/command/egg_info.py
|
Index: setuptools-57.0.0/setuptools/command/egg_info.py
|
||||||
+++ b/setuptools/command/egg_info.py
|
===================================================================
|
||||||
@@ -638,7 +638,7 @@ def warn_depends_obsolete(cmd, basename,
|
--- setuptools-57.0.0.orig/setuptools/command/egg_info.py
|
||||||
def _write_requirements(stream, reqs):
|
+++ setuptools-57.0.0/setuptools/command/egg_info.py
|
||||||
lines = yield_lines(reqs or ())
|
@@ -654,7 +654,7 @@ def _write_requirements(stream, reqs):
|
||||||
append_cr = lambda line: line + '\n'
|
|
||||||
|
def append_cr(line):
|
||||||
|
return line + '\n'
|
||||||
- lines = map(append_cr, lines)
|
- lines = map(append_cr, lines)
|
||||||
+ lines = map(append_cr, sorted(lines))
|
+ lines = map(append_cr, sorted(lines))
|
||||||
stream.writelines(lines)
|
stream.writelines(lines)
|
||||||
|
|
||||||
|
|
||||||
--- a/setuptools/dist.py
|
Index: setuptools-57.0.0/setuptools/dist.py
|
||||||
+++ b/setuptools/dist.py
|
===================================================================
|
||||||
@@ -195,7 +195,7 @@ def write_pkg_file(self, file):
|
--- setuptools-57.0.0.orig/setuptools/dist.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/dist.py
|
||||||
|
@@ -214,7 +214,7 @@ def write_pkg_file(self, file): # noqa:
|
||||||
self.long_description_content_type
|
self.long_description_content_type
|
||||||
)
|
)
|
||||||
if self.provides_extras:
|
if self.provides_extras:
|
||||||
@ -30,10 +36,12 @@
|
|||||||
+ for extra in sorted(self.provides_extras):
|
+ for extra in sorted(self.provides_extras):
|
||||||
write_field('Provides-Extra', extra)
|
write_field('Provides-Extra', extra)
|
||||||
|
|
||||||
|
self._write_list(file, 'License-File', self.license_files or [])
|
||||||
--- a/setuptools/tests/test_egg_info.py
|
Index: setuptools-57.0.0/setuptools/tests/test_egg_info.py
|
||||||
+++ b/setuptools/tests/test_egg_info.py
|
===================================================================
|
||||||
@@ -291,8 +291,8 @@ class TestEggInfo:
|
--- setuptools-57.0.0.orig/setuptools/tests/test_egg_info.py
|
||||||
|
+++ setuptools-57.0.0/setuptools/tests/test_egg_info.py
|
||||||
|
@@ -297,8 +297,8 @@ class TestEggInfo:
|
||||||
wheel>=0.5
|
wheel>=0.5
|
||||||
pytest
|
pytest
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0b627ac8b927edfbd4154fb31316e700c678017c3b04e6c5452a1ba03eacb00e
|
|
||||||
size 1618
|
|
Loading…
Reference in New Issue
Block a user