relenv 0.19.2__py3-none-any.whl → 0.19.4__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 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/2024/sqlite-autoconf-{version}.tar.gz",
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": "3460100",
103
- "checksum": "1fdbada080f3285ac864c314bfbfc581b13e804b",
102
+ "version": "3500200",
103
+ "checksum": "f57c0e54fcddf91f73916987d5c52e743c8bfa76",
104
104
  },
105
105
  )
106
106
 
@@ -140,6 +140,6 @@ build = build.copy(
140
140
  builds.add("darwin", builder=build)
141
141
 
142
142
  build = build.copy(
143
- version="3.13.3", checksum="f26085cf12daef7b60b8a6fe93ef988b9a094aea"
143
+ version="3.13.5", checksum="dbf3aed444cbb2221eabfb52688aa371423aa0ba"
144
144
  )
145
145
  builds.add("darwin", builder=build)
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/2024/sqlite-autoconf-{version}.tar.gz",
503
- "version": "3460100",
504
- "checksum": "1fdbada080f3285ac864c314bfbfc581b13e804b",
502
+ "url": "https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gz",
503
+ "version": "3500200",
504
+ "checksum": "f57c0e54fcddf91f73916987d5c52e743c8bfa76",
505
505
  "checkfunc": sqlite_version,
506
506
  "checkurl": "https://sqlite.org/",
507
507
  },
@@ -548,8 +548,8 @@ build.add(
548
548
  build_libffi,
549
549
  download={
550
550
  "url": "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz",
551
- "version": "3.4.8",
552
- "checksum": "6930b77aebe2465a8e1a8617c4c9a8fa3199b256",
551
+ "version": "3.5.1",
552
+ "checksum": "5375e956b0d662e118e47758bd656861e43ba3ef",
553
553
  "checkfunc": github_version,
554
554
  "checkurl": "https://github.com/libffi/libffi/releases/",
555
555
  },
@@ -663,6 +663,6 @@ build = build.copy(
663
663
  builds.add("linux", builder=build)
664
664
 
665
665
  build = build.copy(
666
- version="3.13.3", checksum="f26085cf12daef7b60b8a6fe93ef988b9a094aea"
666
+ version="3.13.5", checksum="dbf3aed444cbb2221eabfb52688aa371423aa0ba"
667
667
  )
668
668
  builds.add("linux", builder=build)
relenv/build/windows.py CHANGED
@@ -222,6 +222,6 @@ build = build.copy(
222
222
  builds.add("win32", builder=build)
223
223
 
224
224
  build = build.copy(
225
- version="3.13.3", checksum="f26085cf12daef7b60b8a6fe93ef988b9a094aea"
225
+ version="3.13.5", checksum="dbf3aed444cbb2221eabfb52688aa371423aa0ba"
226
226
  )
227
227
  builds.add("win32", builder=build)
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.2"
21
+ __version__ = "0.19.4"
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
relenv/runtime.py CHANGED
@@ -859,6 +859,13 @@ def setup_openssl():
859
859
  openssl_bin = shutil.which("openssl")
860
860
  if not openssl_bin:
861
861
  debug("Could not find the 'openssl' binary in the path")
862
+ set_openssl_modules_dir(str(sys.RELENV / "lib" / "ossl-modules"))
863
+
864
+ if load_openssl_provider("default") == 0:
865
+ debug("Unable to load the default openssl provider")
866
+ if load_openssl_provider("legacy") == 0:
867
+ debug("Unable to load the legacy openssl provider")
868
+
862
869
  return
863
870
 
864
871
  if "OPENSSL_MODULES" not in os.environ and sys.platform != "win32":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: relenv
3
- Version: 0.19.2
3
+ Version: 0.19.4
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,11 +2,11 @@ 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=pC9uImG0Temd-sSx5XwqxbuEkZBVKb9s_nmiSLJD5xo,15216
5
+ relenv/common.py,sha256=Lq_g6gD3CnMEWccB3oe9t31nkgHx5InPM0E2l0T8a7g,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
9
- relenv/runtime.py,sha256=65WYEAGnpH5hZgujaJSaJExhn-VRTdRO9-Y6Qo8X-Do,31163
9
+ relenv/runtime.py,sha256=rqU66Kzo05EIG_akMV18t1b27SRNRCWk1pQWbX7Em0k,31467
10
10
  relenv/toolchain.py,sha256=H--mpJnlLR0mWP5djgYss7qDOTdSub7e7rQxa4cPBBE,5858
11
11
  relenv/_scripts/install_vc_build.ps1,sha256=LwzqinKppwht2tacu2jl_gY6gcGWaSq-5Lr1aKduzhs,6423
12
12
  relenv/_toolchain/aarch64/aarch64-linux-gnu-ct-ng.config,sha256=2s_7fX6A3p4380qLiOS78kgijN7GdRHfiW0FArnhjEE,20665
@@ -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=Unbt2upTWGH3b0uYzDVaGiyD7233tPlR6-vmchcvQpg,49012
18
- relenv/build/darwin.py,sha256=57riuVU12oydmVp5Mi3Tys4cqai55uHF0vHtdKxHXWc,3920
19
- relenv/build/linux.py,sha256=TCI3NH_Yjzxizb8529qlO7pCxVleptRYcGtMzKUx7-0,19193
20
- relenv/build/windows.py,sha256=yYm-8jziiUMJb6SVKGQZpHtP6wQmDK06BYC7HWgwzwA,6169
21
- relenv-0.19.2.dist-info/licenses/LICENSE.md,sha256=T0SRk3vJM1YcAJjDz9vsX9gsCRatAVSBS7LeU0tklRM,9919
22
- relenv-0.19.2.dist-info/licenses/NOTICE,sha256=Ns0AybPHBsgJKJJfjE6YnGgWEQQ9F7lQ6QNlYLlQT3E,548
17
+ relenv/build/common.py,sha256=HEqlTJ7aureT1y1cXk_1ofw1GufO_4lDhWrNR2uWs9c,49028
18
+ relenv/build/darwin.py,sha256=7uhkYwcWBfFfgc3Bz9U2n-SsiDZjpCXgVlJh2bNj-5E,3920
19
+ relenv/build/linux.py,sha256=EVuhryUxnSkrkik2jAaTEVgK6uCUiaJANdA1KJ1xCqM,19193
20
+ relenv/build/windows.py,sha256=K_bzOSWQLkfm_O1MMoSq8iyJeloi6smRx2pdVl99_ug,6169
21
+ relenv-0.19.4.dist-info/licenses/LICENSE.md,sha256=T0SRk3vJM1YcAJjDz9vsX9gsCRatAVSBS7LeU0tklRM,9919
22
+ relenv-0.19.4.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=b6aGdPUK-wHMRL1A5NDnJ2v5GjiletfFCe1oFPll-LU,41182
34
- relenv-0.19.2.dist-info/METADATA,sha256=Iu8nlarlFKYWu5P5HRZsGy-XPvVTGmgTNgxw-YXmgug,1360
35
- relenv-0.19.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
36
- relenv-0.19.2.dist-info/entry_points.txt,sha256=dO66nWPPWl8ALWWnZFlHKAo6mfPFuQid7purYWL2ddc,48
37
- relenv-0.19.2.dist-info/top_level.txt,sha256=P4Ro6JLZE53ZdsQ76o2OzBcpb0MaVJmbfr0HAn9WF8M,13
38
- relenv-0.19.2.dist-info/RECORD,,
33
+ tests/test_verify_build.py,sha256=FL2YsAY1p-o7yi1URvO44EQADdwlAwvCvXniHRlMGyU,45327
34
+ relenv-0.19.4.dist-info/METADATA,sha256=MkunIe3RHbbFnVydoywpP0I6B1t6-rhzi24ZNbHcVXQ,1360
35
+ relenv-0.19.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ relenv-0.19.4.dist-info/entry_points.txt,sha256=dO66nWPPWl8ALWWnZFlHKAo6mfPFuQid7purYWL2ddc,48
37
+ relenv-0.19.4.dist-info/top_level.txt,sha256=P4Ro6JLZE53ZdsQ76o2OzBcpb0MaVJmbfr0HAn9WF8M,13
38
+ relenv-0.19.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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,142 @@ 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
1533
+
1534
+
1535
+ @pytest.fixture
1536
+ def rockycontainer(build):
1537
+ if not shutil.which("docker"):
1538
+ pytest.skip(reason="No docker binary found")
1539
+ name = "rocky10"
1540
+ subprocess.run(
1541
+ [
1542
+ "docker",
1543
+ "create",
1544
+ "--name",
1545
+ name,
1546
+ "-v",
1547
+ f"{build}:/test",
1548
+ "--entrypoint",
1549
+ "tail",
1550
+ "rockylinux/rockylinux:10",
1551
+ "-f",
1552
+ "/dev/null",
1553
+ ],
1554
+ capture_output=True,
1555
+ check=True,
1556
+ )
1557
+ subprocess.run(
1558
+ [
1559
+ "docker",
1560
+ "start",
1561
+ name,
1562
+ ],
1563
+ capture_output=True,
1564
+ check=True,
1565
+ )
1566
+ try:
1567
+ yield name
1568
+ finally:
1569
+ subprocess.run(
1570
+ [
1571
+ "docker",
1572
+ "stop",
1573
+ name,
1574
+ ],
1575
+ capture_output=True,
1576
+ check=True,
1577
+ )
1578
+ subprocess.run(
1579
+ [
1580
+ "docker",
1581
+ "rm",
1582
+ name,
1583
+ ],
1584
+ capture_output=True,
1585
+ check=True,
1586
+ )
1587
+
1588
+
1589
+ @pytest.mark.skip_on_windows
1590
+ def test_no_openssl_binary(rockycontainer, pipexec):
1591
+ env = os.environ.copy()
1592
+ env["RELENV_BUILDENV"] = "yes"
1593
+ proc = subprocess.run(
1594
+ [
1595
+ str(pipexec),
1596
+ "install",
1597
+ "cryptography",
1598
+ "--no-binary=:all:",
1599
+ "--no-cache-dir",
1600
+ ],
1601
+ env=env,
1602
+ )
1603
+ assert proc.returncode == 0
1604
+ proc = subprocess.run(
1605
+ [
1606
+ "docker",
1607
+ "exec",
1608
+ rockycontainer,
1609
+ "test/bin/python3",
1610
+ "-c",
1611
+ "import cryptography.exceptions",
1612
+ ],
1613
+ capture_output=True,
1614
+ )
1615
+
1616
+ errors = proc.stderr.decode()
1617
+ assert "legacy provider failed to load" not in errors