[bumpversion]
-current_version = 65.6.3
+current_version = 65.7.0
commit = True
tag = True
# Request colored output from CLI tools supporting it. Different tools
# interpret the value differently. For some, just being set is sufficient.
# For others, it must be a non-zero integer. For yet others, being set
- # to a non-empty value is sufficient.
- FORCE_COLOR: -106
+ # to a non-empty value is sufficient. For tox, it must be one of
+ # <blank>, 0, 1, false, no, off, on, true, yes. The only enabling value
+ # in common is "1".
+ FORCE_COLOR: 1
# MyPy's color enforcement (must be a non-zero number)
MYPY_FORCE_COLOR: -42
# Recognized by the `py` package, dependency of `pytest` (must be "1")
test:
strategy:
matrix:
- distutils:
- - local
python:
- "3.7"
- - "3.10"
- # disabled due to #3365
- # - "3.11"
+ - "3.11"
+ - "3.12"
# Workaround for actions/setup-python#508
dev:
- -dev
- macos-latest
- windows-latest
include:
+ - python: "3.8"
+ platform: ubuntu-latest
+ - python: "3.9"
+ platform: ubuntu-latest
+ - python: "3.10"
+ platform: ubuntu-latest
- python: pypy3.9
platform: ubuntu-latest
+ distutils: stdlib
- platform: ubuntu-latest
python: "3.10"
distutils: stdlib
runs-on: ${{ matrix.platform }}
+ continue-on-error: ${{ matrix.python == '3.12' }}
env:
- SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
+ SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils || 'local' }}
timeout-minutes: 75
steps:
- uses: actions/checkout@v3
VM-${{ matrix.platform }},
Py-${{ steps.python-install.outputs.python-version }}
+ docs:
+ runs-on: ubuntu-latest
+ env:
+ TOXENV: docs
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python }}${{ matrix.dev }}
+ - name: Install tox
+ run: |
+ python -m pip install tox
+ - name: Run tests
+ run: tox
+
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- integration-test
- test
+ - docs
- test_cygwin
runs-on: ubuntu-latest
+v65.7.0
+-------
+
+
+Changes
+^^^^^^^
+* #3594: Added ``htmlcov`` to FlatLayoutModuleFinder.DEFAULT_EXCLUDE -- by :user:`demianbrecht`
+* #3667: Added a human-readable error description when ``.egg-info`` directory is not writeable -- by :user:`droodev`
+
+Misc
+^^^^
+* #3713: Fixed incomplete ``getattr`` statement that caused problems when accessing
+ undefined attribute.
+
+
v65.6.3
-------
.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg
:target: https://setuptools.pypa.io
-.. image:: https://img.shields.io/badge/skeleton-2022-informational
+.. image:: https://img.shields.io/badge/skeleton-2023-informational
:target: https://blog.jaraco.com/skeleton
.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
build_sdist = _orig.build_sdist
- def get_requires_for_build_wheel(self, config_settings=None):
+ def get_requires_for_build_wheel(config_settings=None):
return _orig.get_requires_for_build_wheel(config_settings) + [...]
- def get_requires_for_build_sdist(self, config_settings=None):
+ def get_requires_for_build_sdist(config_settings=None):
return _orig.get_requires_for_build_sdist(config_settings) + [...]
-#!/usr/bin/env python3
-
extensions = [
'sphinx.ext.autodoc',
'jaraco.packaging.sphinx',
('envvar', 'DISTUTILS_DEBUG'), # undocumented
('envvar', 'HOME'), # undocumented
('envvar', 'PLAT'), # undocumented
+ ('envvar', 'DIST_EXTRA_CONFIG'), # undocumented
('py:attr', 'CCompiler.language_map'), # undocumented
('py:attr', 'CCompiler.language_order'), # undocumented
('py:class', 'distutils.dist.Distribution'), # undocumented
Unless ``SETUPTOOLS_USE_DISTUTILS=stdlib``, they will have no effect on the build process.
You can still use a global user config file, ``~/.pydistutils.cfg`` (POSIX) or ``%USERPROFILE%/pydistutils.cfg`` (Windows),
- or use the environment variable :doc:`DIST_EXTRA_CONFIG <deprecated/distutils/configfile>` to point to another
+ or use the environment variable :ref:`DIST_EXTRA_CONFIG <setup-config>` to point to another
supplementary configuration file.
``distutils.core.setup`` → ``setuptools.setup``
-``distutils.cmd.Command`` → ``setuptools.Command``
+``distutils.cmd.Command`` or ``distutils.core.Command`` → ``setuptools.Command``
``distutils.command.{build_clib,build_ext,build_py,sdist}`` → ``setuptools.command.*``
[metadata]
name = my_package
version = attr: my_package.VERSION
+ author = Josiah Carberry
+ author_email = josiah_carberry@brown.edu
description = My package description
long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst
keywords = one, two
- license = BSD 3-Clause License
+ python_requires = >=3.7
+ license = BSD-3-Clause
classifiers =
Framework :: Django
Programming Language :: Python :: 3
[project]
name = "my_package"
+ authors = [
+ {name = "Josiah Carberry", email = "josiah_carberry@brown.edu"},
+ ]
description = "My package description"
readme = "README.rst"
requires-python = ">=3.7"
keywords = ["one", "two"]
- license = {text = "BSD 3-Clause License"}
+ license = {text = "BSD-3-Clause"}
classifiers = [
"Framework :: Django",
"Programming Language :: Python :: 3",
Key Directive Notes
========================== =================== =================================================================================================
``version`` ``attr``, ``file``
-``readme`` ``file``
-``description`` ``file`` One-line text
+``readme`` ``file`` Here you can also set ``"content-type"``:
+
+ ``readme = {file = ["README", "USAGE"], content-type = "text/plain"}``
+
+ If ``content-type`` is not given, ``"text/x-rst"`` is used by default.
+``description`` ``file`` One-line text (no line breaks)
``classifiers`` ``file`` Multi-line text with one classifier per line
``entry-points`` ``file`` INI format following :doc:`PyPUG:specifications/entry-points`
(``console_scripts`` and ``gui_scripts`` can be included)
-``dependencies`` ``file`` ``requirements.txt`` format (``#`` comments and blank lines excluded) **BETA**
-``optional-dependencies`` ``file`` ``requirements.txt`` format per group (``#`` comments and blank lines excluded) **BETA**
+``dependencies`` ``file`` *subset* of the ``requirements.txt`` format
+ (``#`` comments and blank lines excluded) **BETA**
+``optional-dependencies`` ``file`` *subset* of the ``requirements.txt`` format per group
+ (``#`` comments and blank lines excluded) **BETA**
========================== =================== =================================================================================================
Supporting ``file`` for dependencies is meant for a convenience for packaging
error
## upstream
+ # Ensure ResourceWarnings are emitted
+ default::ResourceWarning
+
# Suppress deprecation warning in flake8
ignore:SelectableGroups dict interface is deprecated::flake8
[metadata]
name = setuptools
-version = 65.6.3
+version = 65.7.0
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
# upstream
pytest >= 6
pytest-checkdocs >= 2.4
- pytest-flake8
+ pytest-flake8; \
+ # workaround for tholo/pytest-flake8#87
+ python_version < "3.12"
# workaround for tholo/pytest-flake8#87
flake8 < 5
pytest-black >= 0.3.7; \
jaraco.packaging >= 9
rst.linker >= 1.9
furo
+ sphinx-lint
+
+ # tidelift
jaraco.tidelift >= 1.4
# local
def run(self):
self.mkpath(self.egg_info)
- os.utime(self.egg_info, None)
+ try:
+ os.utime(self.egg_info, None)
+ except OSError as e:
+ msg = f"Cannot update time stamp of directory '{self.egg_info}'"
+ raise distutils.errors.DistutilsFileError(msg) from e
for ep in metadata.entry_points(group='egg_info.writers'):
writer = ep.load()
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
# `ini2toml` backfills include_package_data=False when nothing is explicitly given,
# therefore setting a default here is backwards compatible.
orig_setuptools_table = setuptools_table.copy()
- if dist and getattr(dist, "include_package_data") is not None:
+ if dist and getattr(dist, "include_package_data", None) is not None:
setuptools_table.setdefault("include-package-data", dist.include_package_data)
else:
setuptools_table.setdefault("include-package-data", True)
"benchmarks",
"exercise",
"exercises",
+ "htmlcov",
# ---- Hidden files/Private modules ----
"[._]*",
)
site_packages.mkdir(parents=True)
# install workaround
- pip_run.launch.inject_sitecustomize(str(site_packages))
+ pip_run.launch.inject_sitecustomize(site_packages)
env = dict(os.environ, PYTHONPATH=str(site_packages))
cmd = [
import time
from typing import List, Tuple
from pathlib import Path
+from unittest import mock
import pytest
from jaraco import path
]
assert sorted(actual) == expected
+ def test_handling_utime_error(self, tmpdir_cwd, env):
+ dist = Distribution()
+ ei = egg_info(dist)
+ utime_patch = mock.patch('os.utime', side_effect=OSError("TEST"))
+ mkpath_patch = mock.patch(
+ 'setuptools.command.egg_info.egg_info.mkpath', return_val=None
+ )
+
+ with utime_patch, mkpath_patch:
+ import distutils.errors
+
+ msg = r"Cannot update time stamp of directory 'None'"
+ with pytest.raises(distutils.errors.DistutilsFileError, match=msg):
+ ei.run()
+
def test_license_is_a_string(self, tmpdir_cwd, env):
setup_config = DALS("""
[metadata]
pytest_virtualenv may not work. if it doesn't, skip these
tests. See #1284.
"""
- venv_prefix = venv.run(["python" , "-c", "import sys; print(sys.prefix)"]).strip()
+ venv_prefix = venv.run(["python", "-c", "import sys; print(sys.prefix)"]).strip()
if venv_prefix == sys.prefix:
pytest.skip("virtualenv is broken (see pypa/setuptools#1284)")
'pip_version',
[
None,
- pytest.param('pip<20', marks=pytest.mark.xfail(reason='pypa/pip#6599')),
- 'pip<20.1',
- 'pip<21',
- 'pip<22',
+ pytest.param(
+ 'pip<20.1',
+ marks=pytest.mark.xfail(
+ 'sys.version_info > (3, 12)',
+ reason="pip 22 requried for Python 3.12 and later",
+ ),
+ ),
+ pytest.param(
+ 'pip<21',
+ marks=pytest.mark.xfail(
+ 'sys.version_info > (3, 12)',
+ reason="pip 22 requried for Python 3.12 and later",
+ ),
+ ),
+ pytest.param(
+ 'pip<22',
+ marks=pytest.mark.xfail(
+ 'sys.version_info > (3, 12)',
+ reason="pip 22 requried for Python 3.12 and later",
+ ),
+ ),
+ 'pip<23',
pytest.param(
'https://github.com/pypa/pip/archive/main.zip',
marks=pytest.mark.xfail(reason='#2975'),
),
- ]
+ ],
)
-def test_pip_upgrade_from_source(pip_version, venv_without_setuptools,
- setuptools_wheel, setuptools_sdist):
+def test_pip_upgrade_from_source(
+ pip_version, venv_without_setuptools, setuptools_wheel, setuptools_sdist
+):
"""
Check pip can upgrade setuptools from source.
"""
"""
Check the test command will install all required dependencies.
"""
+
def sdist(distname, version):
dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version))
make_nspkg_sdist(str(dist_path), distname, version)
return dist_path
+
dependency_links = [
pathlib.Path(str(dist_path)).as_uri()
for dist_path in (
)
]
with tmpdir.join('setup.py').open('w') as fp:
- fp.write(DALS(
- '''
+ fp.write(
+ DALS(
+ '''
from setuptools import setup
setup(
""",
}}
)
- '''.format(dependency_links=dependency_links)))
+ '''.format(
+ dependency_links=dependency_links
+ )
+ )
+ )
with tmpdir.join('test.py').open('w') as fp:
- fp.write(DALS(
- '''
+ fp.write(
+ DALS(
+ '''
import foobar
import bits
import bobs
import pieces
open('success', 'w').close()
- '''))
+ '''
+ )
+ )
cmd = ["python", 'setup.py', 'test', '-s', 'test']
venv.run(cmd, cwd=str(tmpdir))
changedir = docs
commands =
python -m sphinx -W --keep-going . {toxinidir}/build/html
+ python -m sphinxlint
[testenv:finalize]
skip_install = True