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

pybind11: Unify with pythonPackages.pybind11 #74302

Merged
merged 1 commit into from Nov 29, 2019

Conversation

knedlsepp
Copy link
Member

Motivation for this change

Instead of one derivation providing a cmake-compatible library and one
providing a setuptools compatible library, we now support both ways of
consuming the library for both pybind11 and python.pkgs.pybind11.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python packages aren't able to discover it through pip

[4 built (11 failed), 89 copied (1218.4 MiB), 417.4 MiB DL]
error: build of '/nix/store/dsmkqa55zadlzvvssair3k5d9lsahlsf-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/74302
32 package failed to build:
ocrmypdf pybind11 pybitmessage python27Packages.fasttext python27Packages.fipy python27Packages.loo-py python27Packages.pyamg python27Packages.pyfma python27Packages.pyopencl python27Packages.reikna python27Packages.sasmodels python37Packages.accupy python37Packages.fasttext python37Packages.fipy python37Packages.loo-py python37Packages.pikepdf python37Packages.pyamg python37Packages.pyfma python37Packages.pyopencl python37Packages.reikna python37Packages.sasmodels python38Packages.accupy python38Packages.fasttext python38Packages.fipy python38Packages.loo-py python38Packages.pikepdf python38Packages.pyamg python38Packages.pyfma python38Packages.pyopencl python38Packages.reikna python38Packages.sasmodels sasview

2 package were built:
python37Packages.pybind11 python38Packages.pybind11

@jonringer
Copy link
Contributor

example failure:

  distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pybind11>=2.2')
cannot build derivation '/nix/store/pcsz0i6rfngll7bypcbdmbsxxpzinmh0-python3.8-accupy-0.2.0.drv': 1 dependencies couldn't be built

@knedlsepp knedlsepp changed the title pybind11: Unify with pythonPackages.pybind11 WIP - pybind11: Unify with pythonPackages.pybind11 Nov 27, 2019
@knedlsepp knedlsepp force-pushed the unify-pybind branch 2 times, most recently from a5c0291 to fd60bbf Compare November 28, 2019 19:44
Instead of one derivation providing a cmake-compatible library and one
providing a setuptools-compatible library, we now support both ways of
consuming the library for both pybind11 and python.pkgs.pybind11.
@knedlsepp knedlsepp changed the title WIP - pybind11: Unify with pythonPackages.pybind11 pybind11: Unify with pythonPackages.pybind11 Nov 28, 2019
@knedlsepp
Copy link
Member Author

@GrahamcOfBorg build python2Packages.pybind11 python37Packages.pybind11 python38Packages.pybind11 python3Packages.accupy python38Packages.pyopencl

@knedlsepp
Copy link
Member Author

knedlsepp commented Nov 28, 2019

example failure:

  distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pybind11>=2.2')
cannot build derivation '/nix/store/pcsz0i6rfngll7bypcbdmbsxxpzinmh0-python3.8-accupy-0.2.0.drv': 1 dependencies couldn't be built

@jonringer Sorry for opening this PR before it was ready. I think it's now in a state where it should do as advertised. Do you mind taking a look again? :)

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff LGTM

sasview was broken on master, needs some love. But that can be done outside of this PR

[35 built (1 failed), 566 copied (3337.4 MiB), 887.6 MiB DL]
error: build of '/nix/store/di8k6m09y5hka6waw4fg5d1qf1kqbnsj-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/74302
1 package failed to build:
sasview

33 package were built:
ocrmypdf pybind11 pybitmessage python27Packages.fasttext python27Packages.fipy python27Packages.loo-py python27Packages.pyamg python27Packages.pyfma python27Packages.pyopencl python27Packages.reikna python27Packages.sasmodels python37Packages.accupy python37Packages.fasttext python37Packages.fipy python37Packages.loo-py python37Packages.pikepdf python37Packages.pyamg python37Packages.pybind11 python37Packages.pyfma python37Packages.pyopencl python37Packages.reikna python37Packages.sasmodels python38Packages.accupy python38Packages.fasttext python38Packages.fipy python38Packages.loo-py python38Packages.pikepdf python38Packages.pyamg python38Packages.pybind11 python38Packages.pyfma python38Packages.pyopencl python38Packages.reikna python38Packages.sasmodels

@jonringer jonringer merged commit 084eaa4 into NixOS:master Nov 29, 2019
@knedlsepp
Copy link
Member Author

Thx. Gave sasview a glance. Looks like the wxPython installation in general is at fault since it's site-packages directory contains a "build" directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants