From a76a548d0f25947d2594d36b784d029a6ada977f Mon Sep 17 00:00:00 2001 From: Alan Fregtman <941331+darkvertex@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:55:08 -0400 Subject: .editorconfig: Set max_line_length to 88 for Python files. --- .editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.editorconfig b/.editorconfig index 6385b573..b8aeea17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,7 @@ end_of_line = lf [*.py] indent_style = space +max_line_length = 88 [*.{yml,yaml}] indent_style = space -- cgit v1.2.1 From 8ea55f2fb26bd77997f0e9435bab2d41376a76d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 17 Sep 2021 21:23:38 -0400 Subject: Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51. --- docs/conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index f65d1faa..4ae74093 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,3 +27,10 @@ link_files = { # Be strict about any broken references: nitpicky = True + +# Include Python intersphinx mapping to prevent failures +# jaraco/skeleton#51 +extensions += ['sphinx.ext.intersphinx'] +intersphinx_mapping = { + 'python': ('https://docs.python.org/3', None), +} -- cgit v1.2.1 From 987edfa3265187a47b8688119943e7d96712d859 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 21 Sep 2021 13:45:50 -0700 Subject: Fix PyPy3.8 install locations --- distutils/command/install.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/distutils/command/install.py b/distutils/command/install.py index 866e2d59..e98f0491 100644 --- a/distutils/command/install.py +++ b/distutils/command/install.py @@ -29,16 +29,16 @@ WINDOWS_SCHEME = { INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', + 'purelib': '$base/lib/$implementation_lower$py_version_short/site-packages', + 'platlib': '$platbase/$platlibdir/$implementation_lower$py_version_short/site-packages', + 'headers': '$base/include/$implementation_lower$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, 'unix_home': { - 'purelib': '$base/lib/python', - 'platlib': '$base/$platlibdir/python', - 'headers': '$base/include/python/$dist_name', + 'purelib': '$base/lib/$implementation_lower', + 'platlib': '$base/$platlibdir/$implementation_lower', + 'headers': '$base/include/$implementation_lower/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, @@ -64,8 +64,8 @@ if HAS_USER_SITE: INSTALL_SCHEMES['nt_user'] = { 'purelib': '$usersite', 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Python$py_version_nodot/Scripts', + 'headers': '$userbase/$implementation$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/$implementation$py_version_nodot/Scripts', 'data' : '$userbase', } @@ -73,7 +73,7 @@ if HAS_USER_SITE: 'purelib': '$usersite', 'platlib': '$usersite', 'headers': - '$userbase/include/python$py_version_short$abiflags/$dist_name', + '$userbase/include/$implementation_lower$py_version_short$abiflags/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', } @@ -83,6 +83,12 @@ if HAS_USER_SITE: # and to SCHEME_KEYS here. SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') +def _get_implementation(): + if hasattr(sys, 'pypy_version_info'): + return 'PyPy' + else: + return 'Python' + class install(Command): @@ -313,6 +319,8 @@ class install(Command): 'exec_prefix': exec_prefix, 'abiflags': abiflags, 'platlibdir': getattr(sys, 'platlibdir', 'lib'), + 'implementation_lower': _get_implementation().lower(), + 'implementation': _get_implementation(), } if HAS_USER_SITE: -- cgit v1.2.1 From dc43378c8accd85321b42e3fe69fcb87e5266006 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Oct 2021 22:45:21 -0400 Subject: Test on Python 3.10 (final). --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d6b455b..6aad7f11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,8 +9,11 @@ jobs: python: - 3.6 - 3.9 - - 3.10.0-alpha - 3.10.99 - platform: [ubuntu-latest, macos-latest, windows-latest] + - "3.10" + platform: + - ubuntu-latest + - macos-latest + - windows-latest runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -34,7 +37,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.10" - name: Install tox run: | python -m pip install tox -- cgit v1.2.1 From 5823e9ca9d242b733a5ff3c8e2c22e13ec0a4c01 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Oct 2021 19:52:04 -0400 Subject: Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178. --- pytest.ini | 2 -- setup.cfg | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pytest.ini b/pytest.ini index 31b114fd..9ecdba49 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,8 +2,6 @@ norecursedirs=dist build .tox .eggs addopts=--doctest-modules doctest_optionflags=ALLOW_UNICODE ELLIPSIS -# workaround for warning pytest-dev/pytest#6178 -junit_family=xunit2 filterwarnings= # Suppress deprecation warning in flake8 ignore:SelectableGroups dict interface is deprecated::flake8 diff --git a/setup.cfg b/setup.cfg index 69eb0ee6..0f7d652d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ exclude = [options.extras_require] testing = # upstream - pytest >= 4.6 + pytest >= 6 pytest-checkdocs >= 2.4 pytest-flake8 pytest-black >= 0.3.7; \ -- cgit v1.2.1 From 18b997db3e74d179af12175bff3d1a37006017fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 13:16:50 -0400 Subject: Emit a SetuptoolsDeprecationWarning when setup_requires is used. Ref #2823. --- changelog.d/2823.change.rst | 1 + pytest.ini | 25 ++++++++++++++----------- setuptools/__init__.py | 6 ++++++ 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 changelog.d/2823.change.rst diff --git a/changelog.d/2823.change.rst b/changelog.d/2823.change.rst new file mode 100644 index 00000000..69db4c0d --- /dev/null +++ b/changelog.d/2823.change.rst @@ -0,0 +1 @@ +Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption. diff --git a/pytest.ini b/pytest.ini index eebb212f..f81b6cfb 100644 --- a/pytest.ini +++ b/pytest.ini @@ -8,21 +8,24 @@ doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 filterwarnings= - # Fail on warnings - error + # Fail on warnings + error - ## upstream + ## upstream # Suppress deprecation warning in flake8 ignore:SelectableGroups dict interface is deprecated::flake8 # Suppress deprecation warning in pypa/packaging#433 ignore:The distutils package is deprecated::packaging.tags ## end upstream - # https://github.com/pypa/setuptools/issues/1823 - ignore:bdist_wininst command is deprecated - # Suppress this error; unimportant for CI tests - ignore:Extraction path is writable by group/others:UserWarning - # Suppress weird RuntimeWarning. - ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning - # Suppress use of bytes for filenames on Windows until fixed #2016 - ignore:The Windows bytes API has been deprecated:DeprecationWarning + # https://github.com/pypa/setuptools/issues/1823 + ignore:bdist_wininst command is deprecated + # Suppress this error; unimportant for CI tests + ignore:Extraction path is writable by group/others:UserWarning + # Suppress weird RuntimeWarning. + ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning + # Suppress use of bytes for filenames on Windows until fixed #2016 + ignore:The Windows bytes API has been deprecated:DeprecationWarning + + # https://github.com/pypa/setuptools/issues/2823 + ignore:setup_requires is deprecated. diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9d6f0bc0..a623262e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -4,6 +4,7 @@ from fnmatch import fnmatchcase import functools import os import re +import warnings import _distutils_hack.override # noqa: F401 @@ -144,6 +145,11 @@ def _install_setup_requires(attrs): # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: + warnings.warn( + "setup_requires is deprecated. Supply build " + "dependencies using PEP 517 pyproject.toml build-requires.", + SetuptoolsDeprecationWarning, + ) dist.fetch_build_eggs(dist.setup_requires) -- cgit v1.2.1 From aae281a9ff6c9a1fa9daad82c79457e8770a1c7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 14:19:58 -0400 Subject: Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 28bd7883..190b3551 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=56", "wheel", "setuptools_scm[toml]>=3.4.1"] +requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"] build-backend = "setuptools.build_meta" [tool.black] -- cgit v1.2.1 From eba81f6d33e425b121d1fcb215f02bb1dede2a11 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 15:06:19 -0400 Subject: Add minimum versions for setup_requires, python_requires, py_modules. Closes #1535. --- docs/userguide/declarative_config.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index c50fcf6d..abafe376 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -206,10 +206,10 @@ Options Key Type Minimum Version Notes ======================= =================================== =============== ========= zip_safe bool -setup_requires list-semi +setup_requires list-semi 36.7.0 install_requires list-semi extras_require section [#opt-2]_ -python_requires str +python_requires str 34.4.0 entry_points file:, section 51.0.0 scripts list-comma eager_resources list-comma @@ -221,7 +221,7 @@ package_dir dict package_data section [#opt-1]_ exclude_package_data section namespace_packages list-comma -py_modules list-comma +py_modules list-comma 34.4.0 data_files dict 40.6.0 ======================= =================================== =============== ========= -- cgit v1.2.1 From fc5c3083908170e1cbfd1dec91f87a3e2707e3fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 15:27:51 -0400 Subject: Deprecate setup.py install and easy_install. Ref #917. --- changelog.d/917.change.rst | 1 + pytest.ini | 4 ++++ setuptools/command/easy_install.py | 6 ++++++ setuptools/command/install.py | 7 +++++++ 4 files changed, 18 insertions(+) create mode 100644 changelog.d/917.change.rst diff --git a/changelog.d/917.change.rst b/changelog.d/917.change.rst new file mode 100644 index 00000000..a2d3f7b8 --- /dev/null +++ b/changelog.d/917.change.rst @@ -0,0 +1 @@ +``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. diff --git a/pytest.ini b/pytest.ini index f81b6cfb..c7b62cc6 100644 --- a/pytest.ini +++ b/pytest.ini @@ -29,3 +29,7 @@ filterwarnings= # https://github.com/pypa/setuptools/issues/2823 ignore:setup_requires is deprecated. + + # https://github.com/pypa/setuptools/issues/917 + ignore:setup.py install is deprecated. + ignore:easy_install command is deprecated. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b88c3e9a..1aed0e87 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -153,6 +153,12 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): + warnings.warn( + "easy_install command is deprecated. " + "Use build and pip and other standards-based tools.", + EasyInstallDeprecationWarning, + ) + # the --user option seems to be an opt-in one, # so the default should be False. self.user = 0 diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 72b9a3e4..35e54d20 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -30,6 +30,13 @@ class install(orig.install): _nc = dict(new_commands) def initialize_options(self): + + warnings.warn( + "setup.py install is deprecated. " + "Use build and pip and other standards-based tools.", + setuptools.SetuptoolsDeprecationWarning, + ) + orig.install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None -- cgit v1.2.1 From ae2b8c8337bb5ea509b9b8e92ad6a9cbafe869b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 15:33:59 -0400 Subject: Rename changelog. Ref #1988. --- changelog.d/1988-change.rst | 2 -- changelog.d/1988.change.rst | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/1988-change.rst create mode 100644 changelog.d/1988.change.rst diff --git a/changelog.d/1988-change.rst b/changelog.d/1988-change.rst deleted file mode 100644 index 4f104639..00000000 --- a/changelog.d/1988-change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. --- by :user:`hugovk` diff --git a/changelog.d/1988.change.rst b/changelog.d/1988.change.rst new file mode 100644 index 00000000..4f104639 --- /dev/null +++ b/changelog.d/1988.change.rst @@ -0,0 +1,2 @@ +Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. +-- by :user:`hugovk` -- cgit v1.2.1 From ce9cc34c020fac31a5e10e4b1ab4af3d66dc038c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 15:34:26 -0400 Subject: Rename changelog. Ref #2785. --- changelog.d/2785-change.rst | 2 -- changelog.d/2785.change.rst | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/2785-change.rst create mode 100644 changelog.d/2785.change.rst diff --git a/changelog.d/2785-change.rst b/changelog.d/2785-change.rst deleted file mode 100644 index 7e9631b7..00000000 --- a/changelog.d/2785-change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Replace confirparser's readfp with read_file, deprecated since Python 3.2. --- by :user:`hugovk` diff --git a/changelog.d/2785.change.rst b/changelog.d/2785.change.rst new file mode 100644 index 00000000..7e9631b7 --- /dev/null +++ b/changelog.d/2785.change.rst @@ -0,0 +1,2 @@ +Replace confirparser's readfp with read_file, deprecated since Python 3.2. +-- by :user:`hugovk` -- cgit v1.2.1 From 4bce6d5a30accecc848d8e7f0dabd212bfea9475 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Oct 2021 16:15:32 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.2.0=20=E2=86=92=2058.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 19 +++++++++++++++++++ changelog.d/1988.change.rst | 2 -- changelog.d/2762.misc.rst | 2 -- changelog.d/2785.change.rst | 2 -- changelog.d/2823.change.rst | 1 - changelog.d/917.change.rst | 1 - setup.cfg | 2 +- 8 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 changelog.d/1988.change.rst delete mode 100644 changelog.d/2762.misc.rst delete mode 100644 changelog.d/2785.change.rst delete mode 100644 changelog.d/2823.change.rst delete mode 100644 changelog.d/917.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0ed35632..57793568 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.2.0 +current_version = 58.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 0a002fe5..c8ecd1e5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,22 @@ +v58.3.0 +------- + + +Changes +^^^^^^^ +* #917: ``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. +* #1988: Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. + -- by :user:`hugovk` +* #2785: Replace confirparser's readfp with read_file, deprecated since Python 3.2. + -- by :user:`hugovk` +* #2823: Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption. + +Misc +^^^^ +* #2762: Changed codecov.yml to configure the threshold to be lower + -- by :user:`tanvimoharir` + + v58.2.0 ------- diff --git a/changelog.d/1988.change.rst b/changelog.d/1988.change.rst deleted file mode 100644 index 4f104639..00000000 --- a/changelog.d/1988.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. --- by :user:`hugovk` diff --git a/changelog.d/2762.misc.rst b/changelog.d/2762.misc.rst deleted file mode 100644 index cc9bf86c..00000000 --- a/changelog.d/2762.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Changed codecov.yml to configure the threshold to be lower --- by :user:`tanvimoharir` diff --git a/changelog.d/2785.change.rst b/changelog.d/2785.change.rst deleted file mode 100644 index 7e9631b7..00000000 --- a/changelog.d/2785.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Replace confirparser's readfp with read_file, deprecated since Python 3.2. --- by :user:`hugovk` diff --git a/changelog.d/2823.change.rst b/changelog.d/2823.change.rst deleted file mode 100644 index 69db4c0d..00000000 --- a/changelog.d/2823.change.rst +++ /dev/null @@ -1 +0,0 @@ -Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption. diff --git a/changelog.d/917.change.rst b/changelog.d/917.change.rst deleted file mode 100644 index a2d3f7b8..00000000 --- a/changelog.d/917.change.rst +++ /dev/null @@ -1 +0,0 @@ -``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. diff --git a/setup.cfg b/setup.cfg index d7236be6..65c9479c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.2.0 +version = 58.3.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From e1729eae244ad4e05a0746196e7552749123cb2d Mon Sep 17 00:00:00 2001 From: "Kian-Meng, Ang" Date: Sun, 24 Oct 2021 03:22:45 +0800 Subject: Fix typos --- CHANGES.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c8ecd1e5..b927f77e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -147,7 +147,7 @@ Documentation changes some confusion. Add some examples and the version since when ``entry_points`` are supported in declarative configuration. - Tried to make the reading flow a bit leaner, gather some informations + Tried to make the reading flow a bit leaner, gather some information that were a bit dispersed. @@ -4234,7 +4234,7 @@ how it parses version numbers. * Fix test suite with Python 2.6. * Fix some DeprecationWarnings and ResourceWarnings. -* Distribute #335: Backed out ``setup_requires`` superceding installed requirements +* Distribute #335: Backed out ``setup_requires`` superseding installed requirements until regression can be addressed. 0.6.31 @@ -4253,7 +4253,7 @@ how it parses version numbers. PYTHONIOENCODING=utf8 pip install numpy * Fix for encoding issue when installing from Windows executable on Python 3. -* Distribute #323: Allow ``setup_requires`` requirements to supercede installed +* Distribute #323: Allow ``setup_requires`` requirements to supersede installed requirements. Added some new keyword arguments to existing pkg_resources methods. Also had to updated how __path__ is handled for namespace packages to ensure that when a new egg distribution containing a namespace package is @@ -4276,13 +4276,13 @@ how it parses version numbers. * If Sphinx is installed, the ``upload_docs`` command now runs ``build_sphinx`` to produce uploadable documentation. * Distribute #326: ``upload_docs`` provided mangled auth credentials under Python 3. -* Distribute #320: Fix check for "createable" in distribute_setup.py. +* Distribute #320: Fix check for "creatable" in distribute_setup.py. * Distribute #305: Remove a warning that was triggered during normal operations. * Distribute #311: Print metadata in UTF-8 independent of platform. * Distribute #303: Read manifest file with UTF-8 encoding under Python 3. * Distribute #301: Allow to run tests of namespace packages when using 2to3. * Distribute #304: Prevent import loop in site.py under Python 3.3. -* Distribute #283: Reenable scanning of ``*.pyc`` / ``*.pyo`` files on Python 3.3. +* Distribute #283: Re-enable scanning of ``*.pyc`` / ``*.pyo`` files on Python 3.3. * Distribute #299: The develop command didn't work on Python 3, when using 2to3, as the egg link would go to the Python 2 source. Linking to the 2to3'd code in build/lib makes it work, although you will have to rebuild the module -- cgit v1.2.1 From b3bf0a4b30373904b8c3940cf6d8d441d24e194b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 25 Oct 2021 12:19:28 +0300 Subject: Fix typo and add code formatting --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c8ecd1e5..f9612cfe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ Changes * #917: ``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. * #1988: Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. -- by :user:`hugovk` -* #2785: Replace confirparser's readfp with read_file, deprecated since Python 3.2. +* #2785: Replace ``configparser``'s ``readfp`` with ``read_file``, deprecated since Python 3.2. -- by :user:`hugovk` * #2823: Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption. -- cgit v1.2.1 From 4d8c122813eeb86d33a28c665313f15f6888bf62 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 26 Oct 2021 12:40:56 +0100 Subject: Docs: Add reference + short description for Paver In the developer-guide [Paver] is very briefly mentioned. The purpose of this change is to expand a little bit the context to help and help the potential contributor to understand what is happening. [Paver]: https://pythonhosted.org/Paver/ --- docs/development/developer-guide.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/development/developer-guide.rst b/docs/development/developer-guide.rst index d6ed2c1f..052ca762 100644 --- a/docs/development/developer-guide.rst +++ b/docs/development/developer-guide.rst @@ -123,5 +123,14 @@ setuptools from source. Eventually, this limitation may be lifted as PEP 517/518 reach ubiquitous adoption, but for now, Setuptools cannot declare dependencies other than through ``setuptools/_vendor/vendored.txt`` and -``pkg_resources/_vendor/vendored.txt`` and refreshed by way of -``paver update_vendored`` (pavement.py). +``pkg_resources/_vendor/vendored.txt``. + +All the dependencies specified in these files are "vendorized" using Paver_, a +simple Python-based project scripting and task running tool. + +To refresh the dependencies, you can run the following command (defined in +``pavement.py``):: + + $ paver update_vendored + +.. _Paver: https://pythonhosted.org/Paver/ -- cgit v1.2.1 From 2c169ff531635bccab1f8bd0451a762bd286903c Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 26 Oct 2021 13:35:02 +0100 Subject: Remove data_files from declarative config example According to the following references: - https://setuptools.pypa.io/en/latest/references/keywords.html - https://packaging.python.org/guides/distributing-packages-using-setuptools/#package-data the usage of ``data_files`` is deprecated. Therefore we should avoid having it in the main configuration example for declarative config. --- changelog.d/2932.doc.1.rst | 2 ++ changelog.d/2932.doc.2.rst | 3 +++ docs/userguide/declarative_config.rst | 12 ++++-------- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 changelog.d/2932.doc.1.rst create mode 100644 changelog.d/2932.doc.2.rst diff --git a/changelog.d/2932.doc.1.rst b/changelog.d/2932.doc.1.rst new file mode 100644 index 00000000..fd547d16 --- /dev/null +++ b/changelog.d/2932.doc.1.rst @@ -0,0 +1,2 @@ +Removed the deprecated ``data_files`` option from the example in the +declarative configuration docs -- by :user:`abravalheri` diff --git a/changelog.d/2932.doc.2.rst b/changelog.d/2932.doc.2.rst new file mode 100644 index 00000000..2b341c09 --- /dev/null +++ b/changelog.d/2932.doc.2.rst @@ -0,0 +1,3 @@ +Change type of ``data_files`` option from ``dict`` to ``section`` in +declarative configuration docs (to match previous example) -- by +:user:`abravalheri` diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index abafe376..d1c25df1 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -63,13 +63,6 @@ boilerplate code in some cases. src.subpackage1 src.subpackage2 - [options.data_files] - /etc/my_package = - site.d/00_default.conf - host.d/00_default.conf - data = data/img/logo.png, data/svg/icon.svg - fonts = data/fonts/*.ttf, data/fonts/*.otf - Metadata and options are set in the config sections of the same name. * Keys are the same as the keyword arguments one provides to the ``setup()`` @@ -222,7 +215,7 @@ package_data section [# exclude_package_data section namespace_packages list-comma py_modules list-comma 34.4.0 -data_files dict 40.6.0 +data_files section 40.6.0 [#opt-4]_ ======================= =================================== =============== ========= **Notes**: @@ -250,6 +243,9 @@ data_files dict 40.6.0 The ``find_namespace:`` directive is supported since Python >=3.3. +.. [#opt-4] ``data_files`` is deprecated and should be avoided. + Please check :doc:`/userguide/datafiles` for more information. + Compatibility with other tools ============================== -- cgit v1.2.1 From 96475e3b3af4e0a0166cdb75c976ce07cfd44fce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Oct 2021 21:26:38 -0400 Subject: Drop tests against pip < 20, which no longer work without 'wheel' specified in build requirements. --- setuptools/tests/test_virtualenv.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 462e20c7..2abedfc7 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -75,15 +75,7 @@ def _get_pip_versions(): def skip_network(param): return param if network else mark(param, pytest.mark.skip(reason="no network")) - issue2599 = pytest.mark.skipif( - sys.version_info > (3, 10), - reason="pypa/setuptools#2599", - ) - network_versions = [ - mark('pip==9.0.3', issue2599), - mark('pip==10.0.1', issue2599), - mark('pip==18.1', issue2599), mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', 'https://github.com/pypa/pip/archive/main.zip', -- cgit v1.2.1 From 84b1cd8e7760a9b3c984a4edfc37dc7266952266 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Oct 2021 21:09:54 -0400 Subject: Raise a deprecation warning when an invalid version is encountered. Ref #2497. Ref #2822. --- changelog.d/2497.change.rst | 1 + pkg_resources/__init__.py | 5 +++++ pytest.ini | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 changelog.d/2497.change.rst diff --git a/changelog.d/2497.change.rst b/changelog.d/2497.change.rst new file mode 100644 index 00000000..91d840f7 --- /dev/null +++ b/changelog.d/2497.change.rst @@ -0,0 +1 @@ +Officially deprecated PEP 440 non-compliant versions. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c84f1dd9..3aafe652 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -113,6 +113,11 @@ def parse_version(v): try: return packaging.version.Version(v) except packaging.version.InvalidVersion: + warnings.warn( + f"{v} is an invalid version and will not be supported in " + "a future release", + PkgResourcesDeprecationWarning, + ) return packaging.version.LegacyVersion(v) diff --git a/pytest.ini b/pytest.ini index bdcab1bf..2678afd8 100644 --- a/pytest.ini +++ b/pytest.ini @@ -31,3 +31,6 @@ filterwarnings= # https://github.com/pypa/setuptools/issues/917 ignore:setup.py install is deprecated. ignore:easy_install command is deprecated. + + # https://github.com/pypa/setuptools/issues/2497 + ignore:.* is an invalid version and will not be supported::pkg_resources -- cgit v1.2.1 From 8b37b2ba986cf4736ab46aa2f9c31d424cbfb098 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Oct 2021 21:39:54 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.3.0=20=E2=86=92=2058.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 17 +++++++++++++++++ changelog.d/2497.change.rst | 1 - changelog.d/2932.doc.1.rst | 2 -- changelog.d/2932.doc.2.rst | 3 --- setup.cfg | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/2497.change.rst delete mode 100644 changelog.d/2932.doc.1.rst delete mode 100644 changelog.d/2932.doc.2.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 57793568..095e606f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.3.0 +current_version = 58.4.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index f9612cfe..89e525c4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,20 @@ +v58.4.0 +------- + + +Changes +^^^^^^^ +* #2497: Officially deprecated PEP 440 non-compliant versions. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2932: Removed the deprecated ``data_files`` option from the example in the + declarative configuration docs -- by :user:`abravalheri` +* #2932: Change type of ``data_files`` option from ``dict`` to ``section`` in + declarative configuration docs (to match previous example) -- by + :user:`abravalheri` + + v58.3.0 ------- diff --git a/changelog.d/2497.change.rst b/changelog.d/2497.change.rst deleted file mode 100644 index 91d840f7..00000000 --- a/changelog.d/2497.change.rst +++ /dev/null @@ -1 +0,0 @@ -Officially deprecated PEP 440 non-compliant versions. diff --git a/changelog.d/2932.doc.1.rst b/changelog.d/2932.doc.1.rst deleted file mode 100644 index fd547d16..00000000 --- a/changelog.d/2932.doc.1.rst +++ /dev/null @@ -1,2 +0,0 @@ -Removed the deprecated ``data_files`` option from the example in the -declarative configuration docs -- by :user:`abravalheri` diff --git a/changelog.d/2932.doc.2.rst b/changelog.d/2932.doc.2.rst deleted file mode 100644 index 2b341c09..00000000 --- a/changelog.d/2932.doc.2.rst +++ /dev/null @@ -1,3 +0,0 @@ -Change type of ``data_files`` option from ``dict`` to ``section`` in -declarative configuration docs (to match previous example) -- by -:user:`abravalheri` diff --git a/setup.cfg b/setup.cfg index 885ee07e..50622ccf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.3.0 +version = 58.4.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From 1812f8db08e32c72b4e1e419ad178ed0e66b2958 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 1 Nov 2021 07:05:44 +0200 Subject: Docs: Fix typo in History https://setuptools.pypa.io/en/latest/history.html#v58-4-0 Should be https://github.com/pypa/setuptools/issues/2832 --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 89e525c4..de28a1b4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,9 +8,9 @@ Changes Documentation changes ^^^^^^^^^^^^^^^^^^^^^ -* #2932: Removed the deprecated ``data_files`` option from the example in the +* #2832: Removed the deprecated ``data_files`` option from the example in the declarative configuration docs -- by :user:`abravalheri` -* #2932: Change type of ``data_files`` option from ``dict`` to ``section`` in +* #2832: Change type of ``data_files`` option from ``dict`` to ``section`` in declarative configuration docs (to match previous example) -- by :user:`abravalheri` -- cgit v1.2.1 From 2e66eb7147ae1e8a799b2276c7340f48f63a7220 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 1 Nov 2021 19:47:33 +0000 Subject: Fix 1461: Better loop breaker for `manifest_maker` The inconsistency for the `package_data` configuration in sdists when `include_package_data=True` in #1461 have been causing some problems for the community for a while, as also shown in #2835. As pointed out by [@jaraco](https://github.com/pypa/setuptools/issues/1461#issuecomment-749092366), this was being caused by a mechanism to break the recursion between the `egg_info` and `sdist` commands. In summary the loop is caused by the following behaviour: - the `egg_info` command uses a subclass of `sdist` (`manifest_maker`) to calculate the MANIFEST, - the `sdist` class needs to know the MANIFEST to calculate the data files when `include_package_data=True` Previously, the mechanism to break this loop was to simply ignore the data files in `sdist` when `include_package_data=True`. The approach implemented in this change was to replace this mechanism, by allowing `manifest_maker` to override the `_safe_data_files` method from `sdist`. --- Please notice [an extensive experiment] (https://github.com/abravalheri/experiment-setuptools-package-data) was carried out to investigate the previous confusing behaviour. There is also [a simplified theoretical analysis] (https://github.com/pyscaffold/pyscaffold/pull/535#issuecomment-956296407) comparing the observed behavior in the experiment and the expected one. This analysis point out to the same offender indicated by [@jaraco](https://github.com/pypa/setuptools/issues/1461#issuecomment-749092366) (which is being replaced in this change). --- changelog.d/1461.change.rst | 3 +++ setuptools/command/build_py.py | 13 +++++++++++++ setuptools/command/egg_info.py | 11 +++++++++++ setuptools/command/sdist.py | 13 ++++++++----- setuptools/tests/test_sdist.py | 24 ++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 changelog.d/1461.change.rst diff --git a/changelog.d/1461.change.rst b/changelog.d/1461.change.rst new file mode 100644 index 00000000..fa940dbf --- /dev/null +++ b/changelog.d/1461.change.rst @@ -0,0 +1,3 @@ +Fix inconsistency with ``include_package_data`` and ``packages_data`` in sdist +by replacing the loop breaking mechanism between the ``sdist`` and +``egg_info`` commands -- by :user:`abravalheri` diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 6a615433..f71c5a56 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -67,6 +67,19 @@ class build_py(orig.build_py): self.analyze_manifest() return list(map(self._get_pkg_data_files, self.packages or ())) + def get_data_files_without_manifest(self): + """ + Generate list of ``(package,src_dir,build_dir,filenames)`` tuples, + but without triggering any attempt to analyze or build the manifest. + """ + # Avoid triggering dynamic behavior in __getattr__ + if 'data_files' in self.__dict__: + return self.data_files + # Prevent eventual errors from unset `manifest_files` + # (that would otherwise be set by `analyze_manifest`) + self.__dict__.setdefault('manifest_files', {}) + return list(map(self._get_pkg_data_files, self.packages or ())) + def _get_pkg_data_files(self, package): # Locate package source directory src_dir = self.get_package_dir(package) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 18b81340..ff009861 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -608,6 +608,17 @@ class manifest_maker(sdist): self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, is_regex=1) + def _safe_data_files(self, build_py): + """ + The parent class implementation of this method (``sdist``) will try to + include data files, which might cause recursion problems, when + ``include_package_data=True``. + + Therefore we have to avoid triggering any attempt of analyzing/building + the manifest again. + """ + return build_py.get_data_files_without_manifest() + def write_file(filename, contents): """Create a file with the specified name and write 'contents' (a diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index e8062f2e..0285b690 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -114,12 +114,15 @@ class sdist(sdist_add_defaults, orig.sdist): def _safe_data_files(self, build_py): """ - Extracting data_files from build_py is known to cause - infinite recursion errors when `include_package_data` - is enabled, so suppress it in that case. + Since the ``sdist`` class is also used to compute the MANIFEST + (via :obj:`setuptools.command.egg_info.manifest_maker`), + there might be recursion problems when trying to obtain the list of + data_files and ``include_package_data=True`` (which in turn depends on + the files included in the MANIFEST). + + To avoid that, ``manifest_maker`` should be able to overwrite this + method and avoid recursive attempts to build/analyze the MANIFEST. """ - if self.distribution.include_package_data: - return () return build_py.data_files def _add_data_files(self, data_files): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 049fdcc0..98eb1a4f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -126,6 +126,30 @@ class TestSdistTest: assert os.path.join('sdist_test', 'c.rst') not in manifest assert os.path.join('d', 'e.dat') in manifest + def test_package_data_and_include_package_data_in_sdist(self): + """Make sure there is no recursion when ``include_package_data=True``. + + The mention to a recursion can be first found in: + https://github.com/pypa/setuptools/commit/f6cb3d29d919ff6b9313b8a3281c66cfb368c29b + """ + + setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} + assert setup_attrs['package_data'] # make sure we have both options + + dist = Distribution(setup_attrs) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + with quiet(): + cmd.run() + + manifest = cmd.filelist.files + assert os.path.join('sdist_test', 'a.txt') in manifest + assert os.path.join('sdist_test', 'b.txt') in manifest + assert os.path.join('sdist_test', 'c.rst') not in manifest + assert os.path.join('d', 'e.dat') in manifest + def test_setup_py_exists(self): dist = Distribution(SETUP_ATTRS) dist.script_name = 'foo.py' -- cgit v1.2.1 From 7b5158b103d178a940d2fd98fc9a5a26fdd90c7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Nov 2021 20:09:52 -0400 Subject: Amend changelog to include link to Paul's blog article. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 89e525c4..a0da5bf7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,7 +21,7 @@ v58.3.0 Changes ^^^^^^^ -* #917: ``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. +* #917: ``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. See `Why you shouldn't invoke setup.py directly `_ for more background. * #1988: Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead. -- by :user:`hugovk` * #2785: Replace ``configparser``'s ``readfp`` with ``read_file``, deprecated since Python 3.2. -- cgit v1.2.1 From a22806842983998f3772d904dc25390ccf315375 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 2 Nov 2021 20:10:00 -0400 Subject: Introduce test and remove workaround for recursion error. --- setuptools/command/sdist.py | 7 ------- setuptools/tests/test_sdist.py | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index e8062f2e..08296609 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -113,13 +113,6 @@ class sdist(sdist_add_defaults, orig.sdist): self._add_data_files(self._safe_data_files(build_py)) def _safe_data_files(self, build_py): - """ - Extracting data_files from build_py is known to cause - infinite recursion errors when `include_package_data` - is enabled, so suppress it in that case. - """ - if self.distribution.include_package_data: - return () return build_py.data_files def _add_data_files(self, data_files): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 049fdcc0..98eb1a4f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -126,6 +126,30 @@ class TestSdistTest: assert os.path.join('sdist_test', 'c.rst') not in manifest assert os.path.join('d', 'e.dat') in manifest + def test_package_data_and_include_package_data_in_sdist(self): + """Make sure there is no recursion when ``include_package_data=True``. + + The mention to a recursion can be first found in: + https://github.com/pypa/setuptools/commit/f6cb3d29d919ff6b9313b8a3281c66cfb368c29b + """ + + setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} + assert setup_attrs['package_data'] # make sure we have both options + + dist = Distribution(setup_attrs) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + with quiet(): + cmd.run() + + manifest = cmd.filelist.files + assert os.path.join('sdist_test', 'a.txt') in manifest + assert os.path.join('sdist_test', 'b.txt') in manifest + assert os.path.join('sdist_test', 'c.rst') not in manifest + assert os.path.join('d', 'e.dat') in manifest + def test_setup_py_exists(self): dist = Distribution(SETUP_ATTRS) dist.script_name = 'foo.py' -- cgit v1.2.1 From 0ea58d0ae197ae89e55f9fd20fa61db147294984 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Nov 2021 20:39:44 -0400 Subject: Add build_py and sdist to bootstrap metadata. Ensures distutils versions aren't used while bootstrapping egg-info. --- bootstrap.egg-info/entry_points.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap.egg-info/entry_points.txt b/bootstrap.egg-info/entry_points.txt index 834d674e..c00d1d3a 100644 --- a/bootstrap.egg-info/entry_points.txt +++ b/bootstrap.egg-info/entry_points.txt @@ -1,11 +1,15 @@ [distutils.commands] egg_info = setuptools.command.egg_info:egg_info +build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist [distutils.setup_keywords] include_package_data = setuptools.dist:assert_bool install_requires = setuptools.dist:check_requirements extras_require = setuptools.dist:check_extras entry_points = setuptools.dist:check_entry_points +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp [egg_info.writers] PKG-INFO = setuptools.command.egg_info:write_pkg_info -- cgit v1.2.1 From 2d38be3259311220d069996b3a906f171dfddafc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Nov 2021 20:54:51 -0400 Subject: Reformat docstring and rewrite in imperative voice. --- setuptools/command/egg_info.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index ff009861..4165c35e 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -610,12 +610,13 @@ class manifest_maker(sdist): def _safe_data_files(self, build_py): """ - The parent class implementation of this method (``sdist``) will try to - include data files, which might cause recursion problems, when + The parent class implementation of this method + (``sdist``) will try to include data files, which + might cause recursion problems when ``include_package_data=True``. - Therefore we have to avoid triggering any attempt of analyzing/building - the manifest again. + Therefore, avoid triggering any attempt of + analyzing/building the manifest again. """ return build_py.get_data_files_without_manifest() -- cgit v1.2.1 From b8ad7d2ca1abc59e42e63ecf484036d021a2e19c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Nov 2021 21:08:01 -0400 Subject: Remove data_files avoidance code. --- setuptools/command/build_py.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index f71c5a56..c3fdc092 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -72,9 +72,6 @@ class build_py(orig.build_py): Generate list of ``(package,src_dir,build_dir,filenames)`` tuples, but without triggering any attempt to analyze or build the manifest. """ - # Avoid triggering dynamic behavior in __getattr__ - if 'data_files' in self.__dict__: - return self.data_files # Prevent eventual errors from unset `manifest_files` # (that would otherwise be set by `analyze_manifest`) self.__dict__.setdefault('manifest_files', {}) -- cgit v1.2.1 From 10ead90587c991774f2b6157ed7924bac83fff65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Nov 2021 21:15:56 -0400 Subject: Trim docstring and remove comment. --- setuptools/tests/test_sdist.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 98eb1a4f..34c32bb0 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -127,14 +127,12 @@ class TestSdistTest: assert os.path.join('d', 'e.dat') in manifest def test_package_data_and_include_package_data_in_sdist(self): - """Make sure there is no recursion when ``include_package_data=True``. - - The mention to a recursion can be first found in: - https://github.com/pypa/setuptools/commit/f6cb3d29d919ff6b9313b8a3281c66cfb368c29b """ - + Ensure package_data and include_package_data work + together. + """ setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} - assert setup_attrs['package_data'] # make sure we have both options + assert setup_attrs['package_data'] dist = Distribution(setup_attrs) dist.script_name = 'setup.py' -- cgit v1.2.1 From dfbbf11be13ecf11f8ed7c1f00f7adba8e425afc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Nov 2021 17:53:03 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.4.0=20=E2=86=92=2058.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 11 +++++++++++ changelog.d/1461.change.rst | 3 --- setup.cfg | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1461.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 095e606f..1f0b2d3d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.4.0 +current_version = 58.5.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 65536fad..26b8d675 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v58.5.0 +------- + + +Changes +^^^^^^^ +* #1461: Fix inconsistency with ``include_package_data`` and ``packages_data`` in sdist + by replacing the loop breaking mechanism between the ``sdist`` and + ``egg_info`` commands -- by :user:`abravalheri` + + v58.4.0 ------- diff --git a/changelog.d/1461.change.rst b/changelog.d/1461.change.rst deleted file mode 100644 index fa940dbf..00000000 --- a/changelog.d/1461.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fix inconsistency with ``include_package_data`` and ``packages_data`` in sdist -by replacing the loop breaking mechanism between the ``sdist`` and -``egg_info`` commands -- by :user:`abravalheri` diff --git a/setup.cfg b/setup.cfg index 50622ccf..6ce54485 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.4.0 +version = 58.5.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From 30f070eeb27a6477314a03fecbd7e4cc3ac4fd9e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Nov 2021 17:59:05 -0400 Subject: Move warning definition above implicit behavior on import. Fixes #2846. --- changelog.d/2486.misc.rst | 1 + pkg_resources/__init__.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 changelog.d/2486.misc.rst diff --git a/changelog.d/2486.misc.rst b/changelog.d/2486.misc.rst new file mode 100644 index 00000000..6a2c4438 --- /dev/null +++ b/changelog.d/2486.misc.rst @@ -0,0 +1 @@ +Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3aafe652..4aece3c4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3244,6 +3244,15 @@ def _initialize(g=globals()): ) +class PkgResourcesDeprecationWarning(Warning): + """ + Base class for warning about deprecations in ``pkg_resources`` + + This class is not derived from ``DeprecationWarning``, and as such is + visible by default. + """ + + @_call_aside def _initialize_master_working_set(): """ @@ -3282,12 +3291,3 @@ def _initialize_master_working_set(): # match order list(map(working_set.add_entry, sys.path)) globals().update(locals()) - - -class PkgResourcesDeprecationWarning(Warning): - """ - Base class for warning about deprecations in ``pkg_resources`` - - This class is not derived from ``DeprecationWarning``, and as such is - visible by default. - """ -- cgit v1.2.1 From 3d434958c6d1b942d1117c3934fe151446bda55a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Nov 2021 17:59:28 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.5.0=20=E2=86=92=2058.5.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2486.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2486.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1f0b2d3d..492bc2d3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.5.0 +current_version = 58.5.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 26b8d675..a0583676 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v58.5.1 +------- + + +Misc +^^^^ +* #2486: Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. + + v58.5.0 ------- diff --git a/changelog.d/2486.misc.rst b/changelog.d/2486.misc.rst deleted file mode 100644 index 6a2c4438..00000000 --- a/changelog.d/2486.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. diff --git a/setup.cfg b/setup.cfg index 6ce54485..33fbdb70 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.5.0 +version = 58.5.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From fad059e2d22cf1813cef1c96b7b1be1da2ac1158 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Nov 2021 19:27:26 -0400 Subject: Suppress 'setup.py install' warning under bdist_wheel. Fixes #2847. --- changelog.d/2847.misc.rst | 1 + setuptools/build_meta.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelog.d/2847.misc.rst diff --git a/changelog.d/2847.misc.rst b/changelog.d/2847.misc.rst new file mode 100644 index 00000000..9284a443 --- /dev/null +++ b/changelog.d/2847.misc.rst @@ -0,0 +1 @@ +Suppress 'setup.py install' warning under bdist_wheel. diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 9dfb2f24..d0ac613b 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -33,6 +33,7 @@ import tokenize import shutil import contextlib import tempfile +import warnings import setuptools import distutils @@ -118,6 +119,13 @@ def _open_setup_script(setup_script): return getattr(tokenize, 'open', open)(setup_script) +@contextlib.contextmanager +def suppress_known_deprecation(): + with warnings.catch_warnings(): + warnings.filterwarnings('ignore', 'setup.py install is deprecated') + yield + + class _BuildMetaBackend(object): def _fix_config(self, config_settings): @@ -218,8 +226,9 @@ class _BuildMetaBackend(object): def build_wheel(self, wheel_directory, config_settings=None, metadata_directory=None): - return self._build_with_temp_dir(['bdist_wheel'], '.whl', - wheel_directory, config_settings) + with suppress_known_deprecation(): + return self._build_with_temp_dir(['bdist_wheel'], '.whl', + wheel_directory, config_settings) def build_sdist(self, sdist_directory, config_settings=None): return self._build_with_temp_dir(['sdist', '--formats', 'gztar'], -- cgit v1.2.1 From 41b6e7655dd72e2f0dcc06e776009f73af738c48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Nov 2021 19:30:13 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.5.1=20=E2=86=92=2058.5.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2847.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2847.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 492bc2d3..ce559b12 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.5.1 +current_version = 58.5.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a0583676..67d62ccb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v58.5.2 +------- + + +Misc +^^^^ +* #2847: Suppress 'setup.py install' warning under bdist_wheel. + + v58.5.1 ------- diff --git a/changelog.d/2847.misc.rst b/changelog.d/2847.misc.rst deleted file mode 100644 index 9284a443..00000000 --- a/changelog.d/2847.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Suppress 'setup.py install' warning under bdist_wheel. diff --git a/setup.cfg b/setup.cfg index 33fbdb70..631f097c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.5.1 +version = 58.5.2 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From 503785c2f0a991eff0826ea1379901d6c7de08e4 Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Wed, 3 Nov 2021 19:40:48 -0400 Subject: Fix wrong issue number in CHANGES.rst --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 67d62ccb..cbc7e4a2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,7 +13,7 @@ v58.5.1 Misc ^^^^ -* #2486: Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. +* #2846: Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. v58.5.0 -- cgit v1.2.1 From a5716723c3e311c0a69da57dbf7c5bc65d4ef062 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 12:27:55 +0000 Subject: Add regression test for #2849 --- setuptools/tests/test_sdist.py | 57 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 34c32bb0..4ab13228 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -6,6 +6,7 @@ import tempfile import unicodedata import contextlib import io +from unittest import mock import pytest @@ -106,6 +107,13 @@ class TestSdistTest: with tmpdir.as_cwd(): yield + def assert_package_data_in_manifest(self, cmd): + manifest = cmd.filelist.files + assert os.path.join('sdist_test', 'a.txt') in manifest + assert os.path.join('sdist_test', 'b.txt') in manifest + assert os.path.join('sdist_test', 'c.rst') not in manifest + assert os.path.join('d', 'e.dat') in manifest + def test_package_data_in_sdist(self): """Regression test for pull request #4: ensures that files listed in package_data are included in the manifest even if they're not added to @@ -120,11 +128,7 @@ class TestSdistTest: with quiet(): cmd.run() - manifest = cmd.filelist.files - assert os.path.join('sdist_test', 'a.txt') in manifest - assert os.path.join('sdist_test', 'b.txt') in manifest - assert os.path.join('sdist_test', 'c.rst') not in manifest - assert os.path.join('d', 'e.dat') in manifest + self.assert_package_data_in_manifest(cmd) def test_package_data_and_include_package_data_in_sdist(self): """ @@ -142,11 +146,44 @@ class TestSdistTest: with quiet(): cmd.run() - manifest = cmd.filelist.files - assert os.path.join('sdist_test', 'a.txt') in manifest - assert os.path.join('sdist_test', 'b.txt') in manifest - assert os.path.join('sdist_test', 'c.rst') not in manifest - assert os.path.join('d', 'e.dat') in manifest + self.assert_package_data_in_manifest(cmd) + + def test_custom_build_py(self): + """ + Ensure projects defining custom build_py don't break + when creating sdists (issue #2849) + """ + from distutils.command.build_py import build_py as OrigBuildPy + + using_custom_command_guard = mock.Mock() + + class CustomBuildPy(OrigBuildPy): + """ + Some projects have custom commands inheriting from `distutils` + """ + + def get_data_files(self): + using_custom_command_guard() + return super().get_data_files() + + setup_attrs = {**SETUP_ATTRS, 'include_package_data': True} + assert setup_attrs['package_data'] + + dist = Distribution(setup_attrs) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # Make sure we use the custom command + cmd.cmdclass = {'build_py': CustomBuildPy} + cmd.distribution.cmdclass = {'build_py': CustomBuildPy} + assert cmd.distribution.get_command_class('build_py') == CustomBuildPy + + with quiet(): + cmd.run() + + using_custom_command_guard.assert_called() + self.assert_package_data_in_manifest(cmd) def test_setup_py_exists(self): dist = Distribution(SETUP_ATTRS) -- cgit v1.2.1 From 08235e88d10179c89ed80a4dd9bf2d18c76b478d Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 12:30:37 +0000 Subject: Handle custom build_py inheriting from distutils According to #2849, some projects, including important data-science packages rely on `distutils` when creating custom commands, instead of extending the ones provided by setuptools. This change should accomodate this use case, while also warning the users to migrate. --- setuptools/command/egg_info.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4165c35e..8ae27d87 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -618,7 +618,15 @@ class manifest_maker(sdist): Therefore, avoid triggering any attempt of analyzing/building the manifest again. """ - return build_py.get_data_files_without_manifest() + if hasattr(build_py, 'get_data_files_without_manifest'): + return build_py.get_data_files_without_manifest() + + log.warn( + "Custom 'build_py' does not implement " + "'get_data_files_without_manifest'.\nPlease extend command classes" + " from setuptools instead of distutils." + ) + return build_py.get_data_files() def write_file(filename, contents): -- cgit v1.2.1 From 9d0dc418639a0bf7cd9244feb705d30b60e1a906 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 12:40:50 +0000 Subject: Make sure user gets warned when using distutils --- setuptools/tests/test_sdist.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 4ab13228..e6d8e908 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -148,7 +148,8 @@ class TestSdistTest: self.assert_package_data_in_manifest(cmd) - def test_custom_build_py(self): + @mock.patch('setuptools.command.egg_info.log') + def test_custom_build_py(self, log_stub): """ Ensure projects defining custom build_py don't break when creating sdists (issue #2849) @@ -185,6 +186,19 @@ class TestSdistTest: using_custom_command_guard.assert_called() self.assert_package_data_in_manifest(cmd) + warn_stub = log_stub.warn + warn_stub.assert_called() + for call in warn_stub.call_args_list: + args, _kw = call + if "setuptools instead of distutils" in args[0]: + return + else: + raise AssertionError( + "The user should have been warned to extend setuptools command" + " classes instead of distutils", + warn_stub.call_args_list + ) + def test_setup_py_exists(self): dist = Distribution(SETUP_ATTRS) dist.script_name = 'foo.py' -- cgit v1.2.1 From fd7909440653b2a46bdb8fa95739caaa7f92d148 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 01:39:49 +0000 Subject: Add logo design and usage instructions --- changelog.d/2227.doc.1.rst | 2 + docs/logo/README.rst | 106 +++++ docs/logo/banner-github.png | Bin 0 -> 15763 bytes docs/logo/banner-github.svg | 101 ++++ docs/logo/banner-negative-github.png | Bin 0 -> 18004 bytes docs/logo/banner-negative-github.svg | 109 +++++ docs/logo/banner-negative.png | Bin 0 -> 8985 bytes docs/logo/banner-negative.svg | 105 +++++ docs/logo/banner.png | Bin 0 -> 8216 bytes docs/logo/banner.svg | 97 ++++ docs/logo/demo-editable-inkscape.png | Bin 0 -> 90174 bytes docs/logo/demo-editable-inkscape.svg | 888 +++++++++++++++++++++++++++++++++++ docs/logo/editable-inkscape.png | Bin 0 -> 13249 bytes docs/logo/editable-inkscape.svg | 150 ++++++ docs/logo/paths-negative.png | Bin 0 -> 14594 bytes docs/logo/paths-negative.svg | 106 +++++ docs/logo/paths-over-white.png | Bin 0 -> 13915 bytes docs/logo/paths-over-white.svg | 106 +++++ docs/logo/paths.png | Bin 0 -> 13208 bytes docs/logo/paths.svg | 98 ++++ docs/logo/symbol-only.png | Bin 0 -> 8506 bytes docs/logo/symbol-only.svg | 46 ++ docs/logo/text-only.png | Bin 0 -> 4705 bytes docs/logo/text-only.svg | 85 ++++ 24 files changed, 1999 insertions(+) create mode 100644 changelog.d/2227.doc.1.rst create mode 100644 docs/logo/README.rst create mode 100644 docs/logo/banner-github.png create mode 100644 docs/logo/banner-github.svg create mode 100644 docs/logo/banner-negative-github.png create mode 100644 docs/logo/banner-negative-github.svg create mode 100644 docs/logo/banner-negative.png create mode 100644 docs/logo/banner-negative.svg create mode 100644 docs/logo/banner.png create mode 100644 docs/logo/banner.svg create mode 100644 docs/logo/demo-editable-inkscape.png create mode 100644 docs/logo/demo-editable-inkscape.svg create mode 100644 docs/logo/editable-inkscape.png create mode 100644 docs/logo/editable-inkscape.svg create mode 100644 docs/logo/paths-negative.png create mode 100644 docs/logo/paths-negative.svg create mode 100644 docs/logo/paths-over-white.png create mode 100644 docs/logo/paths-over-white.svg create mode 100644 docs/logo/paths.png create mode 100644 docs/logo/paths.svg create mode 100644 docs/logo/symbol-only.png create mode 100644 docs/logo/symbol-only.svg create mode 100644 docs/logo/text-only.png create mode 100644 docs/logo/text-only.svg diff --git a/changelog.d/2227.doc.1.rst b/changelog.d/2227.doc.1.rst new file mode 100644 index 00000000..ba7acb7f --- /dev/null +++ b/changelog.d/2227.doc.1.rst @@ -0,0 +1,2 @@ +Added new setuptools logo, including editable files and artwork documentation +-- by :user:`abravalheri` diff --git a/docs/logo/README.rst b/docs/logo/README.rst new file mode 100644 index 00000000..b42eaf79 --- /dev/null +++ b/docs/logo/README.rst @@ -0,0 +1,106 @@ +:orphan: + +======= +Artwork +======= + +.. figure:: paths-over-white.svg + :align: center + + Setuptools logo, designed in 2021 by `Anderson Bravalheri`_ + +Elements of Design +================== + +The main colours of the design are a dark pastel azure (``#336790``) and a pale +orange (``#E5B62F``), referred in this document simply as "blue" and "yellow" +respectively. The text uses the *Monoid* typeface, an open source webfont that +was developed by Andreas Larsen and contributors in 2015 and is distributed +under the MIT or SIL licenses (more information at +https://github.com/larsenwork/monoid) + + +Usage +===== + +The preferred way of using the setuptools logo is over a white (or light) +background. Alternatively, the following options can be considered, depending +on the circumstances: + +- *"negative"* design - for dark backgrounds (e.g. website displayed in "dark + mode"): the white colour (``#FFFFFF``) of the background and the "blue" + (``#336790``) colour of the design can be swapped. +- *"monochrome"* - when colours are not available (e.g. black and white printed + media): a completely black or white version of the logo can also be used. +- *"banner"* mode: the symbol and text can be used alongside depending on the + available space. + +The following image illustrate these alternatives: + +.. image:: demo-editable-inkscape.png + :align: center + +Please refer to the SVG files in the `setuptools repository`_ for the specific +shapes and proportions between the elements of the design. + + +Working with the Design +======================= + +The `setuptools repository`_ contains a series of vector representations of the +design under the ``docs/logo`` directory. These representations can be +manipulated via any graphic editor that support SVG files, +however the free and open-source software Inkscape_ is recommended for maximum +compatibility. + +When selecting the right file to work with, file names including +``editable-inkscape`` indicate "more editable" elements (e.g. editable text), +while the others prioritise SVG paths for maximum reproducibility. + +Also notice that you might have to `install the correct fonts`_ to be able to +visualise or edit some of the designs. + + +License +======= + + +This logo, design variations or a modified version may be used by anyone to +refer to setuptools, but does not indicate endorsement by the project. + +Redistribution, usage and derivative works are permitted under the same license +used by the setuptools software (MIT): + +.. code-block:: text + + Copyright (c) Anderson Bravalheri + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + THE USAGE OF THIS LOGO AND ARTWORK DOES NOT INDICATE ENDORSEMENT BY THE + SETUPTOOLS PROJECT. + +Whenever possible, please make the image a link to +https://github.com/pypa/setuptools. + + +.. _Anderson Bravalheri: https://github.com/abravalheri +.. _Inkscape: https://inkscape.org +.. _setuptools repository: https://github.com/pypa/setuptools +.. _install the correct fonts: https://wiki.inkscape.org/wiki/Installing_fonts diff --git a/docs/logo/banner-github.png b/docs/logo/banner-github.png new file mode 100644 index 00000000..ce7f99f2 Binary files /dev/null and b/docs/logo/banner-github.png differ diff --git a/docs/logo/banner-github.svg b/docs/logo/banner-github.svg new file mode 100644 index 00000000..8222f645 --- /dev/null +++ b/docs/logo/banner-github.svg @@ -0,0 +1,101 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/banner-negative-github.png b/docs/logo/banner-negative-github.png new file mode 100644 index 00000000..c0126f8b Binary files /dev/null and b/docs/logo/banner-negative-github.png differ diff --git a/docs/logo/banner-negative-github.svg b/docs/logo/banner-negative-github.svg new file mode 100644 index 00000000..fd5535fd --- /dev/null +++ b/docs/logo/banner-negative-github.svg @@ -0,0 +1,109 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/banner-negative.png b/docs/logo/banner-negative.png new file mode 100644 index 00000000..6718373f Binary files /dev/null and b/docs/logo/banner-negative.png differ diff --git a/docs/logo/banner-negative.svg b/docs/logo/banner-negative.svg new file mode 100644 index 00000000..deed96e6 --- /dev/null +++ b/docs/logo/banner-negative.svg @@ -0,0 +1,105 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/banner.png b/docs/logo/banner.png new file mode 100644 index 00000000..33e0e484 Binary files /dev/null and b/docs/logo/banner.png differ diff --git a/docs/logo/banner.svg b/docs/logo/banner.svg new file mode 100644 index 00000000..11ab7df7 --- /dev/null +++ b/docs/logo/banner.svg @@ -0,0 +1,97 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/demo-editable-inkscape.png b/docs/logo/demo-editable-inkscape.png new file mode 100644 index 00000000..70ca467b Binary files /dev/null and b/docs/logo/demo-editable-inkscape.png differ diff --git a/docs/logo/demo-editable-inkscape.svg b/docs/logo/demo-editable-inkscape.svg new file mode 100644 index 00000000..45969b11 --- /dev/null +++ b/docs/logo/demo-editable-inkscape.svg @@ -0,0 +1,888 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + diff --git a/docs/logo/editable-inkscape.png b/docs/logo/editable-inkscape.png new file mode 100644 index 00000000..09036fcc Binary files /dev/null and b/docs/logo/editable-inkscape.png differ diff --git a/docs/logo/editable-inkscape.svg b/docs/logo/editable-inkscape.svg new file mode 100644 index 00000000..1b323a5d --- /dev/null +++ b/docs/logo/editable-inkscape.svg @@ -0,0 +1,150 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + diff --git a/docs/logo/paths-negative.png b/docs/logo/paths-negative.png new file mode 100644 index 00000000..c025f4fd Binary files /dev/null and b/docs/logo/paths-negative.png differ diff --git a/docs/logo/paths-negative.svg b/docs/logo/paths-negative.svg new file mode 100644 index 00000000..23a553d3 --- /dev/null +++ b/docs/logo/paths-negative.svg @@ -0,0 +1,106 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/paths-over-white.png b/docs/logo/paths-over-white.png new file mode 100644 index 00000000..60bbff30 Binary files /dev/null and b/docs/logo/paths-over-white.png differ diff --git a/docs/logo/paths-over-white.svg b/docs/logo/paths-over-white.svg new file mode 100644 index 00000000..3ae3968e --- /dev/null +++ b/docs/logo/paths-over-white.svg @@ -0,0 +1,106 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/paths.png b/docs/logo/paths.png new file mode 100644 index 00000000..3f821254 Binary files /dev/null and b/docs/logo/paths.png differ diff --git a/docs/logo/paths.svg b/docs/logo/paths.svg new file mode 100644 index 00000000..103d294f --- /dev/null +++ b/docs/logo/paths.svg @@ -0,0 +1,98 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/logo/symbol-only.png b/docs/logo/symbol-only.png new file mode 100644 index 00000000..9cf13f8f Binary files /dev/null and b/docs/logo/symbol-only.png differ diff --git a/docs/logo/symbol-only.svg b/docs/logo/symbol-only.svg new file mode 100644 index 00000000..febdb3e4 --- /dev/null +++ b/docs/logo/symbol-only.svg @@ -0,0 +1,46 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/docs/logo/text-only.png b/docs/logo/text-only.png new file mode 100644 index 00000000..0c5500ba Binary files /dev/null and b/docs/logo/text-only.png differ diff --git a/docs/logo/text-only.svg b/docs/logo/text-only.svg new file mode 100644 index 00000000..a59731d4 --- /dev/null +++ b/docs/logo/text-only.svg @@ -0,0 +1,85 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From fb5d174dc77a63861258a8c160483ca711f307aa Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 02:10:57 +0000 Subject: Customise the sphinx theme to reflect the new logo --- changelog.d/2227.doc.2.rst | 2 ++ docs/conf.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 changelog.d/2227.doc.2.rst diff --git a/changelog.d/2227.doc.2.rst b/changelog.d/2227.doc.2.rst new file mode 100644 index 00000000..ebae3155 --- /dev/null +++ b/changelog.d/2227.doc.2.rst @@ -0,0 +1,2 @@ +Added sphinx theme customisations to display the new logo in the sidebar and +use its colours as "accent" in the documentation -- by :user:`abravalheri` diff --git a/docs/conf.py b/docs/conf.py index ba541423..c55af0bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,6 +101,21 @@ default_role = 'any' # HTML theme html_theme = 'furo' +html_static_path = ['logo'] + +html_theme_options = { + "sidebar_hide_name": True, + "light_logo": "paths.png", + "light_css_variables": { + "color-brand-primary": "#336790", # "blue" + "color-brand-content": "#336790", + }, + "dark_logo": "paths-negative.png", + "dark_css_variables": { + "color-brand-primary": "#E5B62F", # "yellow" + "color-brand-content": "#E5B62F", + }, +} # Add support for inline tabs extensions += ['sphinx_inline_tabs'] -- cgit v1.2.1 From 9fd5fb36e9dd634a08b29be759d6e4959b703adc Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 02:27:53 +0000 Subject: Add banner to main docs page --- docs/index.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 2833ab96..52e097be 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,8 @@ -setuptools -========== +.. image:: logo/banner-github.svg + :align: center + +Documentation +============= Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects. -- cgit v1.2.1 From b7c2e2b49ca2db77051410bed87f034306222b42 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 02:39:55 +0000 Subject: Rename logo files --- docs/conf.py | 5 +- docs/images/README.rst | 106 ++++ docs/images/banner-640x320.png | Bin 0 -> 15763 bytes docs/images/banner-640x320.svg | 101 ++++ docs/images/banner-negative-640x320.png | Bin 0 -> 18004 bytes docs/images/banner-negative-640x320.svg | 109 ++++ docs/images/logo-demo-editable-inkscape.png | Bin 0 -> 90174 bytes docs/images/logo-demo-editable-inkscape.svg | 888 ++++++++++++++++++++++++++++ docs/images/logo-editable-inkscape.png | Bin 0 -> 13249 bytes docs/images/logo-editable-inkscape.svg | 150 +++++ docs/images/logo-inline-negative.png | Bin 0 -> 8985 bytes docs/images/logo-inline-negative.svg | 105 ++++ docs/images/logo-inline.png | Bin 0 -> 8216 bytes docs/images/logo-inline.svg | 97 +++ docs/images/logo-negative.png | Bin 0 -> 14594 bytes docs/images/logo-negative.svg | 106 ++++ docs/images/logo-over-white.png | Bin 0 -> 13915 bytes docs/images/logo-over-white.svg | 106 ++++ docs/images/logo-symbol-only.png | Bin 0 -> 8506 bytes docs/images/logo-symbol-only.svg | 46 ++ docs/images/logo-text-only.png | Bin 0 -> 4705 bytes docs/images/logo-text-only.svg | 85 +++ docs/images/logo.png | Bin 0 -> 13208 bytes docs/images/logo.svg | 98 +++ docs/index.rst | 2 +- docs/logo/README.rst | 106 ---- docs/logo/banner-github.png | Bin 15763 -> 0 bytes docs/logo/banner-github.svg | 101 ---- docs/logo/banner-negative-github.png | Bin 18004 -> 0 bytes docs/logo/banner-negative-github.svg | 109 ---- docs/logo/banner-negative.png | Bin 8985 -> 0 bytes docs/logo/banner-negative.svg | 105 ---- docs/logo/banner.png | Bin 8216 -> 0 bytes docs/logo/banner.svg | 97 --- docs/logo/demo-editable-inkscape.png | Bin 90174 -> 0 bytes docs/logo/demo-editable-inkscape.svg | 888 ---------------------------- docs/logo/editable-inkscape.png | Bin 13249 -> 0 bytes docs/logo/editable-inkscape.svg | 150 ----- docs/logo/paths-negative.png | Bin 14594 -> 0 bytes docs/logo/paths-negative.svg | 106 ---- docs/logo/paths-over-white.png | Bin 13915 -> 0 bytes docs/logo/paths-over-white.svg | 106 ---- docs/logo/paths.png | Bin 13208 -> 0 bytes docs/logo/paths.svg | 98 --- docs/logo/symbol-only.png | Bin 8506 -> 0 bytes docs/logo/symbol-only.svg | 46 -- docs/logo/text-only.png | Bin 4705 -> 0 bytes docs/logo/text-only.svg | 85 --- 48 files changed, 2000 insertions(+), 2001 deletions(-) create mode 100644 docs/images/README.rst create mode 100644 docs/images/banner-640x320.png create mode 100644 docs/images/banner-640x320.svg create mode 100644 docs/images/banner-negative-640x320.png create mode 100644 docs/images/banner-negative-640x320.svg create mode 100644 docs/images/logo-demo-editable-inkscape.png create mode 100644 docs/images/logo-demo-editable-inkscape.svg create mode 100644 docs/images/logo-editable-inkscape.png create mode 100644 docs/images/logo-editable-inkscape.svg create mode 100644 docs/images/logo-inline-negative.png create mode 100644 docs/images/logo-inline-negative.svg create mode 100644 docs/images/logo-inline.png create mode 100644 docs/images/logo-inline.svg create mode 100644 docs/images/logo-negative.png create mode 100644 docs/images/logo-negative.svg create mode 100644 docs/images/logo-over-white.png create mode 100644 docs/images/logo-over-white.svg create mode 100644 docs/images/logo-symbol-only.png create mode 100644 docs/images/logo-symbol-only.svg create mode 100644 docs/images/logo-text-only.png create mode 100644 docs/images/logo-text-only.svg create mode 100644 docs/images/logo.png create mode 100644 docs/images/logo.svg delete mode 100644 docs/logo/README.rst delete mode 100644 docs/logo/banner-github.png delete mode 100644 docs/logo/banner-github.svg delete mode 100644 docs/logo/banner-negative-github.png delete mode 100644 docs/logo/banner-negative-github.svg delete mode 100644 docs/logo/banner-negative.png delete mode 100644 docs/logo/banner-negative.svg delete mode 100644 docs/logo/banner.png delete mode 100644 docs/logo/banner.svg delete mode 100644 docs/logo/demo-editable-inkscape.png delete mode 100644 docs/logo/demo-editable-inkscape.svg delete mode 100644 docs/logo/editable-inkscape.png delete mode 100644 docs/logo/editable-inkscape.svg delete mode 100644 docs/logo/paths-negative.png delete mode 100644 docs/logo/paths-negative.svg delete mode 100644 docs/logo/paths-over-white.png delete mode 100644 docs/logo/paths-over-white.svg delete mode 100644 docs/logo/paths.png delete mode 100644 docs/logo/paths.svg delete mode 100644 docs/logo/symbol-only.png delete mode 100644 docs/logo/symbol-only.svg delete mode 100644 docs/logo/text-only.png delete mode 100644 docs/logo/text-only.svg diff --git a/docs/conf.py b/docs/conf.py index c55af0bd..06a61a8c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,16 +101,15 @@ default_role = 'any' # HTML theme html_theme = 'furo' -html_static_path = ['logo'] +html_logo = "images/logo.png" +html_static_path = ['images'] html_theme_options = { "sidebar_hide_name": True, - "light_logo": "paths.png", "light_css_variables": { "color-brand-primary": "#336790", # "blue" "color-brand-content": "#336790", }, - "dark_logo": "paths-negative.png", "dark_css_variables": { "color-brand-primary": "#E5B62F", # "yellow" "color-brand-content": "#E5B62F", diff --git a/docs/images/README.rst b/docs/images/README.rst new file mode 100644 index 00000000..e1dddc1d --- /dev/null +++ b/docs/images/README.rst @@ -0,0 +1,106 @@ +:orphan: + +======= +Artwork +======= + +.. figure:: logo-over-white.svg + :align: center + + Setuptools logo, designed in 2021 by `Anderson Bravalheri`_ + +Elements of Design +================== + +The main colours of the design are a dark pastel azure (``#336790``) and a pale +orange (``#E5B62F``), referred in this document simply as "blue" and "yellow" +respectively. The text uses the *Monoid* typeface, an open source webfont that +was developed by Andreas Larsen and contributors in 2015 and is distributed +under the MIT or SIL licenses (more information at +https://github.com/larsenwork/monoid) + + +Usage +===== + +The preferred way of using the setuptools logo is over a white (or light) +background. Alternatively, the following options can be considered, depending +on the circumstances: + +- *"negative"* design - for dark backgrounds (e.g. website displayed in "dark + mode"): the white colour (``#FFFFFF``) of the background and the "blue" + (``#336790``) colour of the design can be swapped. +- *"monochrome"* - when colours are not available (e.g. black and white printed + media): a completely black or white version of the logo can also be used. +- *"banner"* mode: the symbol and text can be used alongside depending on the + available space. + +The following image illustrate these alternatives: + +.. image:: logo-demo-editable-inkscape.png + :align: center + +Please refer to the SVG files in the `setuptools repository`_ for the specific +shapes and proportions between the elements of the design. + + +Working with the Design +======================= + +The `setuptools repository`_ contains a series of vector representations of the +design under the ``docs/images`` directory. These representations can be +manipulated via any graphic editor that support SVG files, +however the free and open-source software Inkscape_ is recommended for maximum +compatibility. + +When selecting the right file to work with, file names including +``editable-inkscape`` indicate "more editable" elements (e.g. editable text), +while the others prioritise SVG paths for maximum reproducibility. + +Also notice that you might have to `install the correct fonts`_ to be able to +visualise or edit some of the designs. + + +License +======= + + +This logo, design variations or a modified version may be used by anyone to +refer to setuptools, but does not indicate endorsement by the project. + +Redistribution, usage and derivative works are permitted under the same license +used by the setuptools software (MIT): + +.. code-block:: text + + Copyright (c) Anderson Bravalheri + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + THE USAGE OF THIS LOGO AND ARTWORK DOES NOT INDICATE ENDORSEMENT BY THE + SETUPTOOLS PROJECT. + +Whenever possible, please make the image a link to +https://github.com/pypa/setuptools. + + +.. _Anderson Bravalheri: https://github.com/abravalheri +.. _Inkscape: https://inkscape.org +.. _setuptools repository: https://github.com/pypa/setuptools +.. _install the correct fonts: https://wiki.inkscape.org/wiki/Installing_fonts diff --git a/docs/images/banner-640x320.png b/docs/images/banner-640x320.png new file mode 100644 index 00000000..ce7f99f2 Binary files /dev/null and b/docs/images/banner-640x320.png differ diff --git a/docs/images/banner-640x320.svg b/docs/images/banner-640x320.svg new file mode 100644 index 00000000..8222f645 --- /dev/null +++ b/docs/images/banner-640x320.svg @@ -0,0 +1,101 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/banner-negative-640x320.png b/docs/images/banner-negative-640x320.png new file mode 100644 index 00000000..c0126f8b Binary files /dev/null and b/docs/images/banner-negative-640x320.png differ diff --git a/docs/images/banner-negative-640x320.svg b/docs/images/banner-negative-640x320.svg new file mode 100644 index 00000000..fd5535fd --- /dev/null +++ b/docs/images/banner-negative-640x320.svg @@ -0,0 +1,109 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo-demo-editable-inkscape.png b/docs/images/logo-demo-editable-inkscape.png new file mode 100644 index 00000000..70ca467b Binary files /dev/null and b/docs/images/logo-demo-editable-inkscape.png differ diff --git a/docs/images/logo-demo-editable-inkscape.svg b/docs/images/logo-demo-editable-inkscape.svg new file mode 100644 index 00000000..45969b11 --- /dev/null +++ b/docs/images/logo-demo-editable-inkscape.svg @@ -0,0 +1,888 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + + + diff --git a/docs/images/logo-editable-inkscape.png b/docs/images/logo-editable-inkscape.png new file mode 100644 index 00000000..09036fcc Binary files /dev/null and b/docs/images/logo-editable-inkscape.png differ diff --git a/docs/images/logo-editable-inkscape.svg b/docs/images/logo-editable-inkscape.svg new file mode 100644 index 00000000..1b323a5d --- /dev/null +++ b/docs/images/logo-editable-inkscape.svg @@ -0,0 +1,150 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + SETUP + TOOLS + + + + diff --git a/docs/images/logo-inline-negative.png b/docs/images/logo-inline-negative.png new file mode 100644 index 00000000..6718373f Binary files /dev/null and b/docs/images/logo-inline-negative.png differ diff --git a/docs/images/logo-inline-negative.svg b/docs/images/logo-inline-negative.svg new file mode 100644 index 00000000..deed96e6 --- /dev/null +++ b/docs/images/logo-inline-negative.svg @@ -0,0 +1,105 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo-inline.png b/docs/images/logo-inline.png new file mode 100644 index 00000000..33e0e484 Binary files /dev/null and b/docs/images/logo-inline.png differ diff --git a/docs/images/logo-inline.svg b/docs/images/logo-inline.svg new file mode 100644 index 00000000..11ab7df7 --- /dev/null +++ b/docs/images/logo-inline.svg @@ -0,0 +1,97 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo-negative.png b/docs/images/logo-negative.png new file mode 100644 index 00000000..c025f4fd Binary files /dev/null and b/docs/images/logo-negative.png differ diff --git a/docs/images/logo-negative.svg b/docs/images/logo-negative.svg new file mode 100644 index 00000000..23a553d3 --- /dev/null +++ b/docs/images/logo-negative.svg @@ -0,0 +1,106 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo-over-white.png b/docs/images/logo-over-white.png new file mode 100644 index 00000000..60bbff30 Binary files /dev/null and b/docs/images/logo-over-white.png differ diff --git a/docs/images/logo-over-white.svg b/docs/images/logo-over-white.svg new file mode 100644 index 00000000..3ae3968e --- /dev/null +++ b/docs/images/logo-over-white.svg @@ -0,0 +1,106 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo-symbol-only.png b/docs/images/logo-symbol-only.png new file mode 100644 index 00000000..9cf13f8f Binary files /dev/null and b/docs/images/logo-symbol-only.png differ diff --git a/docs/images/logo-symbol-only.svg b/docs/images/logo-symbol-only.svg new file mode 100644 index 00000000..febdb3e4 --- /dev/null +++ b/docs/images/logo-symbol-only.svg @@ -0,0 +1,46 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/docs/images/logo-text-only.png b/docs/images/logo-text-only.png new file mode 100644 index 00000000..0c5500ba Binary files /dev/null and b/docs/images/logo-text-only.png differ diff --git a/docs/images/logo-text-only.svg b/docs/images/logo-text-only.svg new file mode 100644 index 00000000..a59731d4 --- /dev/null +++ b/docs/images/logo-text-only.svg @@ -0,0 +1,85 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/logo.png b/docs/images/logo.png new file mode 100644 index 00000000..3f821254 Binary files /dev/null and b/docs/images/logo.png differ diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 00000000..103d294f --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1,98 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/index.rst b/docs/index.rst index 52e097be..67ac0e7d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,4 +1,4 @@ -.. image:: logo/banner-github.svg +.. image:: logo/banner-640x320.svg :align: center Documentation diff --git a/docs/logo/README.rst b/docs/logo/README.rst deleted file mode 100644 index b42eaf79..00000000 --- a/docs/logo/README.rst +++ /dev/null @@ -1,106 +0,0 @@ -:orphan: - -======= -Artwork -======= - -.. figure:: paths-over-white.svg - :align: center - - Setuptools logo, designed in 2021 by `Anderson Bravalheri`_ - -Elements of Design -================== - -The main colours of the design are a dark pastel azure (``#336790``) and a pale -orange (``#E5B62F``), referred in this document simply as "blue" and "yellow" -respectively. The text uses the *Monoid* typeface, an open source webfont that -was developed by Andreas Larsen and contributors in 2015 and is distributed -under the MIT or SIL licenses (more information at -https://github.com/larsenwork/monoid) - - -Usage -===== - -The preferred way of using the setuptools logo is over a white (or light) -background. Alternatively, the following options can be considered, depending -on the circumstances: - -- *"negative"* design - for dark backgrounds (e.g. website displayed in "dark - mode"): the white colour (``#FFFFFF``) of the background and the "blue" - (``#336790``) colour of the design can be swapped. -- *"monochrome"* - when colours are not available (e.g. black and white printed - media): a completely black or white version of the logo can also be used. -- *"banner"* mode: the symbol and text can be used alongside depending on the - available space. - -The following image illustrate these alternatives: - -.. image:: demo-editable-inkscape.png - :align: center - -Please refer to the SVG files in the `setuptools repository`_ for the specific -shapes and proportions between the elements of the design. - - -Working with the Design -======================= - -The `setuptools repository`_ contains a series of vector representations of the -design under the ``docs/logo`` directory. These representations can be -manipulated via any graphic editor that support SVG files, -however the free and open-source software Inkscape_ is recommended for maximum -compatibility. - -When selecting the right file to work with, file names including -``editable-inkscape`` indicate "more editable" elements (e.g. editable text), -while the others prioritise SVG paths for maximum reproducibility. - -Also notice that you might have to `install the correct fonts`_ to be able to -visualise or edit some of the designs. - - -License -======= - - -This logo, design variations or a modified version may be used by anyone to -refer to setuptools, but does not indicate endorsement by the project. - -Redistribution, usage and derivative works are permitted under the same license -used by the setuptools software (MIT): - -.. code-block:: text - - Copyright (c) Anderson Bravalheri - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - - THE USAGE OF THIS LOGO AND ARTWORK DOES NOT INDICATE ENDORSEMENT BY THE - SETUPTOOLS PROJECT. - -Whenever possible, please make the image a link to -https://github.com/pypa/setuptools. - - -.. _Anderson Bravalheri: https://github.com/abravalheri -.. _Inkscape: https://inkscape.org -.. _setuptools repository: https://github.com/pypa/setuptools -.. _install the correct fonts: https://wiki.inkscape.org/wiki/Installing_fonts diff --git a/docs/logo/banner-github.png b/docs/logo/banner-github.png deleted file mode 100644 index ce7f99f2..00000000 Binary files a/docs/logo/banner-github.png and /dev/null differ diff --git a/docs/logo/banner-github.svg b/docs/logo/banner-github.svg deleted file mode 100644 index 8222f645..00000000 --- a/docs/logo/banner-github.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/banner-negative-github.png b/docs/logo/banner-negative-github.png deleted file mode 100644 index c0126f8b..00000000 Binary files a/docs/logo/banner-negative-github.png and /dev/null differ diff --git a/docs/logo/banner-negative-github.svg b/docs/logo/banner-negative-github.svg deleted file mode 100644 index fd5535fd..00000000 --- a/docs/logo/banner-negative-github.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/banner-negative.png b/docs/logo/banner-negative.png deleted file mode 100644 index 6718373f..00000000 Binary files a/docs/logo/banner-negative.png and /dev/null differ diff --git a/docs/logo/banner-negative.svg b/docs/logo/banner-negative.svg deleted file mode 100644 index deed96e6..00000000 --- a/docs/logo/banner-negative.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/banner.png b/docs/logo/banner.png deleted file mode 100644 index 33e0e484..00000000 Binary files a/docs/logo/banner.png and /dev/null differ diff --git a/docs/logo/banner.svg b/docs/logo/banner.svg deleted file mode 100644 index 11ab7df7..00000000 --- a/docs/logo/banner.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/demo-editable-inkscape.png b/docs/logo/demo-editable-inkscape.png deleted file mode 100644 index 70ca467b..00000000 Binary files a/docs/logo/demo-editable-inkscape.png and /dev/null differ diff --git a/docs/logo/demo-editable-inkscape.svg b/docs/logo/demo-editable-inkscape.svg deleted file mode 100644 index 45969b11..00000000 --- a/docs/logo/demo-editable-inkscape.svg +++ /dev/null @@ -1,888 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - - - diff --git a/docs/logo/editable-inkscape.png b/docs/logo/editable-inkscape.png deleted file mode 100644 index 09036fcc..00000000 Binary files a/docs/logo/editable-inkscape.png and /dev/null differ diff --git a/docs/logo/editable-inkscape.svg b/docs/logo/editable-inkscape.svg deleted file mode 100644 index 1b323a5d..00000000 --- a/docs/logo/editable-inkscape.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - SETUP - TOOLS - - - - diff --git a/docs/logo/paths-negative.png b/docs/logo/paths-negative.png deleted file mode 100644 index c025f4fd..00000000 Binary files a/docs/logo/paths-negative.png and /dev/null differ diff --git a/docs/logo/paths-negative.svg b/docs/logo/paths-negative.svg deleted file mode 100644 index 23a553d3..00000000 --- a/docs/logo/paths-negative.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/paths-over-white.png b/docs/logo/paths-over-white.png deleted file mode 100644 index 60bbff30..00000000 Binary files a/docs/logo/paths-over-white.png and /dev/null differ diff --git a/docs/logo/paths-over-white.svg b/docs/logo/paths-over-white.svg deleted file mode 100644 index 3ae3968e..00000000 --- a/docs/logo/paths-over-white.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/paths.png b/docs/logo/paths.png deleted file mode 100644 index 3f821254..00000000 Binary files a/docs/logo/paths.png and /dev/null differ diff --git a/docs/logo/paths.svg b/docs/logo/paths.svg deleted file mode 100644 index 103d294f..00000000 --- a/docs/logo/paths.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/symbol-only.png b/docs/logo/symbol-only.png deleted file mode 100644 index 9cf13f8f..00000000 Binary files a/docs/logo/symbol-only.png and /dev/null differ diff --git a/docs/logo/symbol-only.svg b/docs/logo/symbol-only.svg deleted file mode 100644 index febdb3e4..00000000 --- a/docs/logo/symbol-only.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/docs/logo/text-only.png b/docs/logo/text-only.png deleted file mode 100644 index 0c5500ba..00000000 Binary files a/docs/logo/text-only.png and /dev/null differ diff --git a/docs/logo/text-only.svg b/docs/logo/text-only.svg deleted file mode 100644 index a59731d4..00000000 --- a/docs/logo/text-only.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1 From 300093105848dfbf2a95f490a92e91620d8199c0 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 03:22:27 +0000 Subject: Add docs/README to the toctree --- docs/conf.py | 1 - docs/images/README.rst | 2 -- docs/index.rst | 11 +++++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 06a61a8c..4f3eb8dc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,7 +102,6 @@ default_role = 'any' # HTML theme html_theme = 'furo' html_logo = "images/logo.png" -html_static_path = ['images'] html_theme_options = { "sidebar_hide_name": True, diff --git a/docs/images/README.rst b/docs/images/README.rst index e1dddc1d..582a44a1 100644 --- a/docs/images/README.rst +++ b/docs/images/README.rst @@ -1,5 +1,3 @@ -:orphan: - ======= Artwork ======= diff --git a/docs/index.rst b/docs/index.rst index 67ac0e7d..b886c8f8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,4 +1,4 @@ -.. image:: logo/banner-640x320.svg +.. image:: images/banner-640x320.svg :align: center Documentation @@ -15,10 +15,17 @@ designed to facilitate packaging Python projects. build_meta pkg_resources references/keywords - roadmap setuptools + +.. toctree:: + :caption: Project + :maxdepth: 1 + :hidden: + + roadmap Development guide Backward compatibility & deprecated practice Changelog + Artwork .. tidelift-referral-banner:: -- cgit v1.2.1 From 57b3810abcfa453b8b00e128fb90b7fa9c3dfe69 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 03:45:56 +0000 Subject: Add a note about inspiration --- docs/images/README.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/images/README.rst b/docs/images/README.rst index 582a44a1..d80dc965 100644 --- a/docs/images/README.rst +++ b/docs/images/README.rst @@ -59,6 +59,18 @@ Also notice that you might have to `install the correct fonts`_ to be able to visualise or edit some of the designs. +Inspiration +=========== + +This design was inspired by :user:`cajhne`'s `original proposal`_ and the +ancient symbol of the ouroboros_. +It features a snake moving in a circular trajectory not only as a reference to +the Python programming language but also to the `wheel package format`_ as one +of the distribution formats supported by setuptools. +The shape of the snake also resembles a cog, which together with the hammer is +a nod to the two words that compose the name of the project. + + License ======= @@ -102,3 +114,6 @@ https://github.com/pypa/setuptools. .. _Inkscape: https://inkscape.org .. _setuptools repository: https://github.com/pypa/setuptools .. _install the correct fonts: https://wiki.inkscape.org/wiki/Installing_fonts +.. _original proposal: https://github.com/pypa/setuptools/issues/2227#issuecomment-653628344 +.. _wheel package format: https://www.python.org/dev/peps/pep-0427/ +.. _ouroboros: https://en.wikipedia.org/wiki/Ouroboros -- cgit v1.2.1 From e7e9548b273b8fd0a99e4b01958c60a44edde0c0 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 4 Nov 2021 13:02:58 +0000 Subject: Add news fragment regarding the fix for #2849 --- changelog.d/2849.change.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/2849.change.rst diff --git a/changelog.d/2849.change.rst b/changelog.d/2849.change.rst new file mode 100644 index 00000000..9c16df1b --- /dev/null +++ b/changelog.d/2849.change.rst @@ -0,0 +1,3 @@ +Add fallback for custom ``build_py`` commands inheriting directly from +:mod:`distutils`, while still handling ``include_package_data=True`` for +``sdist``. -- cgit v1.2.1 From 748d00e8310df05b2667b8024681f0818b07cb12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Nov 2021 18:42:25 -0400 Subject: Mark change as bugfix. --- changelog.d/2849.change.rst | 3 --- changelog.d/2849.misc.rst | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2849.change.rst create mode 100644 changelog.d/2849.misc.rst diff --git a/changelog.d/2849.change.rst b/changelog.d/2849.change.rst deleted file mode 100644 index 9c16df1b..00000000 --- a/changelog.d/2849.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add fallback for custom ``build_py`` commands inheriting directly from -:mod:`distutils`, while still handling ``include_package_data=True`` for -``sdist``. diff --git a/changelog.d/2849.misc.rst b/changelog.d/2849.misc.rst new file mode 100644 index 00000000..9c16df1b --- /dev/null +++ b/changelog.d/2849.misc.rst @@ -0,0 +1,3 @@ +Add fallback for custom ``build_py`` commands inheriting directly from +:mod:`distutils`, while still handling ``include_package_data=True`` for +``sdist``. -- cgit v1.2.1 From 33f4d7e9423bf833b60f5b2b788e932ca4e702ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Nov 2021 18:42:46 -0400 Subject: =?UTF-8?q?Bump=20version:=2058.5.2=20=E2=86=92=2058.5.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 11 +++++++++++ changelog.d/2849.misc.rst | 3 --- setup.cfg | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/2849.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ce559b12..fe2b8e3e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.5.2 +current_version = 58.5.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index cbc7e4a2..72856165 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v58.5.3 +------- + + +Misc +^^^^ +* #2849: Add fallback for custom ``build_py`` commands inheriting directly from + :mod:`distutils`, while still handling ``include_package_data=True`` for + ``sdist``. + + v58.5.2 ------- diff --git a/changelog.d/2849.misc.rst b/changelog.d/2849.misc.rst deleted file mode 100644 index 9c16df1b..00000000 --- a/changelog.d/2849.misc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add fallback for custom ``build_py`` commands inheriting directly from -:mod:`distutils`, while still handling ``include_package_data=True`` for -``sdist``. diff --git a/setup.cfg b/setup.cfg index 631f097c..fdaf6c04 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.5.2 +version = 58.5.3 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From e2220331136c3a60b8d70a6b4eaad05816c9b637 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 14:14:29 +0000 Subject: Use warning instead of log for distutils command As discussed in #2855, using an actual warning instead of the logger allow users to control what gets displayed via warning filters. --- setuptools/command/egg_info.py | 5 +++-- setuptools/tests/test_sdist.py | 20 ++++---------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8ae27d87..f2210292 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -621,10 +621,11 @@ class manifest_maker(sdist): if hasattr(build_py, 'get_data_files_without_manifest'): return build_py.get_data_files_without_manifest() - log.warn( + warnings.warn( "Custom 'build_py' does not implement " "'get_data_files_without_manifest'.\nPlease extend command classes" - " from setuptools instead of distutils." + " from setuptools instead of distutils.", + SetuptoolsDeprecationWarning ) return build_py.get_data_files() diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index e6d8e908..66f46ad0 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -11,6 +11,7 @@ from unittest import mock import pytest import pkg_resources +from setuptools import SetuptoolsDeprecationWarning from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -148,8 +149,7 @@ class TestSdistTest: self.assert_package_data_in_manifest(cmd) - @mock.patch('setuptools.command.egg_info.log') - def test_custom_build_py(self, log_stub): + def test_custom_build_py(self): """ Ensure projects defining custom build_py don't break when creating sdists (issue #2849) @@ -180,25 +180,13 @@ class TestSdistTest: cmd.distribution.cmdclass = {'build_py': CustomBuildPy} assert cmd.distribution.get_command_class('build_py') == CustomBuildPy - with quiet(): + msg = "setuptools instead of distutils" + with quiet(), pytest.warns(SetuptoolsDeprecationWarning, match=msg): cmd.run() using_custom_command_guard.assert_called() self.assert_package_data_in_manifest(cmd) - warn_stub = log_stub.warn - warn_stub.assert_called() - for call in warn_stub.call_args_list: - args, _kw = call - if "setuptools instead of distutils" in args[0]: - return - else: - raise AssertionError( - "The user should have been warned to extend setuptools command" - " classes instead of distutils", - warn_stub.call_args_list - ) - def test_setup_py_exists(self): dist = Distribution(SETUP_ATTRS) dist.script_name = 'foo.py' -- cgit v1.2.1 From 4a979b6f38415d8841f650234dff301ed63658e7 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 14:42:20 +0000 Subject: Add news fragment for deprecated distuils commands --- changelog.d/2856.deprecation.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/2856.deprecation.rst diff --git a/changelog.d/2856.deprecation.rst b/changelog.d/2856.deprecation.rst new file mode 100644 index 00000000..fe4144b4 --- /dev/null +++ b/changelog.d/2856.deprecation.rst @@ -0,0 +1,2 @@ +Support for custom commands that inherit directly from ``distutils`` is +**deprecated**. Users should extend classes provided by setuptools instead. -- cgit v1.2.1 From 974dbb03769a500c5077d37291817f30359a0d7b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 18:44:15 +0000 Subject: Expose distutils errors As mentioned in #2698, exposing distutil errors via setuptools help the migration stated by PEP 632. --- changelog.d/2698.change.rst | 1 + setuptools/errors.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 changelog.d/2698.change.rst diff --git a/changelog.d/2698.change.rst b/changelog.d/2698.change.rst new file mode 100644 index 00000000..138629a2 --- /dev/null +++ b/changelog.d/2698.change.rst @@ -0,0 +1 @@ +Exposed exception classes from ``distutils.errors`` via ``setuptools.errors``. diff --git a/setuptools/errors.py b/setuptools/errors.py index 2701747f..f4d35a63 100644 --- a/setuptools/errors.py +++ b/setuptools/errors.py @@ -3,6 +3,7 @@ Provides exceptions used by setuptools modules. """ +from distutils import errors as _distutils_errors from distutils.errors import DistutilsError @@ -14,3 +15,26 @@ class RemovedCommandError(DistutilsError, RuntimeError): error is raised if a command exists in ``distutils`` but has been actively removed in ``setuptools``. """ + + +# Re-export errors from distutils to facilitate the migration to PEP632 + +ByteCompileError = _distutils_errors.DistutilsByteCompileError +CCompilerError = _distutils_errors.CCompilerError +ClassError = _distutils_errors.DistutilsClassError +CompileError = _distutils_errors.CompileError +ExecError = _distutils_errors.DistutilsExecError +FileError = _distutils_errors.DistutilsFileError +InternalError = _distutils_errors.DistutilsInternalError +LibError = _distutils_errors.LibError +LinkError = _distutils_errors.LinkError +ModuleError = _distutils_errors.DistutilsModuleError +OptionError = _distutils_errors.DistutilsOptionError +PlatformError = _distutils_errors.DistutilsPlatformError +PreprocessError = _distutils_errors.PreprocessError +SetupError = _distutils_errors.DistutilsSetupError +TemplateError = _distutils_errors.DistutilsTemplateError +UnknownFileError = _distutils_errors.UnknownFileError + +# The root error class in the hierarchy +BaseError = _distutils_errors.DistutilsError -- cgit v1.2.1 From eca0111c29721056e8af7ac0d08d5f678fe7473e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 19:03:05 +0000 Subject: Document setuptools replacements --- changelog.d/2698.doc.1.rst | 2 ++ changelog.d/2698.doc.2.rst | 2 ++ docs/deprecated/distutils-legacy.rst | 9 +++++++++ docs/userguide/extension.rst | 8 ++++++++ 4 files changed, 21 insertions(+) create mode 100644 changelog.d/2698.doc.1.rst create mode 100644 changelog.d/2698.doc.2.rst diff --git a/changelog.d/2698.doc.1.rst b/changelog.d/2698.doc.1.rst new file mode 100644 index 00000000..1e4dde38 --- /dev/null +++ b/changelog.d/2698.doc.1.rst @@ -0,0 +1,2 @@ +Added mentions to ``setuptools.errors`` as a way of handling custom command +errors. diff --git a/changelog.d/2698.doc.2.rst b/changelog.d/2698.doc.2.rst new file mode 100644 index 00000000..784dbf2e --- /dev/null +++ b/changelog.d/2698.doc.2.rst @@ -0,0 +1,2 @@ +Added instructions to migrate from ``distutils.commands`` and +``distutils.errors`` in the porting guide. diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index a5d96260..94104fe8 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -18,8 +18,17 @@ As Distutils is deprecated, any usage of functions or objects from distutils is ``distutils.cmd.Command`` → ``setuptools.Command`` +``distutils.command.{build_clib,build_ext,build_py,sdist}`` → ``setuptools.command.*`` + ``distutils.log`` → (no replacement yet) ``distutils.version.*`` → ``packaging.version.*`` +``distutils.errors.*`` → ``setuptools.errors.*`` [#errors]_ + If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker `_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported. + + +.. [#errors] Please notice errors related to the command line usage of + ``setup.py``, such as ``DistutilsArgError``, are intentionally not exposed + by setuptools, since this is considered a deprecated practice. diff --git a/docs/userguide/extension.rst b/docs/userguide/extension.rst index 93b59501..966c6fde 100644 --- a/docs/userguide/extension.rst +++ b/docs/userguide/extension.rst @@ -45,6 +45,14 @@ entry points in the active distributions on ``sys.path``. In fact, this is how setuptools' own commands are installed: the setuptools project's setup script defines entry points for them! +.. note:: + When creating commands, and specially when defining custom ways of building + compiled extensions (for example via ``build_ext``), you might want to + handle exceptions such as ``CompileError``, ``LinkError``, ``LibError``, + among others. These exceptions are available in the ``setuptools.errors`` + module. + + Adding ``setup()`` Arguments ---------------------------- -- cgit v1.2.1 From 864069e51b191b1ffb2e08db00cc72015c06669b Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 19:30:02 +0000 Subject: Add logo/banner to README --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 69135176..8a9d5ac8 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,7 @@ +.. image:: https://github.com/pypa/setuptools/raw/main/docs/images/banner-640x320.svg + +| + .. image:: https://img.shields.io/pypi/v/setuptools.svg :target: `PyPI link`_ -- cgit v1.2.1 From a59fc3e3a63b6139d4a5cd8add11470fad36140e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 19:58:48 +0000 Subject: Add logo/banner to README --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8a9d5ac8..6e7b95cf 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,5 @@ -.. image:: https://github.com/pypa/setuptools/raw/main/docs/images/banner-640x320.svg +.. image:: https://raw.githubusercontent.com/pypa/setuptools/main/docs/images/banner-640x320.svg + :align: center | -- cgit v1.2.1 From 8ffccbdd3b01fb1cf7248e699bcf478169cdb912 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 5 Nov 2021 20:03:03 +0000 Subject: Add favicon and related configuration to sphinx --- docs/conf.py | 1 + docs/images/favicon.ico | Bin 0 -> 8947 bytes docs/images/favicon.svg | 46 ++++++++++++++++++++++++++++++++++++++++++++++ docs/images/favicon.xcf | Bin 0 -> 16667 bytes 4 files changed, 47 insertions(+) create mode 100644 docs/images/favicon.ico create mode 100644 docs/images/favicon.svg create mode 100644 docs/images/favicon.xcf diff --git a/docs/conf.py b/docs/conf.py index 4f3eb8dc..ebb84c48 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,6 +102,7 @@ default_role = 'any' # HTML theme html_theme = 'furo' html_logo = "images/logo.png" +html_favicon = "images/favicon.ico" html_theme_options = { "sidebar_hide_name": True, diff --git a/docs/images/favicon.ico b/docs/images/favicon.ico new file mode 100644 index 00000000..32d6a78d Binary files /dev/null and b/docs/images/favicon.ico differ diff --git a/docs/images/favicon.svg b/docs/images/favicon.svg new file mode 100644 index 00000000..7fc4e38b --- /dev/null +++ b/docs/images/favicon.svg @@ -0,0 +1,46 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/docs/images/favicon.xcf b/docs/images/favicon.xcf new file mode 100644 index 00000000..ea8cdace Binary files /dev/null and b/docs/images/favicon.xcf differ -- cgit v1.2.1 From 439d820b30f9a6d28e79be6a0cb381b7aabcda98 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sat, 6 Nov 2021 19:14:38 +0000 Subject: Improve favicon --- docs/images/favicon.ico | Bin 8947 -> 35622 bytes docs/images/favicon.svg | 27 ++++++++++++--------------- docs/images/favicon.xcf | Bin 16667 -> 18175 bytes 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/images/favicon.ico b/docs/images/favicon.ico index 32d6a78d..152f0633 100644 Binary files a/docs/images/favicon.ico and b/docs/images/favicon.ico differ diff --git a/docs/images/favicon.svg b/docs/images/favicon.svg index 7fc4e38b..6f640f92 100644 --- a/docs/images/favicon.svg +++ b/docs/images/favicon.svg @@ -25,22 +25,19 @@ + transform="matrix(0.98177945,0,0,0.98177945,0.07713364,0.07788224)" + id="g830"> - - - - + transform="translate(-1.4257123e-8,2.7257414e-4)" + id="g843"> + + diff --git a/docs/images/favicon.xcf b/docs/images/favicon.xcf index ea8cdace..2cf5ff27 100644 Binary files a/docs/images/favicon.xcf and b/docs/images/favicon.xcf differ -- cgit v1.2.1 From 172ea3681ce1f2b7da1044c5215cb8058b866324 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Nov 2021 04:51:19 -0500 Subject: Prefer imperative voice. --- docs/userguide/extension.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/extension.rst b/docs/userguide/extension.rst index 966c6fde..d74ca3fe 100644 --- a/docs/userguide/extension.rst +++ b/docs/userguide/extension.rst @@ -47,8 +47,8 @@ script defines entry points for them! .. note:: When creating commands, and specially when defining custom ways of building - compiled extensions (for example via ``build_ext``), you might want to - handle exceptions such as ``CompileError``, ``LinkError``, ``LibError``, + compiled extensions (for example via ``build_ext``), consider + handling exceptions such as ``CompileError``, ``LinkError``, ``LibError``, among others. These exceptions are available in the ``setuptools.errors`` module. -- cgit v1.2.1 From ccd340739c3a01762b4bc8041e7d37c2c0e47256 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 7 Nov 2021 10:00:58 -0800 Subject: distutils/ccompiler.py (CCompiler.has_function): Do not fail if self.outputdir is set --- distutils/ccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/distutils/ccompiler.py b/distutils/ccompiler.py index b38cf261..e390edc7 100644 --- a/distutils/ccompiler.py +++ b/distutils/ccompiler.py @@ -802,7 +802,10 @@ int main (int argc, char **argv) { except (LinkError, TypeError): return False else: - os.remove("a.out") + output_dir = self.output_dir + if output_dir is None: + output_dir = '' + os.remove(os.path.join(output_dir, "a.out")) finally: for fn in objects: os.remove(fn) -- cgit v1.2.1 From b0db51d123250044938e2472690849884986723e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 10:53:50 -0800 Subject: distutils/tests/test_unixccompiler.py (UnixCCompilerTestCase.test_has_function): New --- distutils/tests/test_unixccompiler.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/distutils/tests/test_unixccompiler.py b/distutils/tests/test_unixccompiler.py index ee2fe99c..63c7dd37 100644 --- a/distutils/tests/test_unixccompiler.py +++ b/distutils/tests/test_unixccompiler.py @@ -232,6 +232,13 @@ class UnixCCompilerTestCase(unittest.TestCase): sysconfig.customize_compiler(self.cc) self.assertEqual(self.cc.linker_so[0], 'my_ld') + def test_has_function(self): + # Issue https://github.com/pypa/distutils/issues/64: + # ensure that setting output_dir does not raise + # FileNotFoundError: [Errno 2] No such file or directory: 'a.out' + self.cc.output_dir = 'scratch' + self.cc.has_function('abort', includes=['stdlib.h']) + def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) -- cgit v1.2.1 From 9e98a85a2180d4301e7091c6173f919ddd3e6787 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 8 Nov 2021 13:06:54 -0800 Subject: .github/workflows/main.yml: Add integration testing with setuptools --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a8ff006..947b8551 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,40 @@ jobs: - name: Run tests run: tox + ci_setuptools: + # Integration testing with setuptools + strategy: + matrix: + python: [3.9] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + env: + SETUPTOOLS_USE_DISTUTILS: local + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install tox + run: | + python -m pip install tox + - name: Check out pypa/setuptools + uses: actions/checkout@v2 + with: + repository: pypa/setuptools + ref: main + path: integration/setuptools + - name: Replace vendored distutils + run: | + cd integration/setuptools/setuptools + rm -rf _distutils + cp -rp ../../../distutils _distutils + - name: Run setuptools tests + run: | + cd integration/setuptools + tox + release: needs: test if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') -- cgit v1.2.1 From 7085054dc4c4e936eb3305c6d6141216d88cbf6f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 14:15:23 -0800 Subject: tox.ini (testenv): passenv SETUPTOOLS_USE_DISTUTILS --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 8a48a1cd..ab993608 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,7 @@ commands = usedevelop = True extras = testing passenv = + SETUPTOOLS_USE_DISTUTILS windir # required for test_pkg_resources [testenv:docs] -- cgit v1.2.1 From 88dd936918f4eeaa61e010b481bbc22b0f58844e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 14:15:45 -0800 Subject: .github/workflows/main.yml: Test SETUPTOOLS_USE_DISTUTILS = stdlib, local --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a82b6fd2..265be849 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,9 @@ jobs: test: strategy: matrix: + distutils: + - stdlib + - local python: - pypy3 - 3.6 @@ -16,6 +19,8 @@ jobs: - macos-latest - windows-latest runs-on: ${{ matrix.platform }} + env: + SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} steps: - uses: actions/checkout@v2 - name: Setup Python -- cgit v1.2.1 From 822463194a4720288a2df8c9573d0a1f9726764b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 14:30:40 -0800 Subject: tox.ini (testenv): Add deps = pytest --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ab993608..8940a182 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ toxworkdir={env:TOX_WORK_DIR:.tox} [testenv] deps = + pytest # workaround for sphinx-doc/sphinx#9562 # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" -- cgit v1.2.1 From e59011a5f3eeac75b99a65c0144511c05bce30d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 9 Nov 2021 17:41:49 -0500 Subject: Use simple expression for resolution of outputdir. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Filipe LaĆ­ns --- distutils/ccompiler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/distutils/ccompiler.py b/distutils/ccompiler.py index e390edc7..c9eb709b 100644 --- a/distutils/ccompiler.py +++ b/distutils/ccompiler.py @@ -802,10 +802,7 @@ int main (int argc, char **argv) { except (LinkError, TypeError): return False else: - output_dir = self.output_dir - if output_dir is None: - output_dir = '' - os.remove(os.path.join(output_dir, "a.out")) + os.remove(os.path.join(self.output_dir or '', "a.out")) finally: for fn in objects: os.remove(fn) -- cgit v1.2.1 From 802d8723cb8623b0bed230d0e117a372e040fe8e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 14:53:40 -0800 Subject: tox.ini (testenv): Make sure to import setuptools before distutils when invoking pytest --- tox.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8940a182..21fdd866 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,11 @@ deps = # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" commands = - pytest {posargs} + # We invoke pytest like this to avoid the warning: + # UserWarning: Distutils was imported before Setuptools, + # but importing Setuptools also replaces the `distutils` + # module in `sys.modules`. + pytest -c 'import setuptools; import pytest; pytest.main("{posargs}".split())' usedevelop = True extras = testing passenv = -- cgit v1.2.1 From 5d21da70b7d9f75866d0f9f10f4ea54af74a95b1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Nov 2021 14:59:17 -0800 Subject: .github/workflows/main.yml: fail-fast = false --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 265be849..6751c52c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ jobs: - ubuntu-latest - macos-latest - windows-latest + fail-fast: false runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} -- cgit v1.2.1 From 23f63dd44c5d9f75de195833d25a5f2872220c2b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 12:05:31 -0500 Subject: Add changelog. --- changelog.d/2866.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2866.change.rst diff --git a/changelog.d/2866.change.rst b/changelog.d/2866.change.rst new file mode 100644 index 00000000..c6929d86 --- /dev/null +++ b/changelog.d/2866.change.rst @@ -0,0 +1 @@ +Incorporate changes from pypa/distutils@f1b0a2b. -- cgit v1.2.1 From 77114aede5de44afdec5b5a69dcf0be6aaa10d44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 12:16:08 -0500 Subject: Revert ".github/workflows/main.yml: Add integration testing with setuptools" This reverts commit 9e98a85a2180d4301e7091c6173f919ddd3e6787. That commit was only relevant to pypa/distutils. --- .github/workflows/main.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41490892..a82b6fd2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,40 +35,6 @@ jobs: ${{ runner.os }}, ${{ matrix.python }} - ci_setuptools: - # Integration testing with setuptools - strategy: - matrix: - python: [3.9] - platform: [ubuntu-latest] - runs-on: ${{ matrix.platform }} - env: - SETUPTOOLS_USE_DISTUTILS: local - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install tox - run: | - python -m pip install tox - - name: Check out pypa/setuptools - uses: actions/checkout@v2 - with: - repository: pypa/setuptools - ref: main - path: integration/setuptools - - name: Replace vendored distutils - run: | - cd integration/setuptools/setuptools - rm -rf _distutils - cp -rp ../../../distutils _distutils - - name: Run setuptools tests - run: | - cd integration/setuptools - tox - release: needs: test if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') -- cgit v1.2.1 From d97e83e34d712330cf82427222cd141159e1f7f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 14:45:56 -0500 Subject: Get pytest-virtualenv from the pull request with distutils dependency removed. --- setup.cfg | 2 +- tox.ini | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index fdaf6c04..66cad330 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,7 +55,7 @@ testing = mock flake8-2020 virtualenv>=13.0.0 - pytest-virtualenv>=1.2.7 + pytest-virtualenv @ git+https://github.com/jaraco/pytest-plugins@distutils-deprecated#subdirectory=pytest-virtualenv wheel paver pip>=19.1 # For proper file:// URLs support. diff --git a/tox.ini b/tox.ini index 21fdd866..8940a182 100644 --- a/tox.ini +++ b/tox.ini @@ -12,11 +12,7 @@ deps = # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" commands = - # We invoke pytest like this to avoid the warning: - # UserWarning: Distutils was imported before Setuptools, - # but importing Setuptools also replaces the `distutils` - # module in `sys.modules`. - pytest -c 'import setuptools; import pytest; pytest.main("{posargs}".split())' + pytest {posargs} usedevelop = True extras = testing passenv = -- cgit v1.2.1 From ec1c3f34c67c001843a92d9f81febb3c3dc12846 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 14:48:08 -0500 Subject: Fail fast again. --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6751c52c..265be849 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,6 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - fail-fast: false runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} -- cgit v1.2.1 From 4f3c3a1a1e754f5b253262e8112292ae9f7881a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 16:20:36 -0500 Subject: Filter known deprecation warnings when stdlib distutils is used and imports sysconfig. --- conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conftest.py b/conftest.py index d5e851fe..3f80b495 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,5 @@ import sys +import warnings pytest_plugins = 'setuptools.tests.fixtures' @@ -27,3 +28,11 @@ collect_ignore = [ if sys.version_info < (3, 6): collect_ignore.append('docs/conf.py') # uses f-strings collect_ignore.append('pavement.py') + + +if sys.version_info > (3, 10): + # https://github.com/pypa/setuptools/pull/2865#issuecomment-965700112 + warnings.filterwarnings( + 'ignore', + 'The distutils.sysconfig module is deprecated, use sysconfig instead', + ) -- cgit v1.2.1 From 65fab2fade018f404b323f66fa492d5aadf55001 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 16:27:34 -0500 Subject: Suppress 'Distutils was imported before Setuptools' warning on PyPy due to pypa/setuptools#2868. --- conftest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conftest.py b/conftest.py index 3f80b495..f82b939b 100644 --- a/conftest.py +++ b/conftest.py @@ -36,3 +36,16 @@ if sys.version_info > (3, 10): 'ignore', 'The distutils.sysconfig module is deprecated, use sysconfig instead', ) + + +is_pypy = '__pypy__' in sys.builtin_module_names +if is_pypy: + # Workaround for pypa/setuptools#2868 + warnings.filterwarnings( + 'ignore', + 'Distutils was imported before setuptools', + ) + warnings.filterwarnings( + 'ignore', + 'Setuptools is replacing distutils', + ) -- cgit v1.2.1 From 2ceec37662b7b053ca6ffc328d95ba838bf26a2b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 17:17:18 -0500 Subject: Move warning suppression to pytest.ini so it occurs after 'error'. --- conftest.py | 22 ---------------------- pytest.ini | 12 ++++++++++++ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/conftest.py b/conftest.py index f82b939b..d5e851fe 100644 --- a/conftest.py +++ b/conftest.py @@ -1,5 +1,4 @@ import sys -import warnings pytest_plugins = 'setuptools.tests.fixtures' @@ -28,24 +27,3 @@ collect_ignore = [ if sys.version_info < (3, 6): collect_ignore.append('docs/conf.py') # uses f-strings collect_ignore.append('pavement.py') - - -if sys.version_info > (3, 10): - # https://github.com/pypa/setuptools/pull/2865#issuecomment-965700112 - warnings.filterwarnings( - 'ignore', - 'The distutils.sysconfig module is deprecated, use sysconfig instead', - ) - - -is_pypy = '__pypy__' in sys.builtin_module_names -if is_pypy: - # Workaround for pypa/setuptools#2868 - warnings.filterwarnings( - 'ignore', - 'Distutils was imported before setuptools', - ) - warnings.filterwarnings( - 'ignore', - 'Setuptools is replacing distutils', - ) diff --git a/pytest.ini b/pytest.ini index 2678afd8..df1c2af9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -34,3 +34,15 @@ filterwarnings= # https://github.com/pypa/setuptools/issues/2497 ignore:.* is an invalid version and will not be supported::pkg_resources + + # https://github.com/pypa/setuptools/pull/2865#issuecomment-965700112 + # ideally would apply to Python 3.10+ when + # SETUPTOOLS_USE_DISTUTILS=stdlib but for + # https://github.com/pytest-dev/pytest/discussions/9296 + ignore:The distutils.sysconfig module is deprecated, use sysconfig instead + + # Workaround for pypa/setuptools#2868 + # ideally would apply to PyPy only but for + # https://github.com/pytest-dev/pytest/discussions/9296 + ignore:Distutils was imported before setuptools + ignore:Setuptools is replacing distutils -- cgit v1.2.1 From c0f549533fe9a6d4d4cad157f2dcea860a34fd6e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 17:27:58 -0500 Subject: Remove superfluous dep. --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8940a182..ab993608 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ toxworkdir={env:TOX_WORK_DIR:.tox} [testenv] deps = - pytest # workaround for sphinx-doc/sphinx#9562 # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" -- cgit v1.2.1 From 39e3806dc22c8e47eca12b80c57245615d45b6a2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Nov 2021 21:41:02 -0500 Subject: Disable some virtualenv integration tests for PyPy. --- setuptools/tests/test_virtualenv.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 2abedfc7..5cd49a0f 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -89,6 +89,10 @@ def _get_pip_versions(): return list(versions) +@pytest.mark.skipif( + 'platform.python_implementation() == "PyPy"', + reason="https://github.com/pypa/setuptools/pull/2865#issuecomment-965834995", +) @pytest.mark.parametrize('pip_version', _get_pip_versions()) def test_pip_upgrade_from_source(pip_version, tmp_src, virtualenv): """ -- cgit v1.2.1 From f8fe4a873c5d3d89a939c0576e1c14a8e82c73c8 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 11 Nov 2021 03:43:03 +0100 Subject: Fail on a multiline distribution package summary --- setuptools/dist.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 8e2111a5..e61733d8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -144,12 +144,14 @@ def read_pkg_file(self, file): self.license_files = _read_list_from_msg(msg, 'license-file') -def single_line(val): - # quick and dirty validation for description pypa/setuptools#1390 +def ensure_summary_single_line(val): + """Validate that the summary does not have line breaks.""" + # Ref: https://github.com/pypa/setuptools/issues/1390 if '\n' in val: - # TODO after 2021-07-31: Replace with `raise ValueError("newlines not allowed")` - warnings.warn("newlines not allowed and will break in the future") - val = val.replace('\n', ' ') + raise ValueError( + 'Newlines in the package distribution summary are not allowed', + ) + return val @@ -164,7 +166,7 @@ def write_pkg_file(self, file): # noqa: C901 # is too complex (14) # FIXME write_field('Metadata-Version', str(version)) write_field('Name', self.get_name()) write_field('Version', self.get_version()) - write_field('Summary', single_line(self.get_description())) + write_field('Summary', ensure_summary_single_line(self.get_description())) write_field('Home-page', self.get_url()) optional_fields = ( -- cgit v1.2.1 From 354208206b2146eee0c9117de969d98c9aa8447b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Nov 2021 09:02:31 -0500 Subject: Avoid upgrading setuptools when creating the venv for distutils_adoption tests. Works around issue with upgrading on PyPy. --- setup.cfg | 2 +- setuptools/tests/test_distutils_adoption.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 66cad330..44b1af2b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,7 +59,7 @@ testing = wheel paver pip>=19.1 # For proper file:// URLs support. - jaraco.envs + jaraco.envs>=2.2 pytest-xdist sphinx jaraco.path>=3.2.0 diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 0e89921c..006480dd 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -9,11 +9,13 @@ import jaraco.envs import path -IS_PYPY = '__pypy__' in sys.builtin_module_names - - class VirtualEnv(jaraco.envs.VirtualEnv): name = '.env' + # Some version of PyPy will import distutils on startup, implicitly + # importing setuptools, and thus leading to BackendInvalid errors + # when upgrading Setuptools. Bypass this behavior by avoiding the + # early availability and need to upgrade. + create_opts = ['--no-setuptools'] def run(self, cmd, *args, **kwargs): cmd = [self.exe(cmd[0])] + cmd[1:] @@ -61,7 +63,6 @@ def test_distutils_local_with_setuptools(venv): assert venv.name in loc.split(os.sep) -@pytest.mark.xfail('IS_PYPY', reason='pypy imports distutils on startup') def test_distutils_local(venv): """ Even without importing, the setuptools-local copy of distutils is -- cgit v1.2.1 From 4f475e9035ff40906024249e81b2f7e5b9bebf14 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 11 Nov 2021 15:57:01 +0100 Subject: Document that pip works with editable setup.cfg --- docs/conf.py | 2 ++ docs/userguide/quickstart.rst | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ebb84c48..d352a481 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -171,3 +171,5 @@ towncrier_draft_working_directory = '..' towncrier_draft_include_empty = False extensions += ['jaraco.tidelift'] + +intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index bcb282ed..9c1d84f9 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -186,17 +186,17 @@ For more details, see :doc:`datafiles` Development mode ================ -``setuptools`` allows you to install a package without copying any files -to your interpreter directory (e.g. the ``site-packages`` directory). This -allows you to modify your source code and have the changes take effect without -you having to rebuild and reinstall. This is currently incompatible with -PEP 517 and therefore it requires a ``setup.py`` script with the following -content:: - import setuptools - setuptools.setup() +.. tip:: + + When there is no ``setup.py`` script present, this is only + compatible with :pep:`517` since :ref:`pip v21.1 `. -Then:: +``setuptools`` allows you to install a package without copying any files +to your interpreter directory (e.g. the ``site-packages`` directory). +This allows you to modify your source code and have the changes take +effect without you having to rebuild and reinstall. +Here's how to do it:: pip install --editable . -- cgit v1.2.1 From 818fdb91b45e974b0b7a9593df02c2e06f497b10 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 11 Nov 2021 05:05:40 +0100 Subject: Add a change note for PR #2870 --- changelog.d/2870.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2870.change.rst diff --git a/changelog.d/2870.change.rst b/changelog.d/2870.change.rst new file mode 100644 index 00000000..22a7f218 --- /dev/null +++ b/changelog.d/2870.change.rst @@ -0,0 +1 @@ +Started failing on invalid inline description with line brakes :class:`ValueError` -- by :user:`webknjaz` -- cgit v1.2.1 From 474b3031785d13569cc92fc9280bd5688d4f1f71 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 11 Nov 2021 16:06:49 +0100 Subject: Add a change note for PR #2871 --- changelog.d/2871.doc.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog.d/2871.doc.rst diff --git a/changelog.d/2871.doc.rst b/changelog.d/2871.doc.rst new file mode 100644 index 00000000..2a099d0d --- /dev/null +++ b/changelog.d/2871.doc.rst @@ -0,0 +1,4 @@ +Added a note to the docs that it is possible to install +``setup.py``-less projects in editable mode with :doc:`pip v21.1+ +`, only having ``setup.cfg`` and ``pyproject.toml`` in +project root -- by :user:`webknjaz` -- cgit v1.2.1 From ba6aa7cc011db953ad388a37c482cb00f4fb978d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Nov 2021 21:39:23 -0500 Subject: Bring back the xfail as it appears to be needed at least on macOS. --- setuptools/tests/test_distutils_adoption.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 006480dd..b6b9c00e 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -9,6 +9,9 @@ import jaraco.envs import path +IS_PYPY = '__pypy__' in sys.builtin_module_names + + class VirtualEnv(jaraco.envs.VirtualEnv): name = '.env' # Some version of PyPy will import distutils on startup, implicitly @@ -63,6 +66,7 @@ def test_distutils_local_with_setuptools(venv): assert venv.name in loc.split(os.sep) +@pytest.mark.xfail('IS_PYPY', reason='pypy imports distutils on startup') def test_distutils_local(venv): """ Even without importing, the setuptools-local copy of distutils is -- cgit v1.2.1 From 65d66538b937b083b276ed7058a779ccfa3c44d8 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 12 Nov 2021 23:45:58 +0100 Subject: Fix the word "breaks" in the change note Co-authored-by: Jason R. Coombs --- changelog.d/2870.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2870.change.rst b/changelog.d/2870.change.rst index 22a7f218..1d17ede6 100644 --- a/changelog.d/2870.change.rst +++ b/changelog.d/2870.change.rst @@ -1 +1 @@ -Started failing on invalid inline description with line brakes :class:`ValueError` -- by :user:`webknjaz` +Started failing on invalid inline description with line breaks :class:`ValueError` -- by :user:`webknjaz` -- cgit v1.2.1 From ba39e1851f02fa27b425f616d13c2b07298c63d5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 12 Nov 2021 23:56:44 +0100 Subject: Improve the mention of pip version that doesn't need `setup.py` Co-authored-by: Jason R. Coombs --- docs/userguide/quickstart.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 9c1d84f9..6bf353a0 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -189,8 +189,9 @@ Development mode .. tip:: - When there is no ``setup.py`` script present, this is only - compatible with :pep:`517` since :ref:`pip v21.1 `. + Prior to :ref:`pip v21.1 `, a ``setup.py`` script was + required to be compatible with development mode. With late + versions of pip, any project may be installed in this mode. ``setuptools`` allows you to install a package without copying any files to your interpreter directory (e.g. the ``site-packages`` directory). -- cgit v1.2.1 From f2de34767a7ba6dc79b73e474b3e2ffdbfd6e75b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Nov 2021 18:35:43 -0500 Subject: Skip pip@main tests for Python 3.6, no longer supported. Fixes #2874. Use pip pinned range to resolve pip version based on a repeatable pattern. --- setuptools/tests/test_virtualenv.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 5cd49a0f..00f5f185 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -76,9 +76,14 @@ def _get_pip_versions(): return param if network else mark(param, pytest.mark.skip(reason="no network")) network_versions = [ - mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), - 'pip==20.0.2', - 'https://github.com/pypa/pip/archive/main.zip', + mark('pip<20', pytest.mark.xfail(reason='pypa/pip#6599')), + 'pip<20.1', + 'pip<21', + 'pip<22', + mark( + 'https://github.com/pypa/pip/archive/main.zip', + pytest.mark.skipif('sys.version_info < (3, 7)'), + ), ] versions = itertools.chain( @@ -103,7 +108,7 @@ def test_pip_upgrade_from_source(pip_version, tmp_src, virtualenv): if pip_version is None: upgrade_pip = () else: - upgrade_pip = ('python -m pip install -U {pip_version} --retries=1',) + upgrade_pip = ('python -m pip install -U "{pip_version}" --retries=1',) virtualenv.run(' && '.join(( 'pip uninstall -y setuptools', 'pip install -U wheel', -- cgit v1.2.1 From a4b7caeaa653116b60a5231e9019ab250293c331 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Nov 2021 19:01:55 -0500 Subject: Restore single_line as a simple, universal validator. --- setuptools/dist.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index e61733d8..848d6b0f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -144,13 +144,11 @@ def read_pkg_file(self, file): self.license_files = _read_list_from_msg(msg, 'license-file') -def ensure_summary_single_line(val): - """Validate that the summary does not have line breaks.""" +def single_line(val): + """Validate that the value does not have line breaks.""" # Ref: https://github.com/pypa/setuptools/issues/1390 if '\n' in val: - raise ValueError( - 'Newlines in the package distribution summary are not allowed', - ) + raise ValueError('Newlines are not allowed') return val @@ -166,7 +164,7 @@ def write_pkg_file(self, file): # noqa: C901 # is too complex (14) # FIXME write_field('Metadata-Version', str(version)) write_field('Name', self.get_name()) write_field('Version', self.get_version()) - write_field('Summary', ensure_summary_single_line(self.get_description())) + write_field('Summary', single_line(self.get_description())) write_field('Home-page', self.get_url()) optional_fields = ( -- cgit v1.2.1 From 25d1d5458716f9f80b2c5094461579cfa0fe4469 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Nov 2021 19:03:32 -0500 Subject: Change is backward-incompatible for projects with newlines in the summary. --- changelog.d/2870.breaking.rst | 1 + changelog.d/2870.change.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 changelog.d/2870.breaking.rst delete mode 100644 changelog.d/2870.change.rst diff --git a/changelog.d/2870.breaking.rst b/changelog.d/2870.breaking.rst new file mode 100644 index 00000000..1d17ede6 --- /dev/null +++ b/changelog.d/2870.breaking.rst @@ -0,0 +1 @@ +Started failing on invalid inline description with line breaks :class:`ValueError` -- by :user:`webknjaz` diff --git a/changelog.d/2870.change.rst b/changelog.d/2870.change.rst deleted file mode 100644 index 1d17ede6..00000000 --- a/changelog.d/2870.change.rst +++ /dev/null @@ -1 +0,0 @@ -Started failing on invalid inline description with line breaks :class:`ValueError` -- by :user:`webknjaz` -- cgit v1.2.1 From d212daa48743609fc439d8f5cbb2b4e8effbd55f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Nov 2021 20:00:53 -0500 Subject: =?UTF-8?q?Bump=20version:=2058.5.3=20=E2=86=92=2059.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 34 ++++++++++++++++++++++++++++++++++ changelog.d/2227.doc.1.rst | 2 -- changelog.d/2227.doc.2.rst | 2 -- changelog.d/2698.change.rst | 1 - changelog.d/2698.doc.1.rst | 2 -- changelog.d/2698.doc.2.rst | 2 -- changelog.d/2856.deprecation.rst | 2 -- changelog.d/2866.change.rst | 1 - changelog.d/2870.breaking.rst | 1 - changelog.d/2871.doc.rst | 4 ---- setup.cfg | 2 +- 12 files changed, 36 insertions(+), 19 deletions(-) delete mode 100644 changelog.d/2227.doc.1.rst delete mode 100644 changelog.d/2227.doc.2.rst delete mode 100644 changelog.d/2698.change.rst delete mode 100644 changelog.d/2698.doc.1.rst delete mode 100644 changelog.d/2698.doc.2.rst delete mode 100644 changelog.d/2856.deprecation.rst delete mode 100644 changelog.d/2866.change.rst delete mode 100644 changelog.d/2870.breaking.rst delete mode 100644 changelog.d/2871.doc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index fe2b8e3e..2bcedf6c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.5.3 +current_version = 59.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index c2f59497..0caed661 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,37 @@ +v59.0.0 +------- + + +Deprecations +^^^^^^^^^^^^ +* #2856: Support for custom commands that inherit directly from ``distutils`` is + **deprecated**. Users should extend classes provided by setuptools instead. + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2870: Started failing on invalid inline description with line breaks :class:`ValueError` -- by :user:`webknjaz` + +Changes +^^^^^^^ +* #2698: Exposed exception classes from ``distutils.errors`` via ``setuptools.errors``. +* #2866: Incorporate changes from pypa/distutils@f1b0a2b. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2227: Added sphinx theme customisations to display the new logo in the sidebar and + use its colours as "accent" in the documentation -- by :user:`abravalheri` +* #2227: Added new setuptools logo, including editable files and artwork documentation + -- by :user:`abravalheri` +* #2698: Added mentions to ``setuptools.errors`` as a way of handling custom command + errors. +* #2698: Added instructions to migrate from ``distutils.commands`` and + ``distutils.errors`` in the porting guide. +* #2871: Added a note to the docs that it is possible to install + ``setup.py``-less projects in editable mode with :doc:`pip v21.1+ + `, only having ``setup.cfg`` and ``pyproject.toml`` in + project root -- by :user:`webknjaz` + + v58.5.3 ------- diff --git a/changelog.d/2227.doc.1.rst b/changelog.d/2227.doc.1.rst deleted file mode 100644 index ba7acb7f..00000000 --- a/changelog.d/2227.doc.1.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added new setuptools logo, including editable files and artwork documentation --- by :user:`abravalheri` diff --git a/changelog.d/2227.doc.2.rst b/changelog.d/2227.doc.2.rst deleted file mode 100644 index ebae3155..00000000 --- a/changelog.d/2227.doc.2.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added sphinx theme customisations to display the new logo in the sidebar and -use its colours as "accent" in the documentation -- by :user:`abravalheri` diff --git a/changelog.d/2698.change.rst b/changelog.d/2698.change.rst deleted file mode 100644 index 138629a2..00000000 --- a/changelog.d/2698.change.rst +++ /dev/null @@ -1 +0,0 @@ -Exposed exception classes from ``distutils.errors`` via ``setuptools.errors``. diff --git a/changelog.d/2698.doc.1.rst b/changelog.d/2698.doc.1.rst deleted file mode 100644 index 1e4dde38..00000000 --- a/changelog.d/2698.doc.1.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added mentions to ``setuptools.errors`` as a way of handling custom command -errors. diff --git a/changelog.d/2698.doc.2.rst b/changelog.d/2698.doc.2.rst deleted file mode 100644 index 784dbf2e..00000000 --- a/changelog.d/2698.doc.2.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added instructions to migrate from ``distutils.commands`` and -``distutils.errors`` in the porting guide. diff --git a/changelog.d/2856.deprecation.rst b/changelog.d/2856.deprecation.rst deleted file mode 100644 index fe4144b4..00000000 --- a/changelog.d/2856.deprecation.rst +++ /dev/null @@ -1,2 +0,0 @@ -Support for custom commands that inherit directly from ``distutils`` is -**deprecated**. Users should extend classes provided by setuptools instead. diff --git a/changelog.d/2866.change.rst b/changelog.d/2866.change.rst deleted file mode 100644 index c6929d86..00000000 --- a/changelog.d/2866.change.rst +++ /dev/null @@ -1 +0,0 @@ -Incorporate changes from pypa/distutils@f1b0a2b. diff --git a/changelog.d/2870.breaking.rst b/changelog.d/2870.breaking.rst deleted file mode 100644 index 1d17ede6..00000000 --- a/changelog.d/2870.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Started failing on invalid inline description with line breaks :class:`ValueError` -- by :user:`webknjaz` diff --git a/changelog.d/2871.doc.rst b/changelog.d/2871.doc.rst deleted file mode 100644 index 2a099d0d..00000000 --- a/changelog.d/2871.doc.rst +++ /dev/null @@ -1,4 +0,0 @@ -Added a note to the docs that it is possible to install -``setup.py``-less projects in editable mode with :doc:`pip v21.1+ -`, only having ``setup.cfg`` and ``pyproject.toml`` in -project root -- by :user:`webknjaz` diff --git a/setup.cfg b/setup.cfg index 44b1af2b..6bcc3696 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.5.3 +version = 59.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1 From 9f20fce31c8b8c923602679a51ee6780e81e2993 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 14 Nov 2021 17:14:34 +0000 Subject: Avoid using dependencies with URLs on setup.cfg PyPI does not accept this kind of dependencies. An alternative is to overwrite the dependency in tox.ini --- setup.cfg | 2 +- tox.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6bcc3696..e60544f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,7 +55,7 @@ testing = mock flake8-2020 virtualenv>=13.0.0 - pytest-virtualenv @ git+https://github.com/jaraco/pytest-plugins@distutils-deprecated#subdirectory=pytest-virtualenv + pytest-virtualenv>=1.2.7 # TODO: Update once man-group/pytest-plugins#188 is solved wheel paver pip>=19.1 # For proper file:// URLs support. diff --git a/tox.ini b/tox.ini index ab993608..25b4eaf0 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ deps = # workaround for sphinx-doc/sphinx#9562 # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" + # TODO: remove after man-group/pytest-plugins#188 is solved + pytest-virtualenv @ git+https://github.com/jaraco/pytest-plugins@distutils-deprecated#subdirectory=pytest-virtualenv commands = pytest {posargs} usedevelop = True -- cgit v1.2.1 From d4e829c0a8ded29a00efeb4e5f294b4a3086b886 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 14 Nov 2021 17:36:59 +0000 Subject: Add news fragment --- changelog.d/2880.misc.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/2880.misc.rst diff --git a/changelog.d/2880.misc.rst b/changelog.d/2880.misc.rst new file mode 100644 index 00000000..1ad35057 --- /dev/null +++ b/changelog.d/2880.misc.rst @@ -0,0 +1,3 @@ +Removed URL requirement for ``pytest-virtualenv`` in ``setup.cfg``. +PyPI rejects packages with dependencies external to itself. +Instead the test dependency was overwritten via ``tox.ini`` -- cgit v1.2.1 From 5141c4210c2a63a3bb54f0f512e4116faedc8d63 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 14 Nov 2021 15:04:51 -0500 Subject: =?UTF-8?q?Bump=20version:=2059.0.0=20=E2=86=92=2059.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 11 +++++++++++ changelog.d/2880.misc.rst | 3 --- setup.cfg | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/2880.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2bcedf6c..3be75098 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 59.0.0 +current_version = 59.0.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 0caed661..2ba54410 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v59.0.1 +------- + + +Misc +^^^^ +* #2880: Removed URL requirement for ``pytest-virtualenv`` in ``setup.cfg``. + PyPI rejects packages with dependencies external to itself. + Instead the test dependency was overwritten via ``tox.ini`` + + v59.0.0 ------- diff --git a/changelog.d/2880.misc.rst b/changelog.d/2880.misc.rst deleted file mode 100644 index 1ad35057..00000000 --- a/changelog.d/2880.misc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Removed URL requirement for ``pytest-virtualenv`` in ``setup.cfg``. -PyPI rejects packages with dependencies external to itself. -Instead the test dependency was overwritten via ``tox.ini`` diff --git a/setup.cfg b/setup.cfg index e60544f0..088f54d6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 59.0.0 +version = 59.0.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- cgit v1.2.1