relenv 0.19.2__py3-none-any.whl → 0.19.3__py3-none-any.whl
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/build/common.py +3 -3
- relenv/build/darwin.py +3 -3
- relenv/build/linux.py +3 -3
- relenv/common.py +73 -1
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/METADATA +1 -1
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/RECORD +12 -12
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/WHEEL +1 -1
- tests/test_verify_build.py +76 -0
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/entry_points.txt +0 -0
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/licenses/LICENSE.md +0 -0
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/licenses/NOTICE +0 -0
- {relenv-0.19.2.dist-info → relenv-0.19.3.dist-info}/top_level.txt +0 -0
relenv/build/common.py
CHANGED
|
@@ -336,13 +336,13 @@ def build_sqlite(env, dirs, logfp):
|
|
|
336
336
|
# ]
|
|
337
337
|
cmd = [
|
|
338
338
|
"./configure",
|
|
339
|
-
"--with-shared",
|
|
340
|
-
"--without-static",
|
|
339
|
+
# "--with-shared",
|
|
340
|
+
# "--without-static",
|
|
341
341
|
"--enable-threadsafe",
|
|
342
342
|
"--disable-readline",
|
|
343
343
|
"--disable-dependency-tracking",
|
|
344
344
|
"--prefix={}".format(dirs.prefix),
|
|
345
|
-
"--enable-add-ons=nptl,ports",
|
|
345
|
+
# "--enable-add-ons=nptl,ports",
|
|
346
346
|
]
|
|
347
347
|
if env["RELENV_HOST"].find("linux") > -1:
|
|
348
348
|
cmd += [
|
relenv/build/darwin.py
CHANGED
|
@@ -97,10 +97,10 @@ build.add(
|
|
|
97
97
|
name="SQLite",
|
|
98
98
|
build_func=build_sqlite,
|
|
99
99
|
download={
|
|
100
|
-
"url": "https://sqlite.org/
|
|
100
|
+
"url": "https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gz",
|
|
101
101
|
"fallback_url": "https://woz.io/relenv/dependencies/sqlite-autoconf-{version}.tar.gz",
|
|
102
|
-
"version": "
|
|
103
|
-
"checksum": "
|
|
102
|
+
"version": "3500100",
|
|
103
|
+
"checksum": "837f8f5c5ddbaf806f0555fd7d62f4c290c0e2c2",
|
|
104
104
|
},
|
|
105
105
|
)
|
|
106
106
|
|
relenv/build/linux.py
CHANGED
|
@@ -499,9 +499,9 @@ build.add(
|
|
|
499
499
|
name="SQLite",
|
|
500
500
|
build_func=build_sqlite,
|
|
501
501
|
download={
|
|
502
|
-
"url": "https://sqlite.org/
|
|
503
|
-
"version": "
|
|
504
|
-
"checksum": "
|
|
502
|
+
"url": "https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gz",
|
|
503
|
+
"version": "3500100",
|
|
504
|
+
"checksum": "837f8f5c5ddbaf806f0555fd7d62f4c290c0e2c2",
|
|
505
505
|
"checkfunc": sqlite_version,
|
|
506
506
|
"checkurl": "https://sqlite.org/",
|
|
507
507
|
},
|
relenv/common.py
CHANGED
|
@@ -18,7 +18,7 @@ import threading
|
|
|
18
18
|
import time
|
|
19
19
|
|
|
20
20
|
# relenv package version
|
|
21
|
-
__version__ = "0.19.
|
|
21
|
+
__version__ = "0.19.3"
|
|
22
22
|
|
|
23
23
|
MODULE_DIR = pathlib.Path(__file__).resolve().parent
|
|
24
24
|
|
|
@@ -543,6 +543,72 @@ def relative_interpreter(root_dir, scripts_dir, interpreter):
|
|
|
543
543
|
return relscripts / relinterp
|
|
544
544
|
|
|
545
545
|
|
|
546
|
+
def makepath(*paths):
|
|
547
|
+
"""
|
|
548
|
+
Make a normalized path name from paths.
|
|
549
|
+
"""
|
|
550
|
+
dir = os.path.join(*paths)
|
|
551
|
+
try:
|
|
552
|
+
dir = os.path.abspath(dir)
|
|
553
|
+
except OSError:
|
|
554
|
+
pass
|
|
555
|
+
return dir, os.path.normcase(dir)
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
def addpackage(sitedir, name):
|
|
559
|
+
"""
|
|
560
|
+
Add editable package to path.
|
|
561
|
+
"""
|
|
562
|
+
import io
|
|
563
|
+
import stat
|
|
564
|
+
|
|
565
|
+
fullname = os.path.join(sitedir, name)
|
|
566
|
+
paths = []
|
|
567
|
+
try:
|
|
568
|
+
st = os.lstat(fullname)
|
|
569
|
+
except OSError:
|
|
570
|
+
return
|
|
571
|
+
if (getattr(st, "st_flags", 0) & stat.UF_HIDDEN) or (
|
|
572
|
+
getattr(st, "st_file_attributes", 0) & stat.FILE_ATTRIBUTE_HIDDEN
|
|
573
|
+
):
|
|
574
|
+
# print(f"Skipping hidden .pth file: {fullname!r}")
|
|
575
|
+
return
|
|
576
|
+
# print(f"Processing .pth file: {fullname!r}")
|
|
577
|
+
try:
|
|
578
|
+
# locale encoding is not ideal especially on Windows. But we have used
|
|
579
|
+
# it for a long time. setuptools uses the locale encoding too.
|
|
580
|
+
f = io.TextIOWrapper(io.open_code(fullname), encoding="locale")
|
|
581
|
+
except OSError:
|
|
582
|
+
return
|
|
583
|
+
with f:
|
|
584
|
+
for n, line in enumerate(f):
|
|
585
|
+
if line.startswith("#"):
|
|
586
|
+
continue
|
|
587
|
+
if line.strip() == "":
|
|
588
|
+
continue
|
|
589
|
+
try:
|
|
590
|
+
if line.startswith(("import ", "import\t")):
|
|
591
|
+
exec(line)
|
|
592
|
+
continue
|
|
593
|
+
line = line.rstrip()
|
|
594
|
+
dir, dircase = makepath(sitedir, line)
|
|
595
|
+
if dircase not in paths and os.path.exists(dir):
|
|
596
|
+
paths.append(dir)
|
|
597
|
+
except Exception:
|
|
598
|
+
print(
|
|
599
|
+
"Error processing line {:d} of {}:\n".format(n + 1, fullname),
|
|
600
|
+
file=sys.stderr,
|
|
601
|
+
)
|
|
602
|
+
import traceback
|
|
603
|
+
|
|
604
|
+
for record in traceback.format_exception(*sys.exc_info()):
|
|
605
|
+
for line in record.splitlines():
|
|
606
|
+
print(" " + line, file=sys.stderr)
|
|
607
|
+
print("\nRemainder of file ignored", file=sys.stderr)
|
|
608
|
+
break
|
|
609
|
+
return paths
|
|
610
|
+
|
|
611
|
+
|
|
546
612
|
def sanitize_sys_path(sys_path_entries):
|
|
547
613
|
"""
|
|
548
614
|
Sanitize `sys.path` to only include paths relative to the onedir environment.
|
|
@@ -565,4 +631,10 @@ def sanitize_sys_path(sys_path_entries):
|
|
|
565
631
|
if "PYTHONPATH" in os.environ:
|
|
566
632
|
for __path in os.environ["PYTHONPATH"].split(os.pathsep):
|
|
567
633
|
__sys_path.append(__path)
|
|
634
|
+
for known_path in __sys_path[:]:
|
|
635
|
+
for _ in pathlib.Path(known_path).glob("__editable__.*.pth"):
|
|
636
|
+
paths = addpackage(known_path, _)
|
|
637
|
+
for p in paths:
|
|
638
|
+
if p not in __sys_path:
|
|
639
|
+
__sys_path.append(p)
|
|
568
640
|
return __sys_path
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: relenv
|
|
3
|
-
Version: 0.19.
|
|
3
|
+
Version: 0.19.3
|
|
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
|
|
@@ -2,7 +2,7 @@ relenv/__init__.py,sha256=NyZyghiBF5up_Uq6iJhmBr5HUKzfDtP-yZlU1OS6lQM,101
|
|
|
2
2
|
relenv/__main__.py,sha256=otLGprkP5mrzRn-KI7hx3p61enpKdIxJq37iPjHgURY,1330
|
|
3
3
|
relenv/buildenv.py,sha256=GcctZxbH1lfShN8bsbqG-xtrnI4rjWv2PUktHLSYlRo,2946
|
|
4
4
|
relenv/check.py,sha256=AIGxq_2ZBVVIBO8QiJZHknGILyjmxLgN00TTHlFjNsY,951
|
|
5
|
-
relenv/common.py,sha256=
|
|
5
|
+
relenv/common.py,sha256=KrNuAI74IrhxcCddr7wD2KHRzwxGm6Yi5FLPbHgTvpE,17513
|
|
6
6
|
relenv/create.py,sha256=DFKXtANcM4_axUCHF6Fg1Bhr3xWreLt9jxNYLXVZEsM,3930
|
|
7
7
|
relenv/fetch.py,sha256=1qQLQuPBpDqvRO7dkjnmeLfo-I0NSA8vFkcMd-Nqbrk,2388
|
|
8
8
|
relenv/relocate.py,sha256=P5l4s5H4bR8cYm1PEtwp9yJyVfZ5km44jLe0LvL8CL0,11797
|
|
@@ -14,12 +14,12 @@ relenv/_toolchain/aarch64/x86_64-linux-gnu-ct-ng.config,sha256=-CFXq0SLFCRkKhhME
|
|
|
14
14
|
relenv/_toolchain/x86_64/aarch64-linux-gnu-ct-ng.config,sha256=NnkGKF2oIfwOFFFIAQzVgpa-J1gfVM4eOm5VlkLnXqA,20672
|
|
15
15
|
relenv/_toolchain/x86_64/x86_64-linux-gnu-ct-ng.config,sha256=pCdwXWcd0wEV-dfAIccN_tkpJshRjSyx_RByfcdakF4,20791
|
|
16
16
|
relenv/build/__init__.py,sha256=Mk5Cn1W7C7ZGGbNxCCcQNMk4AHNvMByPSZ8akpnq9YI,5373
|
|
17
|
-
relenv/build/common.py,sha256=
|
|
18
|
-
relenv/build/darwin.py,sha256=
|
|
19
|
-
relenv/build/linux.py,sha256=
|
|
17
|
+
relenv/build/common.py,sha256=HEqlTJ7aureT1y1cXk_1ofw1GufO_4lDhWrNR2uWs9c,49028
|
|
18
|
+
relenv/build/darwin.py,sha256=TXCktpLtjAPO6vSypNJ4-PSGm2p1tBb78oylz5F4tGc,3920
|
|
19
|
+
relenv/build/linux.py,sha256=HHblLi6ROUhRedFy6EVrKJrwiWO-xHQN5OMmKRmzs3Q,19193
|
|
20
20
|
relenv/build/windows.py,sha256=yYm-8jziiUMJb6SVKGQZpHtP6wQmDK06BYC7HWgwzwA,6169
|
|
21
|
-
relenv-0.19.
|
|
22
|
-
relenv-0.19.
|
|
21
|
+
relenv-0.19.3.dist-info/licenses/LICENSE.md,sha256=T0SRk3vJM1YcAJjDz9vsX9gsCRatAVSBS7LeU0tklRM,9919
|
|
22
|
+
relenv-0.19.3.dist-info/licenses/NOTICE,sha256=Ns0AybPHBsgJKJJfjE6YnGgWEQQ9F7lQ6QNlYLlQT3E,548
|
|
23
23
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
tests/conftest.py,sha256=VfuB1T7Tjoy2mhKpwKUJNIoq9RX69sRvRXIxw_R09qU,2040
|
|
25
25
|
tests/test_build.py,sha256=vuUxCTGQa1FcoeS3ls-7e9v2ry9sgWJHzKWMYKKrwNo,1407
|
|
@@ -30,9 +30,9 @@ tests/test_fips_photon.py,sha256=pR6MxzdT1vyaC-nN609fy7Nl68eyqOo46BUdluOXKjI,124
|
|
|
30
30
|
tests/test_relocate.py,sha256=_3Eb22qhzWvMnLIgPCqO-t_WZ-hklSMfy8GBTrdjCf0,8854
|
|
31
31
|
tests/test_runtime.py,sha256=n_gTiQqAgO_Vqk6Xf_2Hi3gIkBn_lhDqoovOiQ5fxG8,626
|
|
32
32
|
tests/test_toolchain.py,sha256=02ZxSj72fMTINVl-PHhBkS6eLGWKvwO3nweHYEt4SMQ,4379
|
|
33
|
-
tests/test_verify_build.py,sha256=
|
|
34
|
-
relenv-0.19.
|
|
35
|
-
relenv-0.19.
|
|
36
|
-
relenv-0.19.
|
|
37
|
-
relenv-0.19.
|
|
38
|
-
relenv-0.19.
|
|
33
|
+
tests/test_verify_build.py,sha256=hndHknkuZ-RkoFKGfTxvBxFimzeiZJh5TQGdh1JHMA8,43502
|
|
34
|
+
relenv-0.19.3.dist-info/METADATA,sha256=BvVWGu-vz-QSF0xdhmWzTogcQEHfc-WLimxA-k4OaXo,1360
|
|
35
|
+
relenv-0.19.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
relenv-0.19.3.dist-info/entry_points.txt,sha256=dO66nWPPWl8ALWWnZFlHKAo6mfPFuQid7purYWL2ddc,48
|
|
37
|
+
relenv-0.19.3.dist-info/top_level.txt,sha256=P4Ro6JLZE53ZdsQ76o2OzBcpb0MaVJmbfr0HAn9WF8M,13
|
|
38
|
+
relenv-0.19.3.dist-info/RECORD,,
|
tests/test_verify_build.py
CHANGED
|
@@ -25,6 +25,28 @@ pytestmark = [
|
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
EXTRAS_PY = """
|
|
29
|
+
import pathlib
|
|
30
|
+
import sys
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def setup(pth_file_path):
|
|
34
|
+
# Discover the extras-<py-major>.<py-minor> directory
|
|
35
|
+
extras_parent_path = pathlib.Path(pth_file_path).resolve().parent.parent
|
|
36
|
+
if not sys.platform.startswith("win"):
|
|
37
|
+
extras_parent_path = extras_parent_path.parent
|
|
38
|
+
|
|
39
|
+
extras_path = str(extras_parent_path / "extras-{}.{}".format(*sys.version_info))
|
|
40
|
+
|
|
41
|
+
if extras_path in sys.path and sys.path[0] != extras_path:
|
|
42
|
+
# The extras directory must come first
|
|
43
|
+
sys.path.remove(extras_path)
|
|
44
|
+
|
|
45
|
+
if extras_path not in sys.path:
|
|
46
|
+
sys.path.insert(0, extras_path)
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
|
|
28
50
|
@pytest.fixture(scope="module")
|
|
29
51
|
def arch():
|
|
30
52
|
return build_arch()
|
|
@@ -1454,3 +1476,57 @@ def test_install_pyinotify_w_latest_pip(pipexec, build, minor_version):
|
|
|
1454
1476
|
)
|
|
1455
1477
|
assert p.returncode == 0, "Failed install pyinotify"
|
|
1456
1478
|
assert (extras / "pyinotify.py").exists()
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
@pytest.mark.skip_unless_on_linux
|
|
1482
|
+
def test_install_editable_package(pipexec, pyexec, build, minor_version, tmp_path):
|
|
1483
|
+
os.chdir(tmp_path)
|
|
1484
|
+
env = os.environ.copy()
|
|
1485
|
+
env["RELENV_BUILDENV"] = "yes"
|
|
1486
|
+
p = subprocess.run(
|
|
1487
|
+
[
|
|
1488
|
+
"git",
|
|
1489
|
+
"clone",
|
|
1490
|
+
"https://github.com/salt-extensions/saltext-zabbix.git",
|
|
1491
|
+
"--depth",
|
|
1492
|
+
"1",
|
|
1493
|
+
],
|
|
1494
|
+
env=env,
|
|
1495
|
+
)
|
|
1496
|
+
assert p.returncode == 0
|
|
1497
|
+
p = subprocess.run([str(pipexec), "install", "-e", "saltext-zabbix"], env=env)
|
|
1498
|
+
assert p.returncode == 0
|
|
1499
|
+
p = subprocess.run([str(pyexec), "-c", "import saltext.zabbix"], env=env)
|
|
1500
|
+
assert p.returncode == 0
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
@pytest.mark.skip_unless_on_linux
|
|
1504
|
+
def test_install_editable_package_in_extras(
|
|
1505
|
+
pipexec, pyexec, build, minor_version, tmp_path
|
|
1506
|
+
):
|
|
1507
|
+
sitepkgs = pathlib.Path(build) / "lib" / f"python{minor_version}" / "site-packages"
|
|
1508
|
+
|
|
1509
|
+
(sitepkgs / "_extras.pth").write_text("import _extras; _extras.setup(__file__)")
|
|
1510
|
+
(sitepkgs / "_extras.py").write_text(EXTRAS_PY)
|
|
1511
|
+
extras = pathlib.Path(build) / f"extras-{minor_version}"
|
|
1512
|
+
extras.mkdir()
|
|
1513
|
+
os.chdir(tmp_path)
|
|
1514
|
+
env = os.environ.copy()
|
|
1515
|
+
env["RELENV_BUILDENV"] = "yes"
|
|
1516
|
+
p = subprocess.run(
|
|
1517
|
+
[
|
|
1518
|
+
"git",
|
|
1519
|
+
"clone",
|
|
1520
|
+
"https://github.com/salt-extensions/saltext-zabbix.git",
|
|
1521
|
+
"--depth",
|
|
1522
|
+
"1",
|
|
1523
|
+
],
|
|
1524
|
+
env=env,
|
|
1525
|
+
)
|
|
1526
|
+
assert p.returncode == 0
|
|
1527
|
+
p = subprocess.run(
|
|
1528
|
+
[str(pipexec), "install", f"--target={extras}", "-e", "saltext-zabbix"], env=env
|
|
1529
|
+
)
|
|
1530
|
+
assert p.returncode == 0
|
|
1531
|
+
p = subprocess.run([str(pyexec), "-c", "import saltext.zabbix"], env=env)
|
|
1532
|
+
assert p.returncode == 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|