From cbd548048996b753551520bd9cc02737a91e6e15 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 27 Mar 2023 17:02:30 +0900 Subject: [PATCH] Imported Upstream version 51.1.1 --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ docs/build_meta.rst | 13 +++++-------- docs/userguide/dependency_management.rst | 12 ++++++++---- setup.cfg | 2 +- setuptools/tests/test_virtualenv.py | 4 ++++ 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d156ded..60e7352 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.1.0 +current_version = 51.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index fb5725c..ca76648 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.1.1 +------- + + +Misc +^^^^ +* #2525: Avoid hitting network during test_virtualenv.test_test_command. + + v51.1.0 ------- @@ -371,6 +380,7 @@ v47.2.0 Changes ^^^^^^^ * #2194: Editable-installed entry points now load significantly faster on Python versions 3.8+. +* #1471: Incidentally fixed by #2194 on Python 3.8 or when importlib_metadata is present. v47.1.1 diff --git a/docs/build_meta.rst b/docs/build_meta.rst index c36e2ba..9744488 100644 --- a/docs/build_meta.rst +++ b/docs/build_meta.rst @@ -67,14 +67,11 @@ specify the package information:: [options] packages = find: -Now generate the distribution. Although the PyPA is still working to -`provide a recommended tool `_ -to build packages, the `pep517 package `_ -provides this functionality. To build the package:: - - $ pip install -q pep517 - $ mkdir dist - $ python -m pep517.build . +Now generate the distribution. To build the package, use +`PyPA build `_:: + + $ pip install -q build + $ python -m build And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed and installed:: diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index 354a9f8..0eb2186 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -72,7 +72,7 @@ When your project is installed (e.g. using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed and 2) Any scripts in your project will be installed with wrappers that verify the availability of the specified dependencies at runtime. - + Platform specific dependencies ------------------------------ @@ -202,7 +202,7 @@ Optional dependencies Setuptools allows you to declare dependencies that only get installed under specific circumstances. These dependencies are specified with ``extras_require`` keyword and are only installed if another package depends on it (either -directly or indirectly) This makes it convenient to declare dependencies for +directly or indirectly) This makes it convenient to declare dependencies for ancillary functions such as "tests" and "docs". .. note:: @@ -262,8 +262,12 @@ First is the console_scripts entry point: } ) -When the script ``rst2pdf`` is run, it will trigger the installation of -the two dependencies ``PDF`` maps to. +This syntax indicates that the entry point (in this case a console script) +is only valid when the PDF extra is installed. It is up to the installer +to determine how to handle the situation where PDF was not indicated +(e.g. omit the console script, provide a warning when attempting to load +the entry point, assume the extras are present and let the implementation +fail later). The second use case is that other package can use this "extra" for their own dependencies. For example, if "Project-B" needs "project A" with PDF support diff --git a/setup.cfg b/setup.cfg index 6ef70e2..9d41be1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] license_file = LICENSE name = setuptools -version = 51.1.0 +version = 51.1.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 21dea5b..5a942d8 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -179,6 +179,10 @@ def test_test_command_install_requirements(virtualenv, tmpdir): # Ensure pip/wheel packages are installed. virtualenv.run( "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") + # uninstall setuptools so that 'setup.py develop' works + virtualenv.run("python -m pip uninstall -y setuptools") + # disable index URL so bits and bobs aren't requested from PyPI + virtualenv.env['PIP_NO_INDEX'] = '1' _check_test_command_install_requirements(virtualenv, tmpdir) -- 2.34.1