Skip to content

Commit 551f244

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

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
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.txt

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
here = os.path.dirname(__file__)
1414

15+
sys.path.append('build-deps.zip')
16+
1517

1618
def require_metadata():
1719
"Prevent improper installs without necessary metadata. See #659"

0 commit comments

Comments
 (0)