|
42 | 42 | import os
|
43 | 43 | import shutil
|
44 | 44 | import site
|
45 |
| -import tempfile |
46 | 45 | import logging
|
47 | 46 | from distutils.core import setup, Extension
|
48 | 47 | from distutils.sysconfig import get_config_var, get_config_vars
|
@@ -83,6 +82,7 @@ def __init__(self, lib_name, package_spec, url):
|
83 | 82 | self.url = url
|
84 | 83 |
|
85 | 84 | def download(self):
|
| 85 | + import tempfile |
86 | 86 | package_pattern = os.environ.get("GINSTALL_PACKAGE_PATTERN", None)
|
87 | 87 | package_version_pattern = os.environ.get("GINSTALL_PACKAGE_VERSION_PATTERN", None)
|
88 | 88 | tempdir = tempfile.mkdtemp()
|
@@ -173,6 +173,7 @@ def install(self, build_dir=None):
|
173 | 173 | return self.lib_install_dir
|
174 | 174 |
|
175 | 175 | def conftest(self):
|
| 176 | + import tempfile |
176 | 177 | src = b'''#include <bzlib.h>
|
177 | 178 | #include <stdio.h>
|
178 | 179 |
|
@@ -260,12 +261,13 @@ def __call__(self):
|
260 | 261 |
|
261 | 262 |
|
262 | 263 | builtin_exts = (
|
263 |
| - NativeBuiltinModule("_bz2", deps=[Bzip2Depedency("bz2", "bzip2==1.0.8", "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz")]), |
264 | 264 | NativeBuiltinModule("_cpython_sre"),
|
265 | 265 | NativeBuiltinModule("_cpython_unicodedata"),
|
266 | 266 | NativeBuiltinModule("_memoryview"),
|
267 | 267 | NativeBuiltinModule("_mmap"),
|
268 | 268 | NativeBuiltinModule("_struct"),
|
| 269 | + # the above modules are more core, we need them first to deal with later, more complex modules with dependencies |
| 270 | + NativeBuiltinModule("_bz2", deps=[Bzip2Depedency("bz2", "bzip2==1.0.8", "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz")]), |
269 | 271 | )
|
270 | 272 |
|
271 | 273 |
|
|
0 commit comments