relenv 0.19.3__py3-none-any.whl → 0.20.0__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/__main__.py +4 -4
- relenv/build/__init__.py +30 -10
- relenv/build/common.py +43 -21
- relenv/build/darwin.py +3 -18
- relenv/build/linux.py +5 -20
- relenv/build/windows.py +1 -16
- relenv/buildenv.py +21 -6
- relenv/common.py +88 -8
- relenv/create.py +2 -4
- relenv/fetch.py +2 -4
- relenv/manifest.py +34 -0
- relenv/pyversions.py +411 -0
- relenv/runtime.py +56 -8
- relenv/toolchain.py +8 -183
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/METADATA +1 -1
- relenv-0.20.0.dist-info/RECORD +35 -0
- tests/conftest.py +3 -1
- tests/test_build.py +2 -2
- tests/test_common.py +8 -2
- tests/test_fips_photon.py +3 -0
- tests/test_verify_build.py +222 -25
- relenv/_toolchain/aarch64/aarch64-linux-gnu-ct-ng.config +0 -798
- relenv/_toolchain/aarch64/x86_64-linux-gnu-ct-ng.config +0 -800
- relenv/_toolchain/x86_64/aarch64-linux-gnu-ct-ng.config +0 -799
- relenv/_toolchain/x86_64/x86_64-linux-gnu-ct-ng.config +0 -801
- relenv-0.19.3.dist-info/RECORD +0 -38
- tests/test_toolchain.py +0 -107
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/WHEEL +0 -0
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/entry_points.txt +0 -0
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/licenses/LICENSE.md +0 -0
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/licenses/NOTICE +0 -0
- {relenv-0.19.3.dist-info → relenv-0.20.0.dist-info}/top_level.txt +0 -0
relenv-0.19.3.dist-info/RECORD
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
relenv/__init__.py,sha256=NyZyghiBF5up_Uq6iJhmBr5HUKzfDtP-yZlU1OS6lQM,101
|
|
2
|
-
relenv/__main__.py,sha256=otLGprkP5mrzRn-KI7hx3p61enpKdIxJq37iPjHgURY,1330
|
|
3
|
-
relenv/buildenv.py,sha256=GcctZxbH1lfShN8bsbqG-xtrnI4rjWv2PUktHLSYlRo,2946
|
|
4
|
-
relenv/check.py,sha256=AIGxq_2ZBVVIBO8QiJZHknGILyjmxLgN00TTHlFjNsY,951
|
|
5
|
-
relenv/common.py,sha256=KrNuAI74IrhxcCddr7wD2KHRzwxGm6Yi5FLPbHgTvpE,17513
|
|
6
|
-
relenv/create.py,sha256=DFKXtANcM4_axUCHF6Fg1Bhr3xWreLt9jxNYLXVZEsM,3930
|
|
7
|
-
relenv/fetch.py,sha256=1qQLQuPBpDqvRO7dkjnmeLfo-I0NSA8vFkcMd-Nqbrk,2388
|
|
8
|
-
relenv/relocate.py,sha256=P5l4s5H4bR8cYm1PEtwp9yJyVfZ5km44jLe0LvL8CL0,11797
|
|
9
|
-
relenv/runtime.py,sha256=65WYEAGnpH5hZgujaJSaJExhn-VRTdRO9-Y6Qo8X-Do,31163
|
|
10
|
-
relenv/toolchain.py,sha256=H--mpJnlLR0mWP5djgYss7qDOTdSub7e7rQxa4cPBBE,5858
|
|
11
|
-
relenv/_scripts/install_vc_build.ps1,sha256=LwzqinKppwht2tacu2jl_gY6gcGWaSq-5Lr1aKduzhs,6423
|
|
12
|
-
relenv/_toolchain/aarch64/aarch64-linux-gnu-ct-ng.config,sha256=2s_7fX6A3p4380qLiOS78kgijN7GdRHfiW0FArnhjEE,20665
|
|
13
|
-
relenv/_toolchain/aarch64/x86_64-linux-gnu-ct-ng.config,sha256=-CFXq0SLFCRkKhhMEWraWsGbEv-hBpZl7-Dz0lUMyfs,20774
|
|
14
|
-
relenv/_toolchain/x86_64/aarch64-linux-gnu-ct-ng.config,sha256=NnkGKF2oIfwOFFFIAQzVgpa-J1gfVM4eOm5VlkLnXqA,20672
|
|
15
|
-
relenv/_toolchain/x86_64/x86_64-linux-gnu-ct-ng.config,sha256=pCdwXWcd0wEV-dfAIccN_tkpJshRjSyx_RByfcdakF4,20791
|
|
16
|
-
relenv/build/__init__.py,sha256=Mk5Cn1W7C7ZGGbNxCCcQNMk4AHNvMByPSZ8akpnq9YI,5373
|
|
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
|
-
relenv/build/windows.py,sha256=yYm-8jziiUMJb6SVKGQZpHtP6wQmDK06BYC7HWgwzwA,6169
|
|
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
|
-
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
tests/conftest.py,sha256=VfuB1T7Tjoy2mhKpwKUJNIoq9RX69sRvRXIxw_R09qU,2040
|
|
25
|
-
tests/test_build.py,sha256=vuUxCTGQa1FcoeS3ls-7e9v2ry9sgWJHzKWMYKKrwNo,1407
|
|
26
|
-
tests/test_common.py,sha256=mCKBQMQYZqoq47T7tk9gRxfK64Be_OfXBa_t_RKTZ4U,6590
|
|
27
|
-
tests/test_create.py,sha256=gnwNukmYJR02CunQBH6JJ3ClUYgjzBWlOm0SJ_rtJkI,1584
|
|
28
|
-
tests/test_downloads.py,sha256=zdULspcHcepOVkEQKOMr0pw02t9GRiBCcIP72So0EYc,3302
|
|
29
|
-
tests/test_fips_photon.py,sha256=pR6MxzdT1vyaC-nN609fy7Nl68eyqOo46BUdluOXKjI,1248
|
|
30
|
-
tests/test_relocate.py,sha256=_3Eb22qhzWvMnLIgPCqO-t_WZ-hklSMfy8GBTrdjCf0,8854
|
|
31
|
-
tests/test_runtime.py,sha256=n_gTiQqAgO_Vqk6Xf_2Hi3gIkBn_lhDqoovOiQ5fxG8,626
|
|
32
|
-
tests/test_toolchain.py,sha256=02ZxSj72fMTINVl-PHhBkS6eLGWKvwO3nweHYEt4SMQ,4379
|
|
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_toolchain.py
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Copyright 2022-2025 Broadcom.
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
#
|
|
4
|
-
from unittest.mock import call, patch
|
|
5
|
-
|
|
6
|
-
import pytest
|
|
7
|
-
|
|
8
|
-
from relenv.common import WorkDirs
|
|
9
|
-
from relenv.toolchain import _configure_ctng, build, fetch
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def test_fetch(tmp_path):
|
|
13
|
-
archdir = tmp_path / "archdir"
|
|
14
|
-
archive = str(tmp_path / "archive")
|
|
15
|
-
with patch("relenv.toolchain.get_triplet", return_value="a-fake-triplet"):
|
|
16
|
-
with patch("relenv.toolchain.check_url", return_value=True):
|
|
17
|
-
with patch("relenv.toolchain.get_toolchain", return_value=archdir):
|
|
18
|
-
with patch(
|
|
19
|
-
"relenv.toolchain.download_url", return_value=archive
|
|
20
|
-
) as dl_mock:
|
|
21
|
-
with patch("relenv.toolchain.extract_archive") as extract_mock:
|
|
22
|
-
fetch("fake_arch", "fake_toolchain")
|
|
23
|
-
dl_mock.assert_called_once()
|
|
24
|
-
extract_mock.assert_called_with("fake_toolchain", archive)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def test_fetch_directory_exists(tmp_path):
|
|
28
|
-
with patch("relenv.toolchain.get_triplet", return_value="a-fake-triplet"):
|
|
29
|
-
with patch("relenv.toolchain.get_toolchain", return_value=tmp_path):
|
|
30
|
-
with patch("relenv.toolchain.check_url", return_value=True):
|
|
31
|
-
with patch("relenv.toolchain.download_url") as dl_mock:
|
|
32
|
-
fetch("fake_arch", "fake_toolchain")
|
|
33
|
-
dl_mock.assert_not_called()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def test__configure_ctng(tmp_path):
|
|
37
|
-
ctngdir = tmp_path / "ctngdir"
|
|
38
|
-
ctngdir.mkdir()
|
|
39
|
-
data_dir = tmp_path / "data"
|
|
40
|
-
root_dir = tmp_path / "root_dir"
|
|
41
|
-
with patch("relenv.common.DATA_DIR", data_dir):
|
|
42
|
-
with patch("relenv.toolchain.runcmd") as cmd_mock:
|
|
43
|
-
dirs = WorkDirs(root=root_dir)
|
|
44
|
-
_configure_ctng(ctngdir, dirs)
|
|
45
|
-
calls = [call(["./configure", "--enable-local"]), call(["make"])]
|
|
46
|
-
cmd_mock.assert_has_calls(calls)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def test_build(tmp_path):
|
|
50
|
-
ctngdir = tmp_path / "ctngdir"
|
|
51
|
-
ctngdir.mkdir()
|
|
52
|
-
ctng = ctngdir / "ct-ng"
|
|
53
|
-
data_dir = tmp_path / "data"
|
|
54
|
-
root_dir = tmp_path / "root_dir"
|
|
55
|
-
machine = "fake_machine"
|
|
56
|
-
arch = "fake_arch"
|
|
57
|
-
triplet = "a-fake-triplet"
|
|
58
|
-
with patch("relenv.common.DATA_DIR", data_dir):
|
|
59
|
-
with patch("relenv.toolchain.get_triplet", return_value=triplet):
|
|
60
|
-
with patch("relenv.toolchain.runcmd") as cmd_mock:
|
|
61
|
-
dirs = WorkDirs(root=root_dir)
|
|
62
|
-
tc_config_dir = dirs.toolchain_config / machine
|
|
63
|
-
tc_config_dir.mkdir(parents=True)
|
|
64
|
-
(tc_config_dir / "{}-ct-ng.config".format(triplet)).write_text(
|
|
65
|
-
"some text"
|
|
66
|
-
)
|
|
67
|
-
dirs.toolchain.mkdir(parents=True)
|
|
68
|
-
build(arch, dirs, machine, ctngdir)
|
|
69
|
-
assert (dirs.toolchain / ".config").read_text() == "some text"
|
|
70
|
-
assert cmd_mock.call_count == 2
|
|
71
|
-
assert cmd_mock.call_args_list[0].args[0] == [str(ctng), "source"]
|
|
72
|
-
assert cmd_mock.call_args_list[1].args[0] == [str(ctng), "build"]
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def test_build_directory_exists(tmp_path):
|
|
76
|
-
ctngdir = tmp_path / "ctngdir"
|
|
77
|
-
ctngdir.mkdir()
|
|
78
|
-
data_dir = tmp_path / "data"
|
|
79
|
-
root_dir = tmp_path / "root_dir"
|
|
80
|
-
machine = "fake_machine"
|
|
81
|
-
arch = "fake_arch"
|
|
82
|
-
triplet = "a-fake-triplet"
|
|
83
|
-
with patch("relenv.common.DATA_DIR", data_dir):
|
|
84
|
-
with patch("relenv.toolchain.get_triplet", return_value=triplet):
|
|
85
|
-
with patch("relenv.toolchain.runcmd") as cmd_mock:
|
|
86
|
-
dirs = WorkDirs(root=root_dir)
|
|
87
|
-
(dirs.toolchain / triplet).mkdir(parents=True)
|
|
88
|
-
build(arch, dirs, machine, ctngdir)
|
|
89
|
-
cmd_mock.assert_not_called()
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def test_build_config_doesnt_exist(tmp_path):
|
|
93
|
-
ctngdir = tmp_path / "ctngdir"
|
|
94
|
-
ctngdir.mkdir()
|
|
95
|
-
data_dir = tmp_path / "data"
|
|
96
|
-
root_dir = tmp_path / "root_dir"
|
|
97
|
-
machine = "fake_machine"
|
|
98
|
-
arch = "fake_arch"
|
|
99
|
-
triplet = "a-fake-triplet"
|
|
100
|
-
with patch("relenv.common.DATA_DIR", data_dir):
|
|
101
|
-
with patch("relenv.toolchain.get_triplet", return_value=triplet):
|
|
102
|
-
with patch("relenv.toolchain.runcmd") as cmd_mock:
|
|
103
|
-
dirs = WorkDirs(root=root_dir)
|
|
104
|
-
dirs.toolchain.mkdir(parents=True)
|
|
105
|
-
with pytest.raises(SystemExit):
|
|
106
|
-
build(arch, dirs, machine, ctngdir)
|
|
107
|
-
cmd_mock.assert_not_called()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|