Commit graph

23 commits

Author SHA1 Message Date
Frederik Rietdijk
12e8f3c6aa python: apply wrapper to all packages in python.buildEnv extraLibs
Currently, when constructing a buildEnv and adding packages via
extraLibs, then binaries in extraLibs cannot access the other Python
modules. An example is having ipython/jupyter in extraLibs; in that case
ipython cannot import any other modules.
2015-11-30 10:52:57 +01:00
Nikolay Amiantov
344e522166 python: add .env for convenient nix-shell's 2015-08-17 21:22:50 +03:00
Domen Kožar
2d6582d14e python27FullBuildEnv -> python.buildEnv for all interpreters 2014-10-19 19:48:18 +02:00
Domen Kožar
a2a7abc67c pythonFull -> python with all modules, pythonFullWithPkgs -> buildEnv 2014-10-13 21:35:21 +02:00
Peter Simons
51c9dbc9f3 python-wrapper: add 'ignoreCollisions' parameter (which default to 'false') 2014-02-24 12:41:12 +01:00
Shea Levy
06fe4d9904 Partial revert of b09f8110db
Didn't mean to commit this change

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-19 09:04:32 -05:00
Shea Levy
b09f8110db nspr: Bump to 4.10.2
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-18 15:23:30 -05:00
Peter Simons
29588edfe1 python-wrapper: split 'extraLibs' into 'stdLibs' and 'extraLibs', and add 'postBuild' step
The default setting for extraLibs used to be the set of modules that come with
python by default but aren't usually enabled in our standard python derivation
because they require additional libraries. This meant that users who want to
*add* libraries to that set had to use a fairly complicated override, to add
more entries without loosing the ones set by default.

After this patch, the "standard libraries" such as "curses' are listed in
stdLibs while the extraLibs argument remains empty by default. This allows
users to override extraLibs without overriding the standard libraries.

Furthermore, the wrapper environment can be messed around with in an
additional 'postBuild' step. One nice application of this build step is
to patch scripts and binaries to use the wrapped python interpreter
instead of the pristine one, thereby enabling them to pick up all
modules that have been configured. The following example shows how this
is done for the 'pylint' utility:

  pkgs.python27Full.override {
    extraLibs = [pkgs.pylint];
    postBuild = ''
      cd ${pkgs.pylint}/bin
      for i in *; do
        rm $out/bin/$i
        sed -r -e "s|^exec |exec $out/bin/python -- |" <$i >$out/bin/$i
        chmod +x $out/bin/$i
      done;
    '';
  };
2013-11-07 15:13:02 +01:00
Peter Simons
46419ae454 python-wrapper: recursively include all dependencies of the specified 'extraLibs' in the generated environment
This patch means that adding 'matplotlib' to extraLibs will automatically
include 'numpy', too, because matplotlib depends on it.
2013-11-07 14:00:08 +01:00
Shea Levy
f6e835a2c3 Fix pythonWrapper when all of the binaries come from python
See discussion in #834

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-03 15:25:43 -04:00
Peter Simons
742d6597ca Re-implement python-wrapper with buildEnv.
The new wrapper creates an environment that contains all files from
Python and the extra libraries that have been specified. All files are
found at run-time by means of the $PYTHONHOME variable; the wrapper no
longer uses $PYTHONPATH.
2013-10-02 22:47:19 +02:00
Florian Friesdorf
870f4cca73 fix pythonWrapper for non-gnu ln 2013-03-25 15:13:08 +01:00
Florian Friesdorf
212b4df91c recursivePthLoader included via wrapper, not propagated by modules 2013-01-11 09:53:28 +01:00
Florian Friesdorf
3665e02901 python: make pdb.py available as bin/pdb and bin/pdb${python.majorVersion} 2012-07-20 21:43:14 +02:00
Florian Friesdorf
4956884de5 Revert "do not propagate makeWrapper via pythonXYFull"
This reverts commit 3ee2667e4c60c2ed850da8538cf135fe7f716f30.

svn path=/nixpkgs/branches/stdenv-updates/; revision=32656
2012-02-28 00:07:33 +00:00
Florian Friesdorf
bf1fe3aa09 Revert "pysite support for pythonXYFull wrapper"
This reverts commit f77b9a16a9ef52951a601997593dc557a42660b9.

svn path=/nixpkgs/branches/stdenv-updates/; revision=32653
2012-02-28 00:07:23 +00:00
Florian Friesdorf
1d2e06e068 pysite support for pythonXYFull wrapper
svn path=/nixpkgs/branches/stdenv-updates/; revision=32593
2012-02-26 17:23:42 +00:00
Florian Friesdorf
95f0b6119c do not propagate makeWrapper via pythonXYFull
svn path=/nixpkgs/branches/stdenv-updates/; revision=32589
2012-02-26 17:23:28 +00:00
Florian Friesdorf
fe9d9530ba symlink python manpage for pythonXYFull
svn path=/nixpkgs/branches/stdenv-updates/; revision=32588
2012-02-26 17:23:25 +00:00
Florian Friesdorf
09ae58fcd7 python wrapper comment
svn path=/nixpkgs/branches/stdenv-updates/; revision=32587
2012-02-26 17:23:22 +00:00
Eelco Dolstra
c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00
Peter Simons
f01ceffb9e pkgs/development/interpreters/python/wrapper.nix: clean up debug code
svn path=/nixpkgs/trunk/; revision=23200
2010-08-17 10:17:32 +00:00
Peter Simons
9670fca780 Added "python-$version-wrapper" expression.
The python wrapper expression expects a list of Python modules, $extraLibs,
which are added to $PYTHONPATH before executing the actual Python interpreter.

svn path=/nixpkgs/trunk/; revision=23194
2010-08-16 17:03:35 +00:00