-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support legacy arm platforms #478
Changes from all commits
ff634c4
466afc4
12b9dc3
a16cb5c
165d142
2abcb75
4125e8e
1bc0215
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,13 +37,15 @@ def setUp(self): | |
self.dependencies_dir = tempfile.mkdtemp() | ||
|
||
self.manifest_path_valid = os.path.join(self.TEST_DATA_FOLDER, "requirements-numpy.txt") | ||
self.manifest_path_legacy = os.path.join(self.TEST_DATA_FOLDER, "requirements-legacy.txt") | ||
self.manifest_path_invalid = os.path.join(self.TEST_DATA_FOLDER, "requirements-invalid.txt") | ||
self.manifest_path_sdist = os.path.join(self.TEST_DATA_FOLDER, "requirements-wrapt.txt") | ||
|
||
self.test_data_files = { | ||
"__init__.py", | ||
"main.py", | ||
"requirements-invalid.txt", | ||
"requirements-legacy.txt", | ||
"requirements-numpy.txt", | ||
"requirements-wrapt.txt", | ||
"local-dependencies", | ||
|
@@ -103,6 +105,42 @@ def test_must_build_python_project(self): | |
output_files = set(os.listdir(self.artifacts_dir)) | ||
self.assertEqual(expected_files, output_files) | ||
|
||
@skipIf(NOT_ARM, "Skip in windows tests") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't run arm tests (not sure why), but how are we verifying this works now and will work in the future? Also the reason states "windows". I assume that is a copy paste error. |
||
def test_must_build_python_project_for_legacy_platforms(self): | ||
self.builder.build( | ||
self.source_dir, | ||
self.artifacts_dir, | ||
self.scratch_dir, | ||
self.manifest_path_legacy, | ||
runtime=self.runtime, | ||
experimental_flags=self.experimental_flags, | ||
) | ||
|
||
if self.runtime == "python3.7": | ||
expected_files = self.test_data_files.union( | ||
{ | ||
"inflate64", | ||
"inflate64.libs", | ||
"inflate64-0.1.4.dist-info", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not clear to me how this works with the mappings you added. Was inflate64 the issue or was it some other package? Looking at the downloadable |
||
"typing_extensions.py", | ||
"importlib_metadata-6.1.0.dist-info", | ||
"typing_extensions-4.5.0.dist-info", | ||
"zipp-3.15.0.dist-info", | ||
"importlib_metadata", | ||
"zipp", | ||
} | ||
) | ||
else: | ||
expected_files = self.test_data_files.union( | ||
{ | ||
"inflate64", | ||
"inflate64.libs", | ||
"inflate64-0.1.4.dist-info", | ||
} | ||
) | ||
output_files = set(os.listdir(self.artifacts_dir)) | ||
self.assertEqual(expected_files, output_files) | ||
|
||
def test_must_build_python_project_python3_binary(self): | ||
python_paths = which("python") | ||
with tempfile.TemporaryDirectory() as executable_dir_str: | ||
|
@@ -175,6 +213,37 @@ def test_must_build_python_project_with_arm_architecture(self): | |
else: | ||
self.check_architecture_in("numpy-1.20.3.dist-info", ["manylinux2014_aarch64"]) | ||
|
||
@skipIf(NOT_ARM, "Skip in windows tests") | ||
def test_must_build_python_project_with_arm_architecture_for_legacy_platforms(self): | ||
if self.runtime not in ARM_RUNTIMES: | ||
self.skipTest("{} is not supported on ARM architecture".format(self.runtime)) | ||
### Check the wheels | ||
self.builder.build( | ||
self.source_dir, | ||
self.artifacts_dir, | ||
self.scratch_dir, | ||
self.manifest_path_legacy, | ||
runtime=self.runtime, | ||
architecture="arm64", | ||
experimental_flags=self.experimental_flags, | ||
) | ||
expected_files = self.test_data_files.union( | ||
{ | ||
"inflate64", | ||
"inflate64-0.1.4.dist-info", | ||
"typing_extensions.py", | ||
"importlib_metadata-6.1.0.dist-info", | ||
"typing_extensions-4.5.0.dist-info", | ||
"zipp-3.15.0.dist-info", | ||
"importlib_metadata", | ||
"zipp", | ||
} | ||
) | ||
output_files = set(os.listdir(self.artifacts_dir)) | ||
self.assertEqual(expected_files, output_files) | ||
|
||
self.check_architecture_in("inflate64-0.1.4.dist-info", ["manylinux2014_aarch64"]) | ||
|
||
def test_mismatch_runtime_python_project(self): | ||
# NOTE : Build still works if other versions of python are accessible on the path. eg: /usr/bin/python3.7 | ||
# is still accessible within a python 3.8 virtualenv. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
inflate64==0.1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you get these mapping from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using this PR to test if my assumption is correct or not, and I marked it as draft, but seems I made it ready by mistake .. sorry for that .. I still need to work on it, it is not finalized