Packaging/Python: Difference between revisions

imported>Makefu
init with pip snippet and dev mode
 
imported>Makefu
No edit summary
Line 47: Line 47:


And the only other thing you need to do is figure out which non-Python packages your pip-installable packages will need, and include them in buildInputs.
And the only other thing you need to do is figure out which non-Python packages your pip-installable packages will need, and include them in buildInputs.
Caveats
== Caveats ==
=== ModuleNotFoundError: No module named 'pkg_resources' ===
If you see the pkg_resources issues at runetime:
<pre>
  File "/nix/store/czdpbzpv9csghfs0clw10i758mpxixbc-python3.7-acronym-1.6.0/lib/python3.7/site-packages/acronym/acronym.py", line 17, in <module>
    from pkg_resources import resource_filename
ModuleNotFoundError: No module named 'pkg_resources'
</pre>
add
<syntaxHighlight lang=nix>
  ...
  propagatedBuildInputs = [
    ...
    setuptools
  ];
}
</syntaxHighlight>
to your derivation.
== References ==