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

pythonPackages.pybind11: init at 2.2.4 #54888

Merged
merged 1 commit into from
Feb 10, 2019
Merged

Conversation

FlorianFranzen
Copy link
Contributor

Motivation for this change

Add the pypi version of pybind11 to address #53497.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

The commit message should be pythonPackages.pybind11: init at 2.2.4.

@dotlambda
Copy link
Member

Can you please explain what the difference to the package added in #35027 is and why we don't need cmake for building this one?

@FlorianFranzen
Copy link
Contributor Author

Thank you for the feedback. I update the package accordingly.

Pybind11 is a header only library, that is distributed to be either used with CMake (or any other C++ build system) or within Python (with setuptool, distutil, pip, etc).

See #53497 for a python example.

@FRidh
Copy link
Member

FRidh commented Jan 29, 2019

Thanks. Please motivate the need for having a second expression in the Nix expression.

@FlorianFranzen
Copy link
Contributor Author

To quote @yuriaisaka in #35027 (comment):

pybind11 can be used in two ways: as a tool to embed python runtime to C++, and as a tool to write python modules using C++. The easiest way to achieve the latter is to use the CMake function pybind11_add_module() provided by pybind11, [...]

That is why there is a CMake based expression. This expression is direct at the first use case. For example pyopencl uses pybind11 this way.

Please see #35027 and #53497 for more details.

@FlorianFranzen FlorianFranzen changed the title pybind11: init of 2.2.4 as python package pythonPackages.pybind11: init at 2.2.4 Jan 31, 2019
@luzpaz
Copy link
Contributor

luzpaz commented Feb 5, 2019

Any progress on this ?

@dotlambda
Copy link
Member

Ran 0 tests in 0.000s

Please add an appropriate checkPhase or, if there are no tests, set doCheck = false and add a comment with the reason.

@FlorianFranzen
Copy link
Contributor Author

@dotlambda Updated check phase accordingly.

@Mic92 Mic92 merged commit 0c1ded6 into NixOS:master Feb 10, 2019
@FlorianFranzen FlorianFranzen deleted the pybind11_pip branch February 10, 2019 12:18
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.

6 participants