BLD: migrate build backend to meson-python and enable abi3 wheels - #556
BLD: migrate build backend to meson-python and enable abi3 wheels#556neutrinoceros wants to merge 4 commits into
Conversation
679039b to
fd49952
Compare
|
I reached a somewhat functional state where at least some jobs are passing.
|
|
looks like this is what's failing windows-arm64 jobs: astral-sh/uv#12906 |
|
got a bit further using the workaround described in the issue I just linked. Now meson correctly detects a native Python interpreter, but then hit which I don't understand yet |
ad2a594 to
64d6587
Compare
rgommers
left a comment
There was a problem hiding this comment.
I had a quick looks; this looks like a good start to me.
| 'nonreduce_axis', | ||
| [ | ||
| bn_config_h, | ||
| custom_target( |
There was a problem hiding this comment.
If you define a generator, this can be a one-liner per file, same as in for example:
There was a problem hiding this comment.
a generator is how I initially tried to write this but I struggled to define a template for the output filename, because it's obtained by subtraction rather than addition.
There was a problem hiding this comment.
Could rename the source files? They're not valid C code, so .c.in or .c.template seems more accurate anyway
There was a problem hiding this comment.
Yes, I was thinking doing just that as a cleanup step after I got CI stable again. Though I prefer extensions like .template.c, as it allows syntax highlighting to sort-of work instead of not at all.
There was a problem hiding this comment.
actually went for it tonight because I had limited bandwidth and this didn't require much. I ended up using your suggestion (.c.template) because I couldn't work out how to implement .template.c using available substitutions .
11ff03d to
fc3f675
Compare
|
I'm hesitant to just drop windows-arm64 as a normal CI target. It works in the context of cibw but I'm struggling to set it up using |
7f54ef5 to
f995b9d
Compare
|
I got lost as I tried to get everything working at the same time. I've disabled limited-api builds for now because I found it hard to setup correctly with 3.14t also being a target. I'm also disabling failing targets as I go right now, with the goal to reveal the subset that does work already, before I tackle failures one by one again. |
|
No, The issue in There's also a |
92bcbcd to
7a0aa48
Compare
|
The That is an unfortunate default |
|
Thank you, I keep forgetting about this problem: astral-sh/uv#12906 |
|
Oh wait, the wheel build issue does ring a bell: the problem here is that we're building all Windows wheels in a single job (which none of the other projects I work on do; it leads to issues like this one), and CPython didn't fix a free-threading header issue - that's why the 3.11 to 3.14 builds work and 3.14t chokes. From https://py-free-threading.github.io/installing-cpython/: "Due to limitations of the Windows Python.org installer, using free-threaded Python installed from the Python.org installer may lead to trouble. In particular, if you install both a free-threaded and gil-enabled build of Python 3.13+ using the Python.org installer, both installs will share a site-packages folder. This can very quickly lead to broken environments if packages for both versions are simultaneously installed." Let me figure out if there's an easy workaround. |
|
@neutrinoceros the problem is |
|
Those fixups don't look right. I thought about it some more, and reusing a build directory is just not a valid thing to do between two fresh builds with different dependencies.
I'll note that that's special-casing the interpreter, which makes it work - but in general it's also susceptible to changes between builds that aren't special-cased (e.g., a change to a compiler, codegen, etc.). Meson, as a general-purpose build system, treats Python as any other dependency and not one with special-casing for how build caching and |
0c4ff54 to
bdd5f3f
Compare
Let me clarify: the issue I'm seeing is that despite having |
bd052df to
7e81855
Compare
|
Ah ! I think that's just because the build isolation intentionally ignores runtime constraints. Promoting the constraint to an actual build-time requirement should do the trick. |
f47f68e to
b4eef40
Compare
turn off limited api builds for cp315t
76deb7d to
9e51d2d
Compare
|
Okay wheels are working now.
I think 1 and 2 are relatively simple to fix. I'll give it a try now. |
|
It's picking up MinGW: Pass
Needs a |
|
Thanks !
But |
d2839f2 to
b30aa37
Compare
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Set up Python ${{ matrix.python-version }} |
There was a problem hiding this comment.
Note that this duplicates a Python install from ./.github/bottleneck-action with setup-uv.
|
Try inserting this in It's going wrong in the Python detection on x86-64, and the CI log has this warning: The |
|
Interesting. The errors we get now look furiously like the ones we saw with |
6a1dc45 to
97c1c0c
Compare
97c1c0c to
7197ab3
Compare
This is based off #511close #516
very much a work in progress.
When attempting a build with
I get 2 errors about
mallocandfreebeing undefined. Here's the first one:I don't understand how this happens,
#include <stdlib.h>is already present inbottleneck/src/reduce_template.c.If I run
uv buildinstead, I getso clearly I must be doing something wrong, but I'm not too surprised because this is the first time I attempt to hook python scripts into a meson build.