Skip to content
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

Python bindings should be in a separate output #20516

Closed
FRidh opened this issue Nov 18, 2016 · 3 comments
Closed

Python bindings should be in a separate output #20516

FRidh opened this issue Nov 18, 2016 · 3 comments

Comments

@FRidh
Copy link
Member

FRidh commented Nov 18, 2016

Issue description

Many libraries come with Python bindings. These are typically built with the default Python interpreter. As we're switching to Python 3, this is causing some issues, since many cannot be built with Python 3.

What we need to do is:

  • put Python bindings in a separate output, py.
  • refer to these bindings from python-packages.nix.

Then, when a package requires those Python bindings, you would include pythonXXPackages.thebindings, and preferably with python.withPackages.

See for example #20251.

@FRidh FRidh added this to the 17.03 milestone Nov 18, 2016
@vcunat
Copy link
Member

vcunat commented Nov 21, 2016

In that example the bindings seem hard-coded to the python2 passed to the original build. In general I don't see how you intend them to react to pythonXXPackages version.

@FRidh
Copy link
Member Author

FRidh commented Nov 22, 2016

in python-packages.nix the python2 that is passed could be a python3, but because the packages are not compatible with python3 an exception is raised. I think we should use the pythonPackages.package versions if the bindings are required, since that will prevent mixing python2 and python3 packages as is happening I think with the python3 branch (again).

Note I made a small error in the case of libxml2, this example is perhaps better
dbdda72

@globin globin modified the milestones: 17.09, 17.03 Mar 15, 2017
@matthewbauer matthewbauer modified the milestones: 17.09, 18.09 Apr 17, 2018
@matthewbauer matthewbauer modified the milestones: 18.09, 19.03 Nov 5, 2018
@FRidh FRidh modified the milestones: 19.03, 19.09 Mar 10, 2019
@FRidh FRidh removed this from the 19.09 milestone Aug 18, 2019
@FRidh
Copy link
Member Author

FRidh commented Aug 18, 2019

This is now done with several packages as is clear from looking at python-packages.nix. So far, I don't think there are any issues with this approach.

@FRidh FRidh closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants