-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Add manylinux support #18
Conversation
@zimbatm @adisbladis care to have a quick look already? Especially the refactoring @andir and I put some effort into it and there is a small part left still. Obviously this will get harder to keep up to date once more stuff gets merged. I think the refactoring should be quite beneficial and make the code easier to work with.. |
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.
just a quick pass
Provides a `select` function that picks the most appropriate `.whl` file based on platform, arch, python version and manylinux/OSX - version. - Adds unit tests for pep425 - Adds test for manylinux support - Fixes overrides: `passhtru` must be extended, not overwritten - Don't strip python packages: this screws up manylinux binaries
- Extract utility functions to ./lib.nix - Extract buildPythonPackage to ./mk-poetry-dep.nix - Replace some functions with existing builtin functions - Use lib.partition for python package splitting - Drop package filtering on the top-level and leave it to pep425.nix
f1421c2
to
5741d9e
Compare
As per NixOS/nixpkgs#75763 this environment variable is not needed anymore. Instead python interpreters are now assuming compatibility by default.
The manylinux support works but needs to remain disabled until the necessary nixpkgs changes have been merged and propagated.
haven't checked in detail but on a glance this looks good to me. |
Drp `poetrylock` and `pyproject` mandatory arguments without default values and drops `src` from `mkPoetryPyhon`. Fix test invocations with invalid arguments.
Make sure that whl files using notation such as "py2|py3|py2.py3" and/or files using "any" in the `abi` tag are accepted as well.
29915be
to
d8eb359
Compare
- Add info on mkPoetryApplication - Add info on mkPoetryEnv - Add info about manylinux
d8eb359
to
54b4370
Compare
Description
This PR adds manylinux support to poetry2nix. It depends on a nixpkgs revision that has the following changes:
_manylinux.py
files from python interpretersAdditional Info
selectWheel: The added
pep425.nix
provides aselectWheel
function which picks a preferred.whl
based on python version, arch and some heuristics. HoweverselectWheel
is only ever used if no source distribution is available.mkPoetryEnv: Provides a python environment with the packages specified by poetry. This is useful in scenarios when you don't want to actually build a python application per se but instead want to provide an python environment to work with.
Refactoring The PR also contains quite some refactoring which aims to make the code base easier to use with. On several occasions code was extracted, let bindings reduced or some functions could be replaced with builtin or lib functions.
Some additional work was required to get this over the finish line...
py2
orpy3
and especiallypy2.py3
would not be picked up. I fixed all of that and added proper tests for those scenarios.mkPoetryEnv
where all packages specified in the poetry lock file are readily available. If you usemkPoetryPython
without actually forcing/referencing to some poetry dependency you will get a vanilla python package instead.poetryLock
tomkPoetryApplication
which doesn't even exist. However the combination of a default argument and...
for additional arguments meant this remained unnoticed. I removed the default arguments and also removedsrc
frommkPoetryPython
andmkPoetryEnv
which both don't need it.