1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
Commit graph

121 commits

Author SHA1 Message Date
Frederik Rietdijk 3beda443bc Python: re-enable default testing
In 303e976 default testing of setuptools packages was accidentally
disabled.
2016-05-09 18:33:43 +02:00
Frederik Rietdijk 303e976245 Python: allow installing wheels
By passing `format="wheel"` it is now possible to install a wheel.
It's not recommended, but it can be useful.
2016-05-09 13:17:42 +02:00
Nikolay Amiantov 895f51222e buildPythonPackage: add installFlags 2016-02-21 12:20:51 +01:00
Vladimír Čunát e4ab8aee62 add ensureNewerSourcesHook and apply to all python
Fixes #12663: problems in python stuff due to old timestamps in sources.
- Files in sources older than a certain year are set to that year.
- Applied with 1980 for all python packages due to the way it often uses zip.
2016-02-03 10:21:16 +01:00
Domen Kožar 07049a7edf python generic builder: fix typos 2016-01-27 13:11:20 +01:00
Domen Kožar 7a3b518d62 buildPythonPackage: fix a regression #11303 2015-11-27 11:44:34 +01:00
Domen Kožar 0c772699ba buildPythonPackage: write some comments 2015-11-26 17:31:10 +01:00
Domen Kožar cf5984e4bf buildPythonPackage: fix support for pypy 2015-11-23 17:47:35 +01:00
Rok Garbas d82f55aead pythonPackages: shellHook of buildPythonPackages needs tmp_path to have lib/pythonX.Y/site-packages folder 2015-11-23 17:43:32 +01:00
Domen Kožar 90f97c125d buildPythonPackage: use pip for development also 2015-11-21 22:17:04 +01:00
Domen Kožar c6c58dc92d release-python.nix: automatically detect buildPythonPackage 2015-11-21 21:44:12 +01:00
Domen Kožar 9bf99a5a4d buildPythonPackage: don't do build_ext if not needed 2015-11-21 21:44:12 +01:00
Domen Kožar 127a20f8da buildPythonPackage: sadly, checkPhase is too often installPhase in python 2015-11-21 21:44:12 +01:00
Domen Kožar a912c45ee2 buildPythonPackage: get rid of setupPyInstallFlags since there is no such thing 2015-11-21 21:44:12 +01:00
Domen Kožar 42acb5dc55 buildPythonPackage: fix pypy 2015-11-21 21:44:12 +01:00
Domen Kožar f900231042 buildPythonPackage: fail if two packages with the same name are in closure 2015-11-21 21:44:12 +01:00
Domen Kožar f3092d6446 buildPythonPackage: use a separate file to fire off setup.py 2015-11-21 21:44:12 +01:00
Domen Kožar a2a6f60b5a WIP: buildPythonPackages now uses wheels internally 2015-11-21 21:44:12 +01:00
Domen Kožar b666ac3e9f Revert "python: skip build at install phase"
This reverts commit d34f5b6570.

PIL and NumPy don't like this change and I'd rather spend time on
bringing wheels to Nix than fixing old infrastructure.
2015-11-15 13:50:04 +01:00
Domen Kožar 5a16c0e6e4 buildPythonPackage: clean up shellHook 2015-11-15 13:50:04 +01:00
Domen Kožar d34f5b6570 python: skip build at install phase
"python setup.py install" will also run "python setup.py build"
which we've already done in buildPhase.
2015-11-04 11:40:09 +01:00
Domen Kožar 0509252e28 python: don't pass disabled to derivation 2015-10-30 11:31:19 +01:00
Allen Nelson 6bb2e47abf using makeWrapperArgs instead of setEnvVars 2015-05-24 10:21:33 -05:00
Allen Nelson bf1a16bbea removing superfluous lets 2015-05-24 10:21:33 -05:00
Allen Nelson 06ff4af597 Adding documentation to wrap.sh, added ability to retain any desired environment variables. 2015-05-24 10:21:33 -05:00
Domen Kožar c6512f7df3 buildPythonPackage: propagate setuptools 2015-04-12 21:15:36 -04:00
Domen Kožar b653e3f661 Revert "python-generic: set meta.broken for disabled packages instead of raising an error during evaluation"
This reverts commit 79a5fec9c0.

meta.broken uses 'throw' under the hood so it can not improve the
current situation. Reverting to previous behaviour gives us correct
error message to the user indicating that interpreter is not supported.

Correcting Hydra output is out of scope of Python packaging.
2015-02-25 09:23:31 +01:00
Peter Simons 27b57469e8 python-generic: cosmetic 2015-02-13 10:37:46 +01:00
Peter Simons 79a5fec9c0 python-generic: set meta.broken for disabled packages instead of raising an error during evaluation
We have tons of evaluation errors on Hydra because it tries to build
known broken packages. Re-using meta.broken makes sure these packages
aren't evaluated in the first place.
2015-02-12 20:07:56 +01:00
Domen Kožar 9a33fbb52d python: don't propagate installed packages into userenv, refs #4949
Propagation is not needed anymore, as we have more powerful apis today
than this dirty hack. See nix-shell tool and python.buildEnv function
in nixpkgs manual.
2015-01-17 14:19:29 +01:00
Domen Kožar ab423e6367 buildPythonPackage: add python to propagatedBuildInputs
Doing:

$ nix-shell -p pythonPackage.pyramid

now also sets $PYTHONPATH. Previously you'd have to do:

$ nix-shell -p pythonPackage.pyramid python
2014-11-13 21:04:13 +01:00
Rok Garbas 602f7e5aa4 python: collision in names when developing 2 and more python packages with nix
when you run nix-shell 2 times at the same time of project (but different
branches) you get collision in names inside /tmp folder. i solved this by
hashing current path of developing folder and using that as indentifier while
still keeping name at the end.

diff --git a/pkgs/development/python-modules/generic/default.nix
b/pkgs/development/python-modules/generic/default.nix index 4c9c53a..6ec7934
100644 --- a/pkgs/development/python-modules/generic/default.nix +++
b/pkgs/development/python-modules/generic/default.nix @@ -161,11 +161,12 @@ if
disabled then throw "${name} not supported for interpreter ${python.executabl

   shellHook = attrs.shellHook or ''
     if test -e setup.py; then
-       mkdir -p /tmp/$name/lib/${python.libPrefix}/site-packages
+       tmp_path=/tmp/`pwd | md5sum | cut -f 1 -d " "`-$name
+       mkdir -p $tmp_path/lib/${python.libPrefix}/site-packages
        ${preShellHook}
-       export PATH="/tmp/$name/bin:$PATH"
-       export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
-       ${python}/bin/${python.executable} setup.py develop --prefix /tmp/$name
+       export PATH="$tmp_path/bin:$PATH"
+       export PYTHONPATH="$tmp_path/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+       ${python}/bin/${python.executable} setup.py develop --prefix $tmp_path
        ${postShellHook}
     fi
   '';
2014-09-19 14:23:45 +02:00
Domen Kožar 62345fee55 python: provide better message if python interpreter is not supported 2014-08-27 15:53:15 +02:00
Domen Kožar 47673e43c9 buildPythonPackage: introduce "disabled" argument
Useful to disable the package for specific python versions.

Typically usage: disable = isPy3k;
2014-08-24 16:02:57 +02:00
Domen Kožar 0d71d2b631 fixes #2926 2014-06-15 16:05:18 +02:00
Jussi Maki 75cb485718 ansible: conventions, fix module execution 2014-05-21 14:46:37 +02:00
Domen Kožar 296dd89030 buildPythonPackage: don't return on shellHook
Entering environment might not always be the desired effect.
2014-04-07 00:43:50 +02:00
Eelco Dolstra 1fe2a68224 quodlibet: Fix evaluation
http://hydra.nixos.org/build/9400950
2014-03-10 14:51:05 +01:00
Jaka Hudoklin 0558c87288 buildPythonPackage: add shell hook for instant development 2014-03-10 11:28:47 +01:00
Jaka Hudoklin f0f2125620 pythonPackages: auto add unzip to buildInputs if pkg has zip suffix 2014-03-08 23:29:15 +01:00
Domen Kožar f1db57f1fe buildPythonPackage: fix more borken packages 2014-02-21 18:29:57 +01:00
Domen Kožar 567e67f05f bash doesn't allow comments between multiline statements 2014-02-20 01:19:16 +01:00
Domen Kožar fa98edf2b1 fix eval 2014-02-20 01:19:16 +01:00
Domen Kožar b1ffb9ede4 buildPythonPackage: Add --old-and-unmanageable flag to install command and add more docs.
For explanation see inline comments.
2014-02-20 01:19:16 +01:00
Domen Kožar c80feaf542 document setuptools monkeypatching and DETERMINISTIC_BUILD=1 2014-02-20 01:19:16 +01:00
Domen Kožar 21ada5b105 garden 2014-02-20 01:19:16 +01:00
Domen Kožar bf5d6fb9b1 Refactor buildPythonPackage to modularize building process.
Before we used `easy_install` command to handle installation
in one shot, now this is split into two phases:

 - buildPhase: python setup.py build
 - installPhase: python setup.py install

Each of those commands have the ability to pass extra
parameters through buildPythonPackage parameters as
`setupPyInstallFlags` and `setupPyBuildFlags`.

Phases now correctly execute post/pre hooks.

In configurePhase we inject setuptools dependency before distutils
is imported to apply monkeypatching by setuptools that is needed
for special features to apply.

We don't have to reorder default phases anymore, as test
phase comes after build and that works.

I rewrote offineDistutils into distutils-cfg with a bit cleaner
syntax and ability to specify extraCfg to the config file.

Plone packages are failing and garbas said he will adopt them to
the new functions. The rest of the packages I fixed and these commits
shouldn't break any package (according to my testings) and they introduce
16 new jobs and fix 38 that were broken before.
2014-02-20 01:19:15 +01:00
Domen Kozar 918e5efb99 recurse into python33 and pypy packages 2013-07-29 14:52:19 +02:00
Domen Kozar 4993f07fee python: include python version when prefixing python packages 2013-07-29 12:09:06 +02:00
Domen Kozar 5ec6cf3756 add python3 support to pythonPackages 2013-07-29 12:09:06 +02:00