-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Prototype support for PEP 739 (continued) #14657
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
base: master
Are you sure you want to change the base?
Conversation
f02c282
to
6c6ad29
Compare
88fa2cc
to
e716a1f
Compare
a587516
to
0559b4a
Compare
Okay, I think this is as far as I can go on my own. Few final points:
|
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.
Nice to see it's ready for testing!
You may want to rewrite history already, since it's required in Meson development to have self-contained orthogonal commits before merging.
A few initial comments; I'll try to find time to test this asap!
mesonbuild/dependencies/python.py
Outdated
class PythonBuildConfig: | ||
"""PEP 739 build-details.json config file.""" | ||
|
||
"""Schema version currently implemented.""" |
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.
nit: should be a regular code comment (#
) it looks like. Same comment for 2 lines lower.
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 suppose it was meant as a docstring, but according to PEP 258, attribute docstrings go below the assignment, not above. While it was rejected, it seems that tools support this convention and I see it used e.g. in mesonbuild/cargo/manifest.py
, so I'll just fix the location.
self.variables = python_holder.info['variables'] | ||
self.build_config = python_holder.build_config | ||
|
||
if self.build_config: |
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.
When I look at the multiple if self.build_config ... else
I wondered if it isn't better to combined build_config
and info
into the same structure in a single place. I bet you considered it though and decided against doing that?
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.
To be honest, I haven't given it much thought, but they certainly do trigger different code paths, and contain slightly different information. I don't think trying to combine them would make the code more readable.
Do you happen to have a reusable recipe for this? |
This seems to work as expected, here is a set of CI jobs that cross-compiles SciPy from x86-64 to aarch64 in the first job, and then uses an aarch64 runner in the second job to download the built wheel and run the test suite:
I think there was a script to generate the |
Not really reusable, no. I've used Gentoo's crossdev to get the needed dependencies, i.e.:
As a result, I've been able to test on a `build-details.json`{
"schema_version": "1.0",
"base_prefix": "/usr",
"base_interpreter": "/usr/bin/python3.14",
"platform": "linux-aarch64",
"language": {
"version": "3.14",
"version_info": {
"major": 3,
"minor": 14,
"micro": 0,
"releaselevel": "beta",
"serial": 3
}
},
"implementation": {
"name": "cpython",
"cache_tag": "cpython-314",
"version": {
"major": 3,
"minor": 14,
"micro": 0,
"releaselevel": "beta",
"serial": 3
},
"hexversion": 51249331,
"_multiarch": "aarch64-linux-gnu"
},
"abi": {
"flags": [],
"extension_suffix": ".cpython-314-aarch64-linux-gnu.so",
"stable_abi_suffix": ".abi3.so"
},
"suffixes": {
"source": [
".py"
],
"bytecode": [
".pyc"
],
"extensions": [
".cpython-314-x86_64-linux-gnu.so",
".abi3.so",
".so"
]
},
"libpython": {
"dynamic": "/usr/lib/libpython3.14.so",
"dynamic_stableabi": "/usr/lib/libpython3.so",
"link_extensions": false
},
"c_api": {
"headers": "/usr/include/python3.14",
"pkgconfig_path": "/usr/lib/pkgconfig"
}
} Created a cross file: meson --cross-file[binaries]
c = 'aarch64-unknown-linux-gnu-gcc'
cpp = 'aarch64-unknown-linux-gnu-g++'
pkg-config = 'aarch64-unknown-linux-gnu-pkg-config'
[properties]
sys_root = '/usr/aarch64-unknown-linux-gnu'
pkg_config_libdir = '/usr/aarch64-unknown-linux-gnu/usr/lib/pkgconfig'
needs_exe_wrapper = true
longdouble_format = 'IEEE_QUAD_LE'
[host_machine]
system = 'linux'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little' Merged this branch with #14773, copied
|
15c0394
to
a8bbbb1
Compare
I opened mesonbuild/meson-python#779 for the needed |
a8bbbb1
to
9071816
Compare
Signed-off-by: Filipe Laíns <lains@riseup.net> Signed-off-by: Michał Górny <mgorny@quansight.com>
9071816
to
1232ec1
Compare
This is a continuation of work from #13945, see #13945 (comment). For a start, just rebased it against fresh git head.