summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-02-28 16:41:06 -0500
committerGitHub <noreply@github.com>2021-02-28 16:41:06 -0500
commit341972d1c1e804361e3b910e4e564a5da77bfa34 (patch)
tree4473b0d04f9583da5483f8b75efae38dd4d84714
parent0c63d161ecb96514c4b271abbee74ad952f2c537 (diff)
parentce7632f3a75ab8771ec3bc71cf21136a22de55ff (diff)
downloadpython-setuptools-git-341972d1c1e804361e3b910e4e564a5da77bfa34.tar.gz
Merge pull request #2582 from pypa/feature/2550-build-from-source
Rely on backend build path and bootstrap metadata to easily build from source
-rw-r--r--MANIFEST.in1
-rw-r--r--bootstrap.egg-info/PKG-INFO2
-rw-r--r--bootstrap.egg-info/entry_points.txt14
-rw-r--r--changelog.d/2582.breaking.rst1
-rw-r--r--pyproject.toml1
-rw-r--r--setup.cfg2
-rw-r--r--setuptools/tests/test_virtualenv.py22
7 files changed, 34 insertions, 9 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index eba40c5d..3e8f09de 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -15,4 +15,3 @@ include launcher.c
include msvc-build-launcher.cmd
include pytest.ini
include tox.ini
-exclude pyproject.toml # Temporary workaround for #1644.
diff --git a/bootstrap.egg-info/PKG-INFO b/bootstrap.egg-info/PKG-INFO
new file mode 100644
index 00000000..6e11ceeb
--- /dev/null
+++ b/bootstrap.egg-info/PKG-INFO
@@ -0,0 +1,2 @@
+Name: setuptools-bootstrap
+Version: 1.0
diff --git a/bootstrap.egg-info/entry_points.txt b/bootstrap.egg-info/entry_points.txt
new file mode 100644
index 00000000..834d674e
--- /dev/null
+++ b/bootstrap.egg-info/entry_points.txt
@@ -0,0 +1,14 @@
+[distutils.commands]
+egg_info = setuptools.command.egg_info:egg_info
+
+[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
+
+[egg_info.writers]
+PKG-INFO = setuptools.command.egg_info:write_pkg_info
+dependency_links.txt = setuptools.command.egg_info:overwrite_arg
+entry_points.txt = setuptools.command.egg_info:write_entries
+requires.txt = setuptools.command.egg_info:write_requirements
diff --git a/changelog.d/2582.breaking.rst b/changelog.d/2582.breaking.rst
new file mode 100644
index 00000000..908ababe
--- /dev/null
+++ b/changelog.d/2582.breaking.rst
@@ -0,0 +1 @@
+Simplified build-from-source story by providing bootstrapping metadata in a separate egg-info directory. Build requirements no longer include setuptools itself. Sdist once again includes the pyproject.toml. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9.
diff --git a/pyproject.toml b/pyproject.toml
index 58659eab..70e3473d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,5 @@
[build-system]
requires = [
- "setuptools >= 40.8",
"wheel",
]
build-backend = "setuptools.build_meta"
diff --git a/setup.cfg b/setup.cfg
index f4bf489a..7adf8569 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -41,7 +41,7 @@ exclude =
testing =
# upstream
pytest >= 3.5, !=3.7.3
- pytest-checkdocs >= 1.2.3
+ pytest-checkdocs >= 2.4
pytest-flake8
pytest-black >= 0.3.7; python_implementation != "PyPy"
pytest-cov
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py
index fcd5da5d..f13f7997 100644
--- a/setuptools/tests/test_virtualenv.py
+++ b/setuptools/tests/test_virtualenv.py
@@ -1,6 +1,7 @@
import glob
import os
import sys
+import itertools
import pathlib
@@ -65,20 +66,29 @@ def _get_pip_versions():
# No network, disable most of these tests
network = False
+ def mark(param, *marks):
+ if not isinstance(param, type(pytest.param(''))):
+ param = pytest.param(param)
+ return param._replace(marks=param.marks + marks)
+
+ def skip_network(param):
+ return param if network else mark(param, pytest.mark.skip(reason="no network"))
+
network_versions = [
'pip==9.0.3',
'pip==10.0.1',
'pip==18.1',
- 'pip==19.0.1',
+ mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')),
+ 'pip==20.0.2',
'https://github.com/pypa/pip/archive/master.zip',
]
- versions = [None] + [
- pytest.param(v, **({} if network else {'marks': pytest.mark.skip}))
- for v in network_versions
- ]
+ versions = itertools.chain(
+ [None],
+ map(skip_network, network_versions)
+ )
- return versions
+ return list(versions)
@pytest.mark.parametrize('pip_version', _get_pip_versions())