[bumpversion]
-current_version = 62.6.0
+current_version = 63.0.0
commit = True
tag = True
fail-fast: false
max-parallel: 32
matrix:
- tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, centos-7, centos-stream-8, centos-stream-9, gentoo-python3.9, archlinux-latest, opensuse-15, opensuse-15.3, opensuse-tumbleweed, slackware-14.2, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386]
+ tox_system_factor: [ubuntu-trusty-toolchain-gcc_9, ubuntu-xenial-toolchain-gcc_9, ubuntu-bionic, ubuntu-focal, ubuntu-hirsute, ubuntu-impish, ubuntu-jammy, ubuntu-kinetic, debian-stretch, debian-buster, debian-bullseye, debian-bookworm, debian-sid, linuxmint-19, linuxmint-19.3, linuxmint-20.1, linuxmint-20.2, linuxmint-20.3, linuxmint-21, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, fedora-33, fedora-34, fedora-35, fedora-36, fedora-37, centos-7-devtoolset-gcc_11, centos-stream-8, gentoo-python3.9, gentoo-python3.10, archlinux-latest, opensuse-15.3, opensuse-tumbleweed, ubuntu-bionic-i386, manylinux-2_24-i686, debian-buster-i386, centos-7-i386-devtoolset-gcc_11]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
git,
- name: Run tests
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
- run: tox
+ run: |
+ git config --global --add safe.directory "$(cygpath -u "$GITHUB_WORKSPACE")" # workaround for #3408
+ tox
integration-test:
needs: test
+v63.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #3421: Drop setuptools' support for installing an entrypoint extra requirements at load time:
+ - the functionality has been broken since v60.8.0.
+ - the mechanism to do so is deprecated (`fetch_build_eggs`).
+ - that use case (e.g. a custom command class entrypoint) is covered by making sure the necessary build requirements are declared.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #3305: Updated the example pyproject.toml -- by :user:`jacalata`
+* #3394: This updates the documentation for the ``file_finders`` hook so that
+ the logging recommendation aligns with the suggestion to not use
+ ``distutils`` directly.
+* #3397: Fix reference for ``keywords`` to point to the Core Metadata Specification
+ instead of PEP 314 (the live standard is kept always up-to-date and
+ consolidates several PEPs together in a single document).
+* #3402: Reordered the User Guide's Table of Contents -- by :user:`codeandfire`
+
+
v62.6.0
-------
Changes
^^^^^^^
* #3347: Changed warnings and documentation notes about *experimental* aspect of ``pyproject.toml`` configuration:
- now ``[pyproject]`` is a fully supported configuration interface, but the ``[tool.setuptools]`` table
+ now ``[project]`` is a fully supported configuration interface, but the ``[tool.setuptools]`` table
and sub-tables are still considered to be in **beta** stage.
* #3383: In _distutils_hack, suppress/undo the use of local distutils when select tests are imported in CPython.
``keywords``
A list of strings or a comma-separated string providing descriptive
- meta-data. See: `PEP 0314`_.
-
-.. _PEP 0314: https://www.python.org/dev/peps/pep-0314/
+ meta-data. See: :ref:`Core Metadata Specifications<core-metadata-keywords>`.
.. _keyword/platforms:
-"Development Mode"
-==================
+Development Mode
+================
Under normal circumstances, the ``setuptools`` assume that you are going to
build a distribution of your project, not use it in its "raw" or "unbuilt"
* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully
with the absence of needed programs (i.e., ones belonging to the revision
- control system itself. It *may*, however, use ``distutils.log.warn()`` to
+ control system itself. It *may*, however, use ``logging.warning()`` to
inform the user of the missing program(s).
process. Please check the :doc:`/userguide/quickstart` for an overview of
the workflow.
-Also note that ``setuptools`` is what is know in the community as :pep:`build
+Also note that ``setuptools`` is what is known in the community as :pep:`build
backend <517#terminology-and-goals>`, user facing interfaces are provided by tools
such as :pypi:`pip` and :pypi:`build`. To use ``setuptools``, one must
explicitly create a ``pyproject.toml`` file as described :doc:`/build_meta`.
quickstart
package_discovery
- entry_point
dependency_management
- ext_modules
- datafiles
development_mode
+ entry_point
+ datafiles
+ ext_modules
distribution
+ miscellaneous
extension
declarative_config
pyproject_config
- miscellaneous
---
a full specification for the keywords supplied to ``setup.cfg`` or
``setup.py`` can be found at :doc:`keywords reference </references/keywords>`
-.. note::
- the examples provided here are only to demonstrate the functionality
+.. important::
+ The examples provided here are only to demonstrate the functionality
introduced. More metadata and options arguments need to be supplied
if you want to replicate them on your system. If you are completely
- new to setuptools, the :doc:`quickstart section <quickstart>` is a good
- place to start.
+ new to setuptools, the :doc:`quickstart` section is a good place to start.
``Setuptools`` provides powerful tools to handle package discovery, including
support for namespace packages.
Automatic discovery
===================
-.. warning:: Automatic discovery is an **beta** feature and might change
- (or be completely removed) in the future.
- See :ref:`custom-discovery` for a stable way of configuring ``setuptools``.
+.. warning:: Automatic discovery is a **beta** feature and might change in the future.
+ See :ref:`custom-discovery` for other methods of discovery.
By default ``setuptools`` will consider 2 popular project layouts, each one with
its own set of advantages and disadvantages [#layout1]_ [#layout2]_ as
directory::
project_root_directory
- ├── pyproject.toml
- ├── setup.cfg # or setup.py
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
├── ...
└── src/
└── mypkg/
The package folder(s) are placed directly under the project root::
project_root_directory
- ├── pyproject.toml
- ├── setup.cfg # or setup.py
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
├── ...
└── mypkg/
├── __init__.py
inside a package folder::
project_root_directory
- ├── pyproject.toml
- ├── setup.cfg # or setup.py
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
├── ...
└── single_file_lib.py
it, consider the following directory::
mypkg
- ├── setup.cfg # and/or setup.py, pyproject.toml
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
└── src
├── pkg1
│ └── __init__.py
[options.packages.find]
where = src
include = pkg*
- exclude = additional
+ # alternatively: `exclude = additional*`
.. note::
``pkg`` does not contain an ``__init__.py`` file, therefore
# ...
packages=find_packages(
where='src',
- include=['pkg*'],
- exclude=['additional'],
+ include=['pkg*'], # alternatively: `exclude=['additional*']`
),
package_dir={"": "src"}
# ...
[tool.setuptools.packages.find]
where = ["src"]
- include = ["pkg*"]
- exclude = ["additional"]
+ include = ["pkg*"] # alternatively: `exclude = ["additional*"]`
namespaces = false
.. note::
by creating a project directory organized as follows::
foo
- ├── setup.cfg # and/or setup.py, pyproject.toml
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
└── src
└── timmins
└── foo
cumbersome to accomplish the same result. Historically, there were two methods
to create namespace packages. One is the ``pkg_resources`` style supported by
``setuptools`` and the other one being ``pkgutils`` style offered by
-``pkgutils`` module in Python. Both are now considered deprecated despite the
+``pkgutils`` module in Python. Both are now considered *deprecated* despite the
fact they still linger in many existing packages. These two differ in many
subtle yet significant aspects and you can find out more on `Python packaging
user guide <https://packaging.python.org/guides/packaging-namespace-packages/>`_.
.. code-block:: bash
foo
- ├── setup.cfg # and/or setup.py, pyproject.toml
+ ├── pyproject.toml # AND/OR setup.cfg, setup.py
└── src
└── timmins
├── __init__.py
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
-The project layout remains the same and ``setup.cfg`` remains the same.
+The project layout remains the same and ``pyproject.toml/setup.cfg`` remains the same.
----
name = "my_package"
description = "My package description"
readme = "README.rst"
+ requires-python = ">=3.7"
keywords = ["one", "two"]
license = {text = "BSD 3-Clause License"}
classifiers = [
[project.scripts]
my-script = "my_package.module:function"
+ # ... other project metadata fields as specified in:
+ # https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
.. _setuptools-table:
[metadata]
name = setuptools
-version = 62.6.0
+version = 63.0.0
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
+++ /dev/null
-Copyright Jason R. Coombs
-
-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.
+++ /dev/null
-Metadata-Version: 2.1
-Name: nspektr
-Version: 0.3.0
-Summary: package inspector
-Home-page: https://github.com/jaraco/nspektr
-Author: Jason R. Coombs
-Author-email: jaraco@jaraco.com
-License: UNKNOWN
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.7
-License-File: LICENSE
-Requires-Dist: jaraco.context
-Requires-Dist: jaraco.functools
-Requires-Dist: more-itertools
-Requires-Dist: packaging
-Requires-Dist: importlib-metadata (>=3.6) ; python_version < "3.10"
-Provides-Extra: docs
-Requires-Dist: sphinx ; extra == 'docs'
-Requires-Dist: jaraco.packaging (>=9) ; extra == 'docs'
-Requires-Dist: rst.linker (>=1.9) ; extra == 'docs'
-Provides-Extra: testing
-Requires-Dist: pytest (>=6) ; extra == 'testing'
-Requires-Dist: pytest-checkdocs (>=2.4) ; extra == 'testing'
-Requires-Dist: pytest-flake8 ; extra == 'testing'
-Requires-Dist: pytest-cov ; extra == 'testing'
-Requires-Dist: pytest-enabler (>=1.0.1) ; extra == 'testing'
-Requires-Dist: pytest-black (>=0.3.7) ; (platform_python_implementation != "PyPy") and extra == 'testing'
-Requires-Dist: pytest-mypy (>=0.9.1) ; (platform_python_implementation != "PyPy") and extra == 'testing'
-
-.. image:: https://img.shields.io/pypi/v/nspektr.svg
- :target: `PyPI link`_
-
-.. image:: https://img.shields.io/pypi/pyversions/nspektr.svg
- :target: `PyPI link`_
-
-.. _PyPI link: https://pypi.org/project/nspektr
-
-.. image:: https://github.com/jaraco/nspektr/workflows/tests/badge.svg
- :target: https://github.com/jaraco/nspektr/actions?query=workflow%3A%22tests%22
- :alt: tests
-
-.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
- :target: https://github.com/psf/black
- :alt: Code style: Black
-
-.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest
-.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2022-informational
- :target: https://blog.jaraco.com/skeleton
-
-
+++ /dev/null
-nspektr-0.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4\r
-nspektr-0.3.0.dist-info/LICENSE,sha256=2z8CRrH5J48VhFuZ_sR4uLUG63ZIeZNyL4xuJUKF-vg,1050\r
-nspektr-0.3.0.dist-info/METADATA,sha256=X0stV4vwFBDBxvzhBl4kAHVdGWPIjEitqAuTJItcQH0,2162\r
-nspektr-0.3.0.dist-info/RECORD,,\r
-nspektr-0.3.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0\r
-nspektr-0.3.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92\r
-nspektr-0.3.0.dist-info/top_level.txt,sha256=uEA20Ixo04XS3wOIt5-Jk5ZuMkBrtlleFipRr8Y1SjQ,8\r
-nspektr/__init__.py,sha256=d6-d-ZlGAQQP-MEi_NZMiyn2vLbq8Hw3HxICgm3X0Q8,3949\r
-nspektr/__pycache__/__init__.cpython-310.pyc,,\r
-nspektr/__pycache__/_compat.cpython-310.pyc,,\r
-nspektr/_compat.py,sha256=2QoozYhuhgow_NMUATmhoM-yppBV3jiZYQgdiP-ww0s,582\r
+++ /dev/null
-Wheel-Version: 1.0
-Generator: bdist_wheel (0.37.1)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
+++ /dev/null
-import itertools
-import functools
-import contextlib
-
-from setuptools.extern.packaging.requirements import Requirement
-from setuptools.extern.packaging.version import Version
-from setuptools.extern.more_itertools import always_iterable
-from setuptools.extern.jaraco.context import suppress
-from setuptools.extern.jaraco.functools import apply
-
-from ._compat import metadata, repair_extras
-
-
-def resolve(req: Requirement) -> metadata.Distribution:
- """
- Resolve the requirement to its distribution.
-
- Ignore exception detail for Python 3.9 compatibility.
-
- >>> resolve(Requirement('pytest<3')) # doctest: +IGNORE_EXCEPTION_DETAIL
- Traceback (most recent call last):
- ...
- importlib.metadata.PackageNotFoundError: No package metadata was found for pytest<3
- """
- dist = metadata.distribution(req.name)
- if not req.specifier.contains(Version(dist.version), prereleases=True):
- raise metadata.PackageNotFoundError(str(req))
- dist.extras = req.extras # type: ignore
- return dist
-
-
-@apply(bool)
-@suppress(metadata.PackageNotFoundError)
-def is_satisfied(req: Requirement):
- return resolve(req)
-
-
-unsatisfied = functools.partial(itertools.filterfalse, is_satisfied)
-
-
-class NullMarker:
- @classmethod
- def wrap(cls, req: Requirement):
- return req.marker or cls()
-
- def evaluate(self, *args, **kwargs):
- return True
-
-
-def find_direct_dependencies(dist, extras=None):
- """
- Find direct, declared dependencies for dist.
- """
- simple = (
- req
- for req in map(Requirement, always_iterable(dist.requires))
- if NullMarker.wrap(req).evaluate(dict(extra=None))
- )
- extra_deps = (
- req
- for req in map(Requirement, always_iterable(dist.requires))
- for extra in always_iterable(getattr(dist, 'extras', extras))
- if NullMarker.wrap(req).evaluate(dict(extra=extra))
- )
- return itertools.chain(simple, extra_deps)
-
-
-def traverse(items, visit):
- """
- Given an iterable of items, traverse the items.
-
- For each item, visit is called to return any additional items
- to include in the traversal.
- """
- while True:
- try:
- item = next(items)
- except StopIteration:
- return
- yield item
- items = itertools.chain(items, visit(item))
-
-
-def find_req_dependencies(req):
- with contextlib.suppress(metadata.PackageNotFoundError):
- dist = resolve(req)
- yield from find_direct_dependencies(dist)
-
-
-def find_dependencies(dist, extras=None):
- """
- Find all reachable dependencies for dist.
-
- dist is an importlib.metadata.Distribution (or similar).
- TODO: create a suitable protocol for type hint.
-
- >>> deps = find_dependencies(resolve(Requirement('nspektr')))
- >>> all(isinstance(dep, Requirement) for dep in deps)
- True
- >>> not any('pytest' in str(dep) for dep in deps)
- True
- >>> test_deps = find_dependencies(resolve(Requirement('nspektr[testing]')))
- >>> any('pytest' in str(dep) for dep in test_deps)
- True
- """
-
- def visit(req, seen=set()):
- if req in seen:
- return ()
- seen.add(req)
- return find_req_dependencies(req)
-
- return traverse(find_direct_dependencies(dist, extras), visit)
-
-
-class Unresolved(Exception):
- def __iter__(self):
- return iter(self.args[0])
-
-
-def missing(ep):
- """
- Generate the unresolved dependencies (if any) of ep.
- """
- return unsatisfied(find_dependencies(ep.dist, repair_extras(ep.extras)))
-
-
-def check(ep):
- """
- >>> ep, = metadata.entry_points(group='console_scripts', name='pip')
- >>> check(ep)
- >>> dist = metadata.distribution('nspektr')
-
- Since 'docs' extras are not installed, requesting them should fail.
-
- >>> ep = metadata.EntryPoint(
- ... group=None, name=None, value='nspektr [docs]')._for(dist)
- >>> check(ep)
- Traceback (most recent call last):
- ...
- nspektr.Unresolved: [...]
- """
- missed = list(missing(ep))
- if missed:
- raise Unresolved(missed)
+++ /dev/null
-import contextlib
-import sys
-
-
-if sys.version_info >= (3, 10):
- import importlib.metadata as metadata
-else:
- import setuptools.extern.importlib_metadata as metadata # type: ignore # noqa: F401
-
-
-def repair_extras(extras):
- """
- Repair extras that appear as match objects.
-
- python/importlib_metadata#369 revealed a flaw in the EntryPoint
- implementation. This function wraps the extras to ensure
- they are proper strings even on older implementations.
- """
- with contextlib.suppress(AttributeError):
- return list(item.group(0) for item in extras)
- return extras
jaraco.text==3.7.0
importlib_resources==5.4.0
importlib_metadata==4.11.1
-nspektr==0.3.0
# required for importlib_metadata on older Pythons
typing_extensions==4.0.1
# required for importlib_resources and _metadata on older Pythons
self.mkpath(self.egg_info)
os.utime(self.egg_info, None)
for ep in metadata.entry_points(group='egg_info.writers'):
- self.distribution._install_dependencies(ep)
writer = ep.load()
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
from setuptools.extern import packaging
from setuptools.extern import ordered_set
from setuptools.extern.more_itertools import unique_everseen, partition
-from setuptools.extern import nspektr
from ._importlib import metadata
for ep in metadata.entry_points(group='distutils.setup_keywords'):
value = getattr(self, ep.name, None)
if value is not None:
- self._install_dependencies(ep)
ep.load()(self, ep.name, value)
- def _install_dependencies(self, ep):
- """
- Given an entry point, ensure that any declared extras for
- its distribution are installed.
- """
- for req in nspektr.missing(ep):
- # fetch_build_egg expects pkg_resources.Requirement
- self.fetch_build_egg(pkg_resources.Requirement(str(req)))
-
def get_egg_cache_dir(self):
egg_cache_dir = os.path.join(os.curdir, '.eggs')
if not os.path.exists(egg_cache_dir):
eps = metadata.entry_points(group='distutils.commands', name=command)
for ep in eps:
- self._install_dependencies(ep)
self.cmdclass[command] = cmdclass = ep.load()
return cmdclass
else:
names = (
'packaging', 'pyparsing', 'ordered_set', 'more_itertools', 'importlib_metadata',
- 'zipp', 'importlib_resources', 'jaraco', 'typing_extensions', 'nspektr', 'tomli',
+ 'zipp', 'importlib_resources', 'jaraco', 'typing_extensions', 'tomli',
)
VendorImporter(__name__, names, 'setuptools._vendor').install()
def test_setup_requires_with_transitive_extra_dependency(
self, monkeypatch):
- # Use case: installing a package with a build dependency on
- # an already installed `dep[extra]`, which in turn depends
- # on `extra_dep` (whose is not already installed).
+ '''
+ Use case: installing a package with a build dependency on
+ an already installed `dep[extra]`, which in turn depends
+ on `extra_dep` (whose is not already installed).
+ '''
with contexts.save_pkg_resources_state():
with contexts.tempdir() as temp_dir:
# Create source distribution for `extra_dep`.
monkeypatch.setenv(str('PIP_TIMEOUT'), str('0'))
run_setup(test_setup_py, [str('--version')])
+ def test_setup_requires_with_distutils_command_dep(self, monkeypatch):
+ '''
+ Use case: ensure build requirements' extras
+ are properly installed and activated.
+ '''
+ with contexts.save_pkg_resources_state():
+ with contexts.tempdir() as temp_dir:
+ # Create source distribution for `extra_dep`.
+ make_sdist(os.path.join(temp_dir, 'extra_dep-1.0.tar.gz'), [
+ ('setup.py',
+ DALS("""
+ import setuptools
+ setuptools.setup(
+ name='extra_dep',
+ version='1.0',
+ py_modules=['extra_dep'],
+ )
+ """)),
+ ('setup.cfg', ''),
+ ('extra_dep.py', ''),
+ ])
+ # Create source tree for `epdep`.
+ dep_pkg = os.path.join(temp_dir, 'epdep')
+ os.mkdir(dep_pkg)
+ path.build({
+ 'setup.py':
+ DALS("""
+ import setuptools
+ setuptools.setup(
+ name='dep', version='2.0',
+ py_modules=['epcmd'],
+ extras_require={'extra': ['extra_dep']},
+ entry_points='''
+ [distutils.commands]
+ epcmd = epcmd:epcmd [extra]
+ ''',
+ )
+ """),
+ 'setup.cfg': '',
+ 'epcmd.py': DALS("""
+ from distutils.command.build_py import build_py
+
+ import extra_dep
+
+ class epcmd(build_py):
+ pass
+ """),
+ }, prefix=dep_pkg)
+ # "Install" dep.
+ run_setup(
+ os.path.join(dep_pkg, 'setup.py'), [str('dist_info')])
+ working_set.add_entry(dep_pkg)
+ # Create source tree for test package.
+ test_pkg = os.path.join(temp_dir, 'test_pkg')
+ test_setup_py = os.path.join(test_pkg, 'setup.py')
+ os.mkdir(test_pkg)
+ with open(test_setup_py, 'w') as fp:
+ fp.write(DALS(
+ '''
+ from setuptools import installer, setup
+ setup(setup_requires='dep[extra]')
+ '''))
+ # Check...
+ monkeypatch.setenv(str('PIP_FIND_LINKS'), str(temp_dir))
+ monkeypatch.setenv(str('PIP_NO_INDEX'), str('1'))
+ monkeypatch.setenv(str('PIP_RETRIES'), str('0'))
+ monkeypatch.setenv(str('PIP_TIMEOUT'), str('0'))
+ run_setup(test_setup_py, ['epcmd'])
+
def make_trivial_sdist(dist_path, distname, version):
"""
more_file.write_text(text)
-def rewrite_nspektr(pkg_files: Path, new_root):
- for file in pkg_files.glob('*.py'):
- text = file.read_text()
- text = re.sub(r' (more_itertools)', rf' {new_root}.\1', text)
- text = re.sub(r' (jaraco\.\w+)', rf' {new_root}.\1', text)
- text = re.sub(r' (packaging)', rf' {new_root}.\1', text)
- text = re.sub(r' (importlib_metadata)', rf' {new_root}.\1', text)
- file.write_text(text)
-
-
def clean(vendor):
"""
Remove all files out of the vendor directory except the meta
rewrite_importlib_resources(vendor / 'importlib_resources', 'setuptools.extern')
rewrite_importlib_metadata(vendor / 'importlib_metadata', 'setuptools.extern')
rewrite_more_itertools(vendor / "more_itertools")
- rewrite_nspektr(vendor / "nspektr", 'setuptools.extern')
__name__ == '__main__' and update_vendored()