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
Introduce a multi os travis build that builds OSX wheels #247
Conversation
.travis.yml
Outdated
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
- "$HOME/.cache/pip" | ||
deploy: |
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.
This section would have to be changed in master. It currently sends stuff to my repo which obviously wont work if merged.
Basically you update the encrypted api_key to yours (travis can encrypts with the command line client)
If you are feeling brave you can also have travis push to pypi
travis/travisRun.sh
Outdated
python -u setup.py clean | ||
CFLAGS="-O0 -g" python -u setup.py build_ext --inplace | ||
CFLAGS="-O0 -g" PYTHONUNBUFFERED=x make test | ||
python setup.py bdist_wheel |
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 can update this to only build the wheels if the OS is osx if that makes more sense.
@@ -1 +1 @@ | |||
Cython>=0.20 | |||
Cython==0.25.2 |
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.
This pin is likely not strictly required. I can roll it back if desired.
Thanks! I'll look through it and give it a try as soon as I can. The FTP failure is probably this one: |
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
- "$HOME/.cache/pip" |
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.
TODO: probably a good idea to add "$HOME/.pyenv" to this
Think I realized what I was doing wrong for manywheels. Ill update this PR assuming I did it right. |
Bah! So close. Gets all the way to "show wheels" and explodes due to a missing directory. I'll have that a deeper look tomorrow |
I suggest you also have a look at https://github.com/matthew-brett/multibuild It makes it super easy to build manylinux1 and osx wheels with Travis CI. |
I'll check it out. Thanks! |
I went ahead and added the linux wheels since I have a working build https://travis-ci.org/Bachmann1234/lxml/builds/227923232 Still working out a kink... the log shows the wheels being made the the linux wheels have not uploaded. |
Solved the last problem during the commute https://github.com/Bachmann1234/lxml/releases/tag/20170502-5 I'll rebase later |
as you may have noticed im still iterating on this. Im trying to enable static osx wheels. Im doing this by fixing the download code which fails in the osx environment. Ill post the tag if the build passes (I think it will but im wrong a whole bunch) |
Improvements could be made to build the manylinux wheels as well but this is a big change on its own. When creating a tag the wheel will pushed as a github release
I realized io is just docker linking to the repo
Ugh, Spoke too soon. One of the downloads timed out. Ill rebase and push to see if thats a blip. Will also resolve the conflicts |
That time it worked Think im done fooling with this PR until you get a chance to look at it. I managed to make a python3 wheel on osx but that wheel fails the tests with "Unsupported encoding UCS-4LE" |
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.
The previous use of ftplib was intentionally removed here: a882fd9
There were, admittedly, some issues with that, but proxy usage is a nice feature by itself.
@scoder aw jeez. OK I guess ill have to fallback to ftplib if the http call fails |
Looks cool. Thank you for going through all this. Let's see what happens when I merge it. :) |
No problem! Just remember to redo the depoly section with your repo. Travis has a client that should do it for you |
@Bachmann1234 thanks for working on this! The multibuild tools that I recommended above uses the Python.org's builds: All the osx wheels for the python scientific packages are being built using multibuild now, e.g. see https://github.com/MacPython |
@anthrotype Alrighty, ill take a look sometime next week most likey! |
Oh, I just found this: https://github.com/joerick/cibuildwheel |
Hmm. I've been hesitant to touch the windows stuff cuse the scope of this work had already grown. But what the heck, I'll give it a shot. If this works the whole system will be simpler |
That will be a different branch/pr |
Welp. My laptop decided to give out on me so I won't be able to look at that fancy build until I get that sorted. Probably at least a week |
Ugh, looks like its gonna be more like 2 weeks. |
Ok, im back. Let me take a look at this thing @anthrotype posted |
Ok, I played with both I think using multibuild is worth exploring. I'm trying that out here https://github.com/Bachmann1234/lxml-wheels Its not anywhere near done. But ill keep playing with it. @scoder is this an approach you would be ok with? As soon as I got this working I could hand the repo over. The other option would be to keep hacking away at this one and fix the issues @anthrotype mentioned. |
Seems much better, if only because it does not depend on specific CPython version numbers. The git subrepo also seems (not great but) ok. Updating the sub-repo link for each release seems doable. And I like the fact that it's a separate repo with a separate travis.yml file, so that the normal lxml repo can continue to do simple CI test builds. |
Ok, think I got this working. https://github.com/Bachmann1234/lxml-wheels/releases/tag/wheel-test-4 This should be fairly easy to use. We just update the BUILD_COMMIT for each release in .travis.yml Some notes:
|
Should I close this and we continue talking in the bug form? What are next steps? |
Just an update. I have 3.3 mac wheels. But I wont be doing 2.6 mac wheels since to do so I would have to avoid ssl validation by downgrading pip (pypa/pip#829) which I don't see as worth it (security concern for an ancient python version and users who really want that can build their own wheel) I dont think I have anything else to do. Just poke me if there is a next step. Repo is here. https://github.com/Bachmann1234/lxml-wheels if there is interest in using this repo ill write some notes in the readme |
Sorry for being slow in responding and thank you for your continued investment into this. I'll give it another try this weekend. Still have to get the travis upload set up on my side. |
I forked your repo into the lxml github organisatiion. |
I already did #249
On Mon, Jun 12, 2017 at 10:26 AM scoder ***@***.***> wrote:
I forked your repo into the lxml github organisatiion.
https://github.com/lxml/lxml-wheels
It nicely builds your lxml branch on travis:
https://travis-ci.org/lxml/lxml-wheels/builds/241921367
But master fails for 2.7:
https://travis-ci.org/lxml/lxml-wheels/builds/241999467
So I think it's missing that FTP fix. Could you maybe extract that as a
separate pull request?
I uploaded the wheels it built, let's hope they work for everyone.
https://pypi.python.org/pypi/lxml/3.8.0
Thank you for your efforts!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#247 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABc1xXylMAhokV-h2QGr9MoiEUb5237xks5sDUqIgaJpZM4NMjkJ>
.
--
-Bachmann
|
Ah, sorry, had forgotten about that one. There's always a next release ;) |
👍 Thanks. Let me know if there are any issues :-D |
Improvements could be made to build the manylinux wheels as well but
this is a big change on its own. When creating a tag the wheel
will pushed as a github release
So this is unlikely ready to merge in its current state but I think its at a point where some feedback would be helpful.
Example build
Example "release"
Here is me sanity testing the 2.7 wheel similarly to how the makefile does
and 2.6
Some notes: