Skip to content

Commit a590d1b

Browse files
committed
Bundle the build dependencies to re-enable source builds. Fixes #980.
1 parent 92c5667 commit a590d1b

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ setuptools.egg-info
1313
*.swp
1414
*~
1515
.hg*
16-
requirements.txt
16+
build-deps.zip

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v34.3.0
2+
-------
3+
4+
* #980: Re-enable building of setuptools from source by
5+
bundling its build dependencies.
6+
17
v34.2.0
28
-------
39

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ include launcher.c
1212
include msvc-build-launcher.cmd
1313
include pytest.ini
1414
include tox.ini
15+
include build-deps.zip

bootstrap.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,20 @@ def install_deps():
8989
shutil.rmtree(tmpdir)
9090

9191

92+
def bundle_deps():
93+
"""
94+
Generate 'build-deps.zip'
95+
"""
96+
gen_deps()
97+
with install_deps() as dir:
98+
shutil.make_archive('build-deps', 'zip', dir)
99+
os.remove('requirements.txt')
100+
101+
92102
def main():
103+
bundle_deps()
93104
ensure_egg_info()
94-
gen_deps()
95-
try:
96-
# first assume dependencies are present
97-
run_egg_info()
98-
except Exception:
99-
# but if that fails, try again with dependencies just in time
100-
with install_deps():
101-
run_egg_info()
105+
run_egg_info()
102106

103107

104108
__name__ == '__main__' and main()

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import sys
99
import textwrap
1010

11-
import setuptools
12-
1311
here = os.path.dirname(__file__)
12+
sys.path.insert(0, os.path.abspath(os.path.join(here, 'build-deps.zip')))
13+
14+
import setuptools
1415

1516

1617
def require_metadata():

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[testenv]
22
deps=
33
-rtests/requirements.txt
4-
-rrequirements.txt
54
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR
65
commands=py.test {posargs:-rsx}
76
usedevelop=True

0 commit comments

Comments
 (0)