relenv 0.20.1__tar.gz → 0.20.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {relenv-0.20.1/relenv.egg-info → relenv-0.20.2}/PKG-INFO +1 -1
- {relenv-0.20.1 → relenv-0.20.2}/relenv/build/common.py +1 -12
- {relenv-0.20.1 → relenv-0.20.2}/relenv/common.py +12 -4
- {relenv-0.20.1 → relenv-0.20.2}/relenv/runtime.py +2 -18
- {relenv-0.20.1 → relenv-0.20.2/relenv.egg-info}/PKG-INFO +1 -1
- {relenv-0.20.1 → relenv-0.20.2}/tests/conftest.py +3 -1
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_build.py +1 -2
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_common.py +2 -2
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_verify_build.py +99 -56
- {relenv-0.20.1 → relenv-0.20.2}/LICENSE.md +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/MANIFEST.in +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/NOTICE +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/README.md +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/pyproject.toml +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/__init__.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/__main__.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/_scripts/install_vc_build.ps1 +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/build/__init__.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/build/darwin.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/build/linux.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/build/windows.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/buildenv.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/check.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/create.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/fetch.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/manifest.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/pyversions.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/relocate.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv/toolchain.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv.egg-info/SOURCES.txt +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv.egg-info/dependency_links.txt +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv.egg-info/entry_points.txt +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv.egg-info/requires.txt +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/relenv.egg-info/top_level.txt +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/setup.cfg +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/setup.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/__init__.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_create.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_downloads.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_fips_photon.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_relocate.py +0 -0
- {relenv-0.20.1 → relenv-0.20.2}/tests/test_runtime.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: relenv
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.2
|
|
4
4
|
Project-URL: Source Code, https://github.com/saltstack/relative-environment-for-python
|
|
5
5
|
Project-URL: Documentation, https://relenv.readthedocs.io/en/latest/
|
|
6
6
|
Project-URL: Changelog, https://relenv.readthedocs.io/en/latest/changelog.html
|
|
@@ -115,18 +115,7 @@ else:
|
|
|
115
115
|
|
|
116
116
|
buildroot = pydir.parent.parent
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
toolchain = ""
|
|
120
|
-
ppbt = None
|
|
121
|
-
try:
|
|
122
|
-
import ppbt
|
|
123
|
-
except ImportError:
|
|
124
|
-
pass
|
|
125
|
-
if ppbt:
|
|
126
|
-
env = ppbt.environ(auto_extract=True)
|
|
127
|
-
toolchain = pathlib.Path(env["TOOLCHAIN_PATH"])
|
|
128
|
-
else:
|
|
129
|
-
toolchain = DATA_DIR / "toolchain" / get_triplet()
|
|
118
|
+
toolchain = DATA_DIR / "toolchain" / get_triplet()
|
|
130
119
|
|
|
131
120
|
build_time_vars = {}
|
|
132
121
|
for key in _build_time_vars:
|
|
@@ -18,7 +18,7 @@ import threading
|
|
|
18
18
|
import time
|
|
19
19
|
|
|
20
20
|
# relenv package version
|
|
21
|
-
__version__ = "0.20.
|
|
21
|
+
__version__ = "0.20.2"
|
|
22
22
|
|
|
23
23
|
MODULE_DIR = pathlib.Path(__file__).resolve().parent
|
|
24
24
|
|
|
@@ -229,16 +229,24 @@ def get_toolchain(arch=None, root=None):
|
|
|
229
229
|
"""
|
|
230
230
|
if sys.platform != "linux":
|
|
231
231
|
return DATA_DIR
|
|
232
|
+
|
|
233
|
+
TOOLCHAIN_ROOT = DATA_DIR / "toolchain"
|
|
234
|
+
TOOLCHAIN_PATH = TOOLCHAIN_ROOT / get_triplet()
|
|
235
|
+
if TOOLCHAIN_PATH.exists():
|
|
236
|
+
return TOOLCHAIN_PATH
|
|
237
|
+
|
|
232
238
|
ppbt = None
|
|
233
239
|
|
|
234
240
|
try:
|
|
235
|
-
import ppbt
|
|
241
|
+
import ppbt.common
|
|
236
242
|
except ImportError:
|
|
237
243
|
pass
|
|
238
244
|
|
|
239
245
|
if ppbt:
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
DATA_DIR.mkdir(exist_ok=True)
|
|
247
|
+
TOOLCHAIN_ROOT.mkdir(exist_ok=True)
|
|
248
|
+
ppbt.common.extract_archive(str(TOOLCHAIN_ROOT), str(ppbt.common.ARCHIVE))
|
|
249
|
+
return TOOLCHAIN_PATH
|
|
242
250
|
|
|
243
251
|
|
|
244
252
|
def get_triplet(machine=None, plat=None):
|
|
@@ -611,17 +611,9 @@ def wrap_pip_build_wheel(name):
|
|
|
611
611
|
def wrapper(*args, **kwargs):
|
|
612
612
|
if sys.platform != "linux":
|
|
613
613
|
return func(*args, **kwargs)
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
):
|
|
617
|
-
raise RuntimeError("No toolchain installed")
|
|
614
|
+
base_dir = common().DATA_DIR / "toolchain"
|
|
615
|
+
toolchain = base_dir / common().get_triplet()
|
|
618
616
|
cargo_home = install_cargo_config.tmpdir.name
|
|
619
|
-
toolchain = common().get_toolchain()
|
|
620
|
-
if not toolchain:
|
|
621
|
-
if os.environ.get("RELENV_BUILDENV", 0):
|
|
622
|
-
raise RuntimeError("No toolchain installed")
|
|
623
|
-
return func(*args, **kwargs)
|
|
624
|
-
|
|
625
617
|
if not toolchain.exists():
|
|
626
618
|
debug("Unable to set CARGO_HOME no toolchain exists")
|
|
627
619
|
else:
|
|
@@ -1083,11 +1075,3 @@ def bootstrap():
|
|
|
1083
1075
|
setup_crossroot()
|
|
1084
1076
|
install_cargo_config()
|
|
1085
1077
|
sys.meta_path = [importer] + sys.meta_path
|
|
1086
|
-
# XXX This causes our m2crypto test to break
|
|
1087
|
-
# if "RELENV_BUILDENV" in os.environ:
|
|
1088
|
-
# env = buildenv().buildenv()
|
|
1089
|
-
# for key in env:
|
|
1090
|
-
# if key in os.environ:
|
|
1091
|
-
# os.environ[key] = f"{env[key]} {os.environ[key]}"
|
|
1092
|
-
# else:
|
|
1093
|
-
# os.environ[key] = env[key]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: relenv
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.2
|
|
4
4
|
Project-URL: Source Code, https://github.com/saltstack/relative-environment-for-python
|
|
5
5
|
Project-URL: Documentation, https://relenv.readthedocs.io/en/latest/
|
|
6
6
|
Project-URL: Changelog, https://relenv.readthedocs.io/en/latest/changelog.html
|
|
@@ -26,7 +26,9 @@ def get_build_version():
|
|
|
26
26
|
versions.append(version)
|
|
27
27
|
if versions:
|
|
28
28
|
version = versions[0]
|
|
29
|
-
log.
|
|
29
|
+
log.warning(
|
|
30
|
+
"Environment RELENV_PY_VERSION not set, detected version %s", version
|
|
31
|
+
)
|
|
30
32
|
return version
|
|
31
33
|
|
|
32
34
|
|
|
@@ -29,8 +29,7 @@ def test_builder_defaults_linux():
|
|
|
29
29
|
assert builder.prefix == DATA_DIR / "build" / "3.10.10-x86_64-linux-gnu"
|
|
30
30
|
assert builder.sources == DATA_DIR / "src"
|
|
31
31
|
assert builder.downloads == DATA_DIR / "download"
|
|
32
|
-
assert "
|
|
33
|
-
assert "_toolchain" in str(builder.toolchain)
|
|
32
|
+
assert "relenv/toolchain" in str(builder.toolchain)
|
|
34
33
|
assert callable(builder.build_default)
|
|
35
34
|
assert callable(builder.populate_env)
|
|
36
35
|
assert builder.recipies == {}
|
|
@@ -127,7 +127,7 @@ def test_get_toolchain(tmp_path):
|
|
|
127
127
|
if sys.platform in ["darwin", "win32"]:
|
|
128
128
|
assert "data" in str(ret)
|
|
129
129
|
else:
|
|
130
|
-
assert "
|
|
130
|
+
assert f"{data_dir}/toolchain" in str(ret)
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
def test_get_toolchain_no_arch(tmp_path):
|
|
@@ -137,7 +137,7 @@ def test_get_toolchain_no_arch(tmp_path):
|
|
|
137
137
|
if sys.platform in ["darwin", "win32"]:
|
|
138
138
|
assert "data" in str(ret)
|
|
139
139
|
else:
|
|
140
|
-
assert "
|
|
140
|
+
assert f"{data_dir}/toolchain" in str(ret)
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
@pytest.mark.parametrize("open_arg", (":gz", ":xz", ":bz2", ""))
|
|
@@ -49,26 +49,20 @@ def setup(pth_file_path):
|
|
|
49
49
|
def _install_ppbt(pexec):
|
|
50
50
|
if sys.platform in ["win32", "darwin"]:
|
|
51
51
|
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
p = subprocess.run(
|
|
62
|
-
[
|
|
63
|
-
str(pexec),
|
|
64
|
-
"-m",
|
|
65
|
-
"pip",
|
|
66
|
-
"install",
|
|
67
|
-
"ppbt",
|
|
68
|
-
]
|
|
69
|
-
)
|
|
70
|
-
|
|
52
|
+
p = subprocess.run(
|
|
53
|
+
[
|
|
54
|
+
str(pexec),
|
|
55
|
+
"-m",
|
|
56
|
+
"pip",
|
|
57
|
+
"install",
|
|
58
|
+
"ppbt",
|
|
59
|
+
]
|
|
60
|
+
)
|
|
71
61
|
assert p.returncode == 0, "Failed to install ppbt"
|
|
62
|
+
p = subprocess.run(
|
|
63
|
+
[str(pexec), "-c", "from relenv import common; assert common.get_toolchain()"]
|
|
64
|
+
)
|
|
65
|
+
assert p.returncode == 0, "Failed to extract toolchain"
|
|
72
66
|
|
|
73
67
|
|
|
74
68
|
@pytest.fixture(scope="module")
|
|
@@ -153,7 +147,7 @@ def test_pip_install_salt_git(pipexec, build, build_dir, pyexec, build_version):
|
|
|
153
147
|
if sys.platform == "darwin" and "3.13" in build_version:
|
|
154
148
|
pytest.xfail("Salt does not work with 3.13 on macos yet")
|
|
155
149
|
|
|
156
|
-
_install_ppbt(
|
|
150
|
+
_install_ppbt(pyexec)
|
|
157
151
|
|
|
158
152
|
env = os.environ.copy()
|
|
159
153
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -195,7 +189,7 @@ def test_pip_install_salt_git(pipexec, build, build_dir, pyexec, build_version):
|
|
|
195
189
|
)
|
|
196
190
|
def test_pip_install_salt(pipexec, build, tmp_path, pyexec):
|
|
197
191
|
|
|
198
|
-
_install_ppbt(
|
|
192
|
+
_install_ppbt(pyexec)
|
|
199
193
|
|
|
200
194
|
packages = [
|
|
201
195
|
"salt==3005",
|
|
@@ -221,8 +215,8 @@ def test_pip_install_salt(pipexec, build, tmp_path, pyexec):
|
|
|
221
215
|
|
|
222
216
|
|
|
223
217
|
@pytest.mark.skip_on_windows
|
|
224
|
-
def test_symlinked_scripts(pipexec, tmp_path, build):
|
|
225
|
-
_install_ppbt(
|
|
218
|
+
def test_symlinked_scripts(pipexec, pyexec, tmp_path, build):
|
|
219
|
+
_install_ppbt(pyexec)
|
|
226
220
|
|
|
227
221
|
name = "chardet==5.1.0"
|
|
228
222
|
env = os.environ.copy()
|
|
@@ -248,7 +242,7 @@ def test_symlinked_scripts(pipexec, tmp_path, build):
|
|
|
248
242
|
|
|
249
243
|
@pytest.mark.parametrize("salt_branch", ["3006.x", "3007.x", "master"])
|
|
250
244
|
def test_pip_install_salt_w_static_requirements(
|
|
251
|
-
pipexec, build, tmp_path, salt_branch, build_version
|
|
245
|
+
pipexec, pyexec, build, tmp_path, salt_branch, build_version
|
|
252
246
|
):
|
|
253
247
|
if salt_branch in ["3007.x", "master"]:
|
|
254
248
|
pytest.xfail("Known failure")
|
|
@@ -263,7 +257,7 @@ def test_pip_install_salt_w_static_requirements(
|
|
|
263
257
|
if salt_branch == "3006.x" and sys.platform == "win32":
|
|
264
258
|
pytest.xfail("Known failure")
|
|
265
259
|
|
|
266
|
-
_install_ppbt(
|
|
260
|
+
_install_ppbt(pyexec)
|
|
267
261
|
|
|
268
262
|
env = os.environ.copy()
|
|
269
263
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -308,7 +302,7 @@ def test_pip_install_salt_w_static_requirements(
|
|
|
308
302
|
|
|
309
303
|
@pytest.mark.parametrize("salt_branch", ["3006.x", "master"])
|
|
310
304
|
def test_pip_install_salt_w_package_requirements(
|
|
311
|
-
pipexec, tmp_path, salt_branch, build_version
|
|
305
|
+
pipexec, pyexec, tmp_path, salt_branch, build_version
|
|
312
306
|
):
|
|
313
307
|
|
|
314
308
|
for py_version in ("3.11", "3.12", "3.13"):
|
|
@@ -324,9 +318,29 @@ def test_pip_install_salt_w_package_requirements(
|
|
|
324
318
|
if sys.platform == "darwin" and salt_branch == "3006.x":
|
|
325
319
|
pytest.xfail("Known failure")
|
|
326
320
|
|
|
327
|
-
_install_ppbt(
|
|
328
|
-
|
|
321
|
+
_install_ppbt(pyexec)
|
|
329
322
|
env = os.environ.copy()
|
|
323
|
+
|
|
324
|
+
# if sys.platform == "linux":
|
|
325
|
+
# p = subprocess.run(
|
|
326
|
+
# [
|
|
327
|
+
# pyexec,
|
|
328
|
+
# "-m",
|
|
329
|
+
# "relenv",
|
|
330
|
+
# "buildenv",
|
|
331
|
+
# "--json",
|
|
332
|
+
# ],
|
|
333
|
+
# capture_output=True,
|
|
334
|
+
# )
|
|
335
|
+
# try:
|
|
336
|
+
# buildenv = json.loads(p.stdout)
|
|
337
|
+
# except json.JSONDecodeError:
|
|
338
|
+
# assert (
|
|
339
|
+
# False
|
|
340
|
+
# ), f"Failed to decode json: {p.stdout.decode()} {p.stderr.decode()}"
|
|
341
|
+
# for k in buildenv:
|
|
342
|
+
# env[k] = buildenv[k]
|
|
343
|
+
|
|
330
344
|
env["RELENV_BUILDENV"] = "yes"
|
|
331
345
|
env["USE_STATIC_REQUIREMENTS"] = "1"
|
|
332
346
|
p = subprocess.run(
|
|
@@ -399,7 +413,7 @@ def test_pip_install_salt_w_package_requirements(
|
|
|
399
413
|
"26.4.0",
|
|
400
414
|
],
|
|
401
415
|
)
|
|
402
|
-
def test_pip_install_pyzmq(pipexec, pyzmq_version, build_version, arch, build):
|
|
416
|
+
def test_pip_install_pyzmq(pipexec, pyexec, pyzmq_version, build_version, arch, build):
|
|
403
417
|
|
|
404
418
|
if pyzmq_version == "23.2.0" and "3.12" in build_version:
|
|
405
419
|
pytest.xfail(f"{pyzmq_version} does not install on 3.12")
|
|
@@ -425,7 +439,7 @@ def test_pip_install_pyzmq(pipexec, pyzmq_version, build_version, arch, build):
|
|
|
425
439
|
if pyzmq_version == "26.4.0" and sys.platform == "win32":
|
|
426
440
|
pytest.xfail("Needs troubleshooting 4/12/25")
|
|
427
441
|
|
|
428
|
-
_install_ppbt(
|
|
442
|
+
_install_ppbt(pyexec)
|
|
429
443
|
|
|
430
444
|
env = os.environ.copy()
|
|
431
445
|
|
|
@@ -445,6 +459,26 @@ def test_pip_install_pyzmq(pipexec, pyzmq_version, build_version, arch, build):
|
|
|
445
459
|
env[
|
|
446
460
|
"CFLAGS"
|
|
447
461
|
] = f"{env.get('CFLAGS', '')} -DCMAKE_OSX_ARCHITECTURES='arm64' -DZMQ_HAVE_CURVE=0"
|
|
462
|
+
env = os.environ.copy()
|
|
463
|
+
if sys.platform == "linux":
|
|
464
|
+
p = subprocess.run(
|
|
465
|
+
[
|
|
466
|
+
pyexec,
|
|
467
|
+
"-m",
|
|
468
|
+
"relenv",
|
|
469
|
+
"buildenv",
|
|
470
|
+
"--json",
|
|
471
|
+
],
|
|
472
|
+
capture_output=True,
|
|
473
|
+
)
|
|
474
|
+
try:
|
|
475
|
+
buildenv = json.loads(p.stdout)
|
|
476
|
+
except json.JSONDecodeError:
|
|
477
|
+
assert (
|
|
478
|
+
False
|
|
479
|
+
), f"Failed to decode json: {p.stdout.decode()} {p.stderr.decode()}"
|
|
480
|
+
for k in buildenv:
|
|
481
|
+
env[k] = buildenv[k]
|
|
448
482
|
|
|
449
483
|
env["ZMQ_PREFIX"] = "bundled"
|
|
450
484
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -479,8 +513,8 @@ def test_pip_install_pyzmq(pipexec, pyzmq_version, build_version, arch, build):
|
|
|
479
513
|
)
|
|
480
514
|
|
|
481
515
|
|
|
482
|
-
def test_pip_install_cryptography(pipexec):
|
|
483
|
-
_install_ppbt(
|
|
516
|
+
def test_pip_install_cryptography(pipexec, pyexec):
|
|
517
|
+
_install_ppbt(pyexec)
|
|
484
518
|
packages = [
|
|
485
519
|
"cryptography",
|
|
486
520
|
]
|
|
@@ -491,8 +525,8 @@ def test_pip_install_cryptography(pipexec):
|
|
|
491
525
|
assert p.returncode == 0, f"Failed to pip install {name}"
|
|
492
526
|
|
|
493
527
|
|
|
494
|
-
def test_pip_install_idem(pipexec):
|
|
495
|
-
_install_ppbt(
|
|
528
|
+
def test_pip_install_idem(pipexec, pyexec):
|
|
529
|
+
_install_ppbt(pyexec)
|
|
496
530
|
packages = [
|
|
497
531
|
"idem",
|
|
498
532
|
]
|
|
@@ -504,7 +538,7 @@ def test_pip_install_idem(pipexec):
|
|
|
504
538
|
|
|
505
539
|
|
|
506
540
|
def test_pip_install_and_import_libcloud(pipexec, pyexec):
|
|
507
|
-
_install_ppbt(
|
|
541
|
+
_install_ppbt(pyexec)
|
|
508
542
|
name = "apache-libcloud"
|
|
509
543
|
env = os.environ.copy()
|
|
510
544
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -516,7 +550,7 @@ def test_pip_install_and_import_libcloud(pipexec, pyexec):
|
|
|
516
550
|
assert import_ret.returncode == 0, f"Failed to import {import_name}"
|
|
517
551
|
|
|
518
552
|
|
|
519
|
-
def test_pip_install_salt_pip_dir(pipexec, build, build_version, arch):
|
|
553
|
+
def test_pip_install_salt_pip_dir(pipexec, pyexec, build, build_version, arch):
|
|
520
554
|
|
|
521
555
|
if "3.12" in build_version:
|
|
522
556
|
pytest.xfail("Don't try to install on 3.12 yet")
|
|
@@ -531,7 +565,7 @@ def test_pip_install_salt_pip_dir(pipexec, build, build_version, arch):
|
|
|
531
565
|
if sys.platform == "darwin" and "3.13" in build_version:
|
|
532
566
|
pytest.xfail("Salt does not work with 3.13 on macos yet")
|
|
533
567
|
|
|
534
|
-
_install_ppbt(
|
|
568
|
+
_install_ppbt(pyexec)
|
|
535
569
|
env = os.environ.copy()
|
|
536
570
|
env["RELENV_BUILDENV"] = "yes"
|
|
537
571
|
env["RELENV_DEBUG"] = "yes"
|
|
@@ -548,8 +582,8 @@ def test_pip_install_salt_pip_dir(pipexec, build, build_version, arch):
|
|
|
548
582
|
assert script.exists()
|
|
549
583
|
|
|
550
584
|
|
|
551
|
-
def test_nox_virtualenvs(pipexec, build, tmp_path):
|
|
552
|
-
_install_ppbt(
|
|
585
|
+
def test_nox_virtualenvs(pipexec, pyexec, build, tmp_path):
|
|
586
|
+
_install_ppbt(pyexec)
|
|
553
587
|
env = os.environ.copy()
|
|
554
588
|
env["RELENV_BUILDENV"] = "yes"
|
|
555
589
|
env["RELENV_DEBUG"] = "yes"
|
|
@@ -645,7 +679,7 @@ def test_pip_install_m2crypto_relenv_ssl(
|
|
|
645
679
|
if m2crypto_version == "0.38.0" and minor_version in ["3.12", "3.13"]:
|
|
646
680
|
pytest.xfail("Fails due to no distutils")
|
|
647
681
|
|
|
648
|
-
_install_ppbt(
|
|
682
|
+
_install_ppbt(pyexec)
|
|
649
683
|
|
|
650
684
|
p = subprocess.run(
|
|
651
685
|
[
|
|
@@ -657,12 +691,18 @@ def test_pip_install_m2crypto_relenv_ssl(
|
|
|
657
691
|
],
|
|
658
692
|
capture_output=True,
|
|
659
693
|
)
|
|
660
|
-
|
|
694
|
+
try:
|
|
695
|
+
buildenv = json.loads(p.stdout)
|
|
696
|
+
except json.JSONDecodeError:
|
|
697
|
+
assert False, f"Failed to decode json: {p.stdout.decode()} {p.stderr.decode()}"
|
|
661
698
|
env = os.environ.copy()
|
|
699
|
+
for k in buildenv:
|
|
700
|
+
env[k] = buildenv[k]
|
|
701
|
+
|
|
702
|
+
# assert False, buildenv["TOOLCHAIN_PATH"]
|
|
662
703
|
env["RELENV_BUILDENV"] = "yes"
|
|
663
704
|
env["RELENV_DEBUG"] = "yes"
|
|
664
|
-
env["
|
|
665
|
-
env["CFLAGS"] = f"-I{build}/include -I{build}/include/python{minor_version}"
|
|
705
|
+
env["CFLAGS"] = f"{env['CFLAGS']} -I{build}/include/python{minor_version}"
|
|
666
706
|
env["SWIG_FEATURES"] = f"-I{build}/include -I{build}/include/python{minor_version}"
|
|
667
707
|
p = subprocess.run(
|
|
668
708
|
["swig", "-version"],
|
|
@@ -673,6 +713,7 @@ def test_pip_install_m2crypto_relenv_ssl(
|
|
|
673
713
|
"install",
|
|
674
714
|
f"m2crypto=={m2crypto_version}",
|
|
675
715
|
"--no-cache-dir",
|
|
716
|
+
"--no-binary=':all:'",
|
|
676
717
|
"-v",
|
|
677
718
|
],
|
|
678
719
|
env=env,
|
|
@@ -688,14 +729,16 @@ def test_pip_install_m2crypto_relenv_ssl(
|
|
|
688
729
|
for arg in line.split():
|
|
689
730
|
if arg == f"-I{include}":
|
|
690
731
|
found_include = True
|
|
691
|
-
assert found_include, f"{include}\n{p.stderr.decode()}"
|
|
732
|
+
assert found_include, f"{gcc}\n{include}\n{p.stderr.decode()}"
|
|
733
|
+
env.pop("RELENV_DEBUG")
|
|
692
734
|
p = subprocess.run(
|
|
693
735
|
[str(pyexec), "-c", "import M2Crypto"],
|
|
694
736
|
env=env,
|
|
695
737
|
stderr=subprocess.PIPE,
|
|
738
|
+
stdout=subprocess.PIPE,
|
|
696
739
|
check=False,
|
|
697
740
|
)
|
|
698
|
-
assert p.returncode == 0, p.stderr
|
|
741
|
+
assert p.returncode == 0, (p.stdout, p.stderr)
|
|
699
742
|
|
|
700
743
|
|
|
701
744
|
@pytest.mark.skip_on_windows
|
|
@@ -725,8 +768,8 @@ def test_shebangs(pipexec, build, minor_version):
|
|
|
725
768
|
|
|
726
769
|
# XXX Mac support
|
|
727
770
|
@pytest.mark.skip_unless_on_linux
|
|
728
|
-
def test_moving_pip_installed_c_extentions(pipexec, build, minor_version):
|
|
729
|
-
_install_ppbt(
|
|
771
|
+
def test_moving_pip_installed_c_extentions(pipexec, pyexec, build, minor_version):
|
|
772
|
+
_install_ppbt(pyexec)
|
|
730
773
|
env = os.environ.copy()
|
|
731
774
|
env["RELENV_DEBUG"] = "yes"
|
|
732
775
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -758,7 +801,7 @@ def test_moving_pip_installed_c_extentions(pipexec, build, minor_version):
|
|
|
758
801
|
def test_cryptography_rpath(
|
|
759
802
|
pyexec, pipexec, build, minor_version, cryptography_version
|
|
760
803
|
):
|
|
761
|
-
_install_ppbt(
|
|
804
|
+
_install_ppbt(pyexec)
|
|
762
805
|
# log.warn("Extract ppbt")
|
|
763
806
|
# p = subprocess.run(
|
|
764
807
|
# [pyexec, "-c", "import ppbt; ppbt.extract()"],
|
|
@@ -869,8 +912,8 @@ def test_cryptography_rpath_darwin(pipexec, build, minor_version, cryptography_v
|
|
|
869
912
|
|
|
870
913
|
|
|
871
914
|
@pytest.mark.skip_unless_on_linux
|
|
872
|
-
def test_install_pycurl(pipexec, build):
|
|
873
|
-
_install_ppbt(
|
|
915
|
+
def test_install_pycurl(pipexec, pyexec, build):
|
|
916
|
+
_install_ppbt(pyexec)
|
|
874
917
|
curlver = "8.0.1"
|
|
875
918
|
|
|
876
919
|
# Build curl and install it into the relenv environment
|
|
@@ -1041,8 +1084,8 @@ def test_install_libgit2(pipexec, build, minor_version, build_dir, versions):
|
|
|
1041
1084
|
|
|
1042
1085
|
|
|
1043
1086
|
@pytest.mark.skip_unless_on_linux
|
|
1044
|
-
def test_install_python_ldap(pipexec, build):
|
|
1045
|
-
_install_ppbt(
|
|
1087
|
+
def test_install_python_ldap(pipexec, pyexec, build):
|
|
1088
|
+
_install_ppbt(pyexec)
|
|
1046
1089
|
saslver = "2.1.28"
|
|
1047
1090
|
ldapver = "2.5.14"
|
|
1048
1091
|
|
|
@@ -1574,7 +1617,7 @@ def test_install_pyinotify_w_latest_pip(pipexec, build, minor_version):
|
|
|
1574
1617
|
|
|
1575
1618
|
@pytest.mark.skip_unless_on_linux
|
|
1576
1619
|
def test_install_editable_package(pipexec, pyexec, build, minor_version, tmp_path):
|
|
1577
|
-
_install_ppbt(
|
|
1620
|
+
_install_ppbt(pyexec)
|
|
1578
1621
|
os.chdir(tmp_path)
|
|
1579
1622
|
env = os.environ.copy()
|
|
1580
1623
|
env["RELENV_BUILDENV"] = "yes"
|
|
@@ -1599,7 +1642,7 @@ def test_install_editable_package(pipexec, pyexec, build, minor_version, tmp_pat
|
|
|
1599
1642
|
def test_install_editable_package_in_extras(
|
|
1600
1643
|
pipexec, pyexec, build, minor_version, tmp_path
|
|
1601
1644
|
):
|
|
1602
|
-
_install_ppbt(
|
|
1645
|
+
_install_ppbt(pyexec)
|
|
1603
1646
|
sitepkgs = pathlib.Path(build) / "lib" / f"python{minor_version}" / "site-packages"
|
|
1604
1647
|
|
|
1605
1648
|
(sitepkgs / "_extras.pth").write_text("import _extras; _extras.setup(__file__)")
|
|
@@ -1683,8 +1726,8 @@ def rockycontainer(build):
|
|
|
1683
1726
|
|
|
1684
1727
|
|
|
1685
1728
|
@pytest.mark.skip_on_windows
|
|
1686
|
-
def test_no_openssl_binary(rockycontainer, pipexec):
|
|
1687
|
-
_install_ppbt(
|
|
1729
|
+
def test_no_openssl_binary(rockycontainer, pipexec, pyexec):
|
|
1730
|
+
_install_ppbt(pyexec)
|
|
1688
1731
|
env = os.environ.copy()
|
|
1689
1732
|
env["RELENV_BUILDENV"] = "yes"
|
|
1690
1733
|
proc = subprocess.run(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|