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
python3Packages.pythonix: 0.1.6 -> 0.1.7, fix python module #108259
Conversation
Result of 6 packages built:
|
@@ -18,6 +18,13 @@ buildPythonPackage rec { | |||
|
|||
buildInputs = [ nix boost ]; | |||
|
|||
postInstall = '' | |||
# XXX why does pythonImportsCheck not set this? | |||
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH |
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.
@FRidh @jonringer Why is this line necessary? This build install a python modules with meson. Is there something else necessary. The python module is a shared-library only, no python source code.
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.
Ah, I think I figured it out. The pythonpath is typically set by the pipInstallHook or eggInstallHook. So when we use e.g. a cmake or meson install the pythonpath isn't updated. I like your approach much better, so I just updated the comment
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.
May want to create a pyproject.toml
for the project that uses mesonpep517
as build backend. Then the backend will use meson to build a wheel and we install the wheel using pip.
https://github.com/FRidh/mesonpep517examples
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 need to wait for upstream to fix this bug so: https://gitlab.com/thiblahute/mesonpep517/-/issues/5
Pythonix uses the same python as meson, so we need to override meson to use the right python version or the module won't import. Also added a pythonImportsCheck to prevent regressions. Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 6 packages built:
The following issues got detected with the above build packages. python37Packages.nixpkgs: Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
|
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 6 packages built:
The following issues got detected with the above build packages. python37Packages.nixpkgs: Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
|
Pythonix uses the same python as meson, so we need to override
meson to use the right python version or the module won't import.
Also added a pythonImportsCheck to prevent regressions.
Corresponding upstream fix: Mic92/pythonix@ee22a8f
Motivation for this change
#103151 (comment)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)