Packaging/Python: Difference between revisions
imported>Mic92 link to language helpers instead of out-dated list of tools |
imported>Milahu + link to fetchPypi impl |
||
| Line 14: | Line 14: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
You can now run <code>nix-shell</code> and it will drop you in a shell similar to the <code>python setup.py develop</code> mode which uses the local code in <tt>./path/to/source</tt> as input. <code>propagatedBuildInputs</code> will contain the packages you need in your project. | You can now run <code>nix-shell</code> and it will drop you in a shell similar to the <code>python setup.py develop</code> mode which uses the local code in <tt>./path/to/source</tt> as input. <code>propagatedBuildInputs</code> will contain the packages you need in your project. | ||
After you've finished developing you can replace the relative path with <code>fetchFromGitHub { ... }</code> or <code>fetchPypi { ... }</code>. | After you've finished developing you can replace the relative path with <code>fetchFromGitHub { ... }</code> or <code>[https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/fetchpypi.nix fetchPypi] { ... }</code>. | ||
== Pip and Virtualenv enabled nix-shell == | == Pip and Virtualenv enabled nix-shell == | ||