Apologies if anyone was getting lots of github actions notification
emails today, I was taking a shot at this.
I almost got it working, building the python wheels using the package
cibuildwheel, but not quite there yet.
It actually works and builds the wheels locally if I do:
python -m pip wheel build/swig
--wheel-dir=/tmp/cibuildwheel/built_wheel --no-deps -v
which is the same command that cibuildwheel uses. But, so far on
github actions I am stuck at a complaint about the .so already
existing, even though I have a command to rm it first. So a bit
confused, but it's a complicated rube goldberg stack of dockers.
https://github.com/libmapper/libmapper/runs/3125446217
In the meantime I *am* able to produce wheels locally, at least for
Linux, so theoretically we could manually upload them to pypi if we
can figure out what to do about the name conflict. I have no idea
what would be involved in doing the same thing for Mac and Windows --
to be investigated.
regards,
Steve
ps, technical details:
Basically the complicating aspect is that cibuildwheel (and "pip
wheel") is set up to handle projects where "setup.py" is in the main
directory and is used as the main build system. Since we have it in
the "swig" directory and it's only produced after running configure,
things get weird, because you need to run make first, then clean, then
delete some other things, and make mapper_wrap.c, all to prepare to
tell "pip wheel" to run. Even more confusing is that it appears that
"pip wheel" first makes a copy of the "swig" directory under "/tmp"
and tries to build it from there, making it not be able to find
mapper_internal.h. There is an experimental branch of "cibuildwheel"
that tells "pip wheel" not to do this by giving it the in-tree-build
feature flag, so that is what I am currently using. Very messy.
and on and on.. anyways, I'll try to give it another try soon. If
anyone wants to try, please be my guest ;)
I've been doing poorly-organized quick commits to the "wheels" branch,
I would plan to squash this eventually. Maybe use a different branch
if you want to try some things.