Commit Graph

445 Commits

Author SHA1 Message Date
Herwig Hochleitner
fec79a9b15 pypy: 5.6 -> 5.8
this commit includes a patch, backported from master, to skip a
failing test
2017-07-25 12:01:28 +02:00
Frederik Rietdijk
8e98811f76 python36: 3.6.1 -> 3.6.2 2017-07-17 10:06:14 +02:00
John Ericson
8d76effc17 stdenv-setup: Make the package accumulators associative arrays instead of strings
This is generally cleaner: less eval, less worrying about separators,
and probably also faster. I got the idea from that python wrapper
script.
2017-07-12 15:30:56 -04:00
David McFarland
087c32715b python2: copy stub library to output on cygwin 2017-06-26 09:26:10 -03:00
Robert Scott
45ac7700fa mkPythonDerivation: obey a dontWrapPythonPrograms attribute
This should allow a python derivation to disable possibly overzealous
python program wrapping without having to override the whole fixupPhase
2017-05-27 14:25:08 +02:00
Frederik Rietdijk
c10af9e744 Python: wrapPythonPrograms: only wrap in $out/bin
Thus far all executables in a derivation were wrapped. This commit
only wraps executables in $out/bin. If other scripts need to be wrapped
as well, then one can use wrapPythonProgramsIn.
2017-05-27 14:25:08 +02:00
Frederik Rietdijk
97f67d1b5a buildPythonPackage: do not keep checkInputs
When tests are disabled, we do not want to pass checkInputs to
stdenv.mkDerivation. This reduces the build requirements and, more
importantly, helps cutting cycles.
2017-05-27 14:25:08 +02:00
Vladimír Čunát
b7fed33057
python-3.3: fixup evaluation after #25916 2017-05-24 14:09:14 +02:00
Frederik Rietdijk
acd32a4caf Python: set DETERMINISTIC_BUILD and PYTHONHASHSEED in setupHook
The Python interpreters are patched so they can build .pyc bytecode free
of certain indeterminism.

When building Python packages we currently set

```
compiling python files.
in nix store.
DETERMINISTIC_BUILD=1;
PYTHONHASHSEED = 0;
```

Instead if setting these environment variables in the function that
builds the package, this commit sets the variables instead in the Python
setup hook. That way, whenever Python is included in a derivation, these
variables are set.

See also the issue https://github.com/NixOS/nixpkgs/issues/25707.
2017-05-19 16:28:11 +02:00
Frederik Rietdijk
4fc9b1852a Merge remote-tracking branch 'upstream/master' into HEAD 2017-04-23 11:26:47 +02:00
Frederik Rietdijk
c275158f06 python36: 3.6.0 -> 3.6.1 2017-04-18 13:14:40 +02:00
Frederik Rietdijk
5c8ffe0311 Python 3.x: do not regenerate _sysconfigdata
This commit fixes several issues:

- as reported in https://github.com/NixOS/nixpkgs/issues/24924 it was
possible that the file _sysconfigdata.pyc was generated after the actual
build of the CPython interpreter. We forgot to regenerate that file
during the build. This is now fixed

- the expression of the 3.3 interpreter now also includes some of the
determinism patches even though the output isn't yet reproducible. The
reason for adding them is that this makes the expressions of the
different interpreters more similar.

- references to -dev packages are now also removed in the 3.6 package,
thereby reducing its closure size
2017-04-16 10:41:35 +02:00
Johannes Bornhold
249b34aadc
python: Move catch_conflicts.py into subdirectory (#23600)
Python does add the script's directory into "sys.path". For the case of
"catch_conflicts.py" this means "/nix/store" is added to "sys.path". This can
result in very long delays if the store contains a lot of entries.

(moved from master commit 76213d102c)
2017-04-01 12:22:36 +02:00
Vladimír Čunát
2839b101f9
Merge commit older staging
No new failures on Hydra.
2017-03-05 08:00:42 +01:00
Domen Kožar
fb40889ddb
mk-python-derivation: remove me as maintainer
The time has come ...
2017-03-03 14:37:28 +01:00
Frederik Rietdijk
a1f6b8b5fc Python 3.6 fixup expat and libffi, fixes #23406 2017-03-03 07:46:52 +01:00
Frederik Rietdijk
b588ed95b9 Python 3.4: fixup expat and libffi, fixes #23325 2017-03-02 13:17:40 +01:00
Frederik Rietdijk
079353e208 Python 2.7: increase priority - fixup
From the manual:

> This attribute should be a number, with a higher value denoting a
lower priority. The default priority is 0.

Just passing -5 or -10 wasn't sufficient, so let's make it -100.
2017-02-26 16:27:45 +01:00
Frederik Rietdijk
4bc1d02698 Python 2.7: increase priority
Higher priority than Python 3.x so that `/bin/python` points to
`/bin/python2` in case both 2 and 3 are installed.
2017-02-26 16:07:52 +01:00
Frederik Rietdijk
04b7a2791e Python 3.4: improve determinism 2017-02-26 14:51:26 +01:00
Frederik Rietdijk
57ded03833 Python 3.4: use system expat and ffi 2017-02-26 14:51:26 +01:00
Frederik Rietdijk
1bbf249bef Python 3.4: improve determinism 2017-02-26 14:51:26 +01:00
Frederik Rietdijk
d33f6f4032 Python 3.6: use system expat and ffi 2017-02-26 14:51:26 +01:00
Frederik Rietdijk
1531b5edd2 Python 3.6: improve determinism 2017-02-26 14:51:26 +01:00
Frederik Rietdijk
14a88e76cf Python 3.5: use system expat and ffi 2017-02-26 14:50:09 +01:00
Frederik Rietdijk
dd3a501a4b Python: mkPythonDerivation: use PYTHONHASHSEED=0 2017-02-26 14:50:09 +01:00
Frederik Rietdijk
8970a9c86e Python 3.5: improve determinism
- Windows installers are indeterministic and we don't need them.
- since Python 3 ensurepip is installed by default. pip is indeteministic and we don't need it.
- rebuild bytecode to ensure its deterministic
2017-02-26 14:50:09 +01:00
Frederik Rietdijk
09f6b03b2e Python 2.7: improve determinism
There is some randomness in the Windows installers. Since we don't need
them, we delete them.
2017-02-26 14:50:09 +01:00
Vladimír Čunát
2f1945dcd3
python-3.6: fix random numbers with glibc-2.25
I missed this upstream patch. /cc #22874.
2017-02-22 17:34:33 +01:00
Vladimír Čunát
cab0b445be
python-3.4: fixup with glibc-2.25 (/cc #22874)
Upstream won't support it, but let me trick the code into behaving
as if glibc was older.  It seems 3.3 branch should be unaffected.
2017-02-21 17:56:32 +01:00
Vladimír Čunát
2cb76ff1ff
Merge branch 'glibc-2.25' into staging
The largest problem-causers should be fixed now (within).
2017-02-20 21:18:48 +01:00
Nikolay Amiantov
7cbe538e94 pythonPackages.wrapPython: fix for paths with spaces 2017-02-19 01:43:12 +03:00
Vladimír Čunát
110f136dc2
python*: upstream patches to fix with glibc-2.25
https://bugs.python.org/issue29157
The 3.6 release already contains the fix (from 3.5);
the branches in-between are claimed to be unaffected.
/cc #22874.
2017-02-16 23:13:38 +01:00
Frederik Rietdijk
12285d162c pypy: inherit pythonVersion 2017-02-14 09:23:59 +01:00
Frederik Rietdijk
c2e2a4d2c5 Python: remove 2.6 2017-02-13 14:42:24 +01:00
Frederik Rietdijk
b846a53d2a python34: 3.4.5 -> 3.4.6 2017-02-08 20:48:14 +01:00
Frederik Rietdijk
939f426906 python35: 3.5.2 -> 3.5.3 2017-02-08 20:48:14 +01:00
Vladimír Čunát
adab4cd58b
Merge branch 'master' into staging 2017-02-03 11:47:38 +01:00
Frederik Rietdijk
7b6b7f6b78 Python Flit: run tests by default 2017-02-01 14:54:20 +01:00
Frederik Rietdijk
e33bc13349 Merge pull request #22086 from timbertson/pip-stderr
buildPythonPackage: send pip output to stderr
2017-01-24 11:20:53 +01:00
Tim Cuthbertson
7af2d3d6e2 buildPythonPackage: send pip output to stderr 2017-01-24 21:08:42 +11:00
Charles Strahan
d298a961f1 Merge pull request #21416 from cstrahan/mesos-1.1.0
mesos: 1.0.1 -> 1.1.0
2017-01-21 19:05:18 -05:00
Frederik Rietdijk
a3018650a3 Merge pull request #21643 from symphorien/python-tix
Python tix module
2017-01-04 20:51:33 +01:00
Symphorien Gibol
a6e3d71361 python: support the tkinter.tix module 2017-01-04 19:39:33 +01:00
Daiderd Jordan
27660cfdc0
Merge branch 'master' into staging 2017-01-04 01:42:26 +01:00
Daiderd Jordan
538d1b688a stdenv: bootstrap cmake and python on darwin 2017-01-03 18:01:47 +01:00
Herwig Hochleitner
09f66a7457 pypy: 5.4.1 -> 5.6.0 2017-01-02 13:41:28 +01:00
Frederik Rietdijk
d68aba4cfb Python: script names now include full path
Certain programs, like zim, calibre and now also apparently mercurial,
rely on sys.argv[0] providing not just the script name but the full
path.

The Python docs [1] state the following on the matter:

> argv[0] is the script name (it is operating system dependent whether
this is a full pathname or not).

Therefore, scripts should not expect to receive a full path.
Unfortunately some do. While this can be considered a bug, there doesn't
seem any reason not to provide the full path. Therefore we now provide
the full path.

[1]
https://docs.python.org/3.5/library/sys.html?highlight=sys.argv#sys.argv
2017-01-02 11:29:11 +01:00
Charles Strahan
7ebcada020
mesos: 1.0.1 -> 1.1.0 2016-12-29 20:09:46 -05:00
Frederik Rietdijk
b09000e785 python36: 3.6.0rc1 -> 3.6.0 2016-12-24 16:00:52 +01:00
Frederik Rietdijk
591eda8310 python27: 2.7.12 -> 2.7.13 2016-12-24 16:00:31 +01:00
Frederik Rietdijk
2bcd41b9ff buildPythonPackage: install builds reproducibly
Without --build a temporary directory is created to unpack the wheel in.
We now set a directory instead.
2016-12-13 14:45:05 +01:00
Frederik Rietdijk
7c8b1e7b24 python36: 3.6.0b2 -> 3.6.0rc1 2016-12-12 09:31:25 +01:00
Frederik Rietdijk
736169d01d buildPythonPackage: yet another fix, fixes #20943
I didn't copy the old behaviour correctly with
c1d98d959b
2016-12-06 16:48:55 +01:00
Frederik Rietdijk
c1d98d959b buildPythonPackage: add configurePhase, fixes #20926
I had removed the configurePhase in
https://github.com/NixOS/nixpkgs/pull/20894 because it was empty. This
seemed to break packages that use cmake.
2016-12-05 17:33:17 +01:00
Frederik Rietdijk
42bad32e13 buildPythonPackage: refactor 2016-12-05 10:29:22 +01:00
Frederik Rietdijk
31e32b6d9e Python interpreters: add pkgs attribute
A package set is constructed for a specific interpreter. Therefore, we add the
possibility to override the package set to the interpreter. This should make it
easier to override the interpreter and the package set at the same time.
2016-12-05 09:43:44 +01:00
Dmitry Kalinkin
46dd9dfc52 numpy: enable numpy.distutils patch only if it's also in distutils
Fixes: 095095c ('python: add C++ compiler support for distutils')
2016-10-26 21:29:55 +00:00
Frederik Rietdijk
7077a270bf Merge remote-tracking branch 'upstream/master' into HEAD 2016-10-26 13:06:43 +02:00
Frederik Rietdijk
85a87f5155 mkPythonDerivation: append postFixup, fixes #9204 2016-10-26 10:46:12 +02:00
Frederik Rietdijk
fea23020fe Merge pull request #19585 from veprbl/distutils_fix
python: add C++ compiler support for distutils
2016-10-25 14:16:28 +02:00
Frederik Rietdijk
3b9d7260a3 python27: add missing parameter
that was accidentally removed during merging.
2016-10-22 22:33:15 +02:00
Frederik Rietdijk
e56832d730 Merge remote-tracking branch 'upstream/master' into HEAD 2016-10-22 17:23:24 +02:00
Vladimír Čunát
d26a6a87df Merge #19450: python: fix 'nproc not found' on darwin 2016-10-22 16:49:44 +02:00
Dmitry Kalinkin
95237f828b
python: fix 'nproc not found' on darwin
Fixes: 58b862b75 ('darwin purity: pythonPackages.pandas')
Cc: @pikajude
2016-10-19 19:29:17 -04:00
Frederik Rietdijk
2081a69092 pypy: fix build 2016-10-18 23:16:10 +02:00
Frederik Rietdijk
635b4fbce8 Python3: also create symlink pkgconfig/python.pc 2016-10-18 23:16:03 +02:00
Aneesh Agrawal
708822250e Python 3.x: Add python symlink
Add a symlink for "python" in the python3 derivation to provide a
default Python executable.
2016-10-18 23:14:31 +02:00
Dmitry Kalinkin
095095c479
python: add C++ compiler support for distutils
This should help with builds against clang
2016-10-17 11:23:13 -04:00
Frederik Rietdijk
107c035bf0 Python: remove pythonSmall
In #19309 a separate output for tkinter was added.

Several dependencies of Python depend indirectly on Python. We have the
following two paths:
```
‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘libXrender-0.9.10’ -
‘libX11-1.6.4’ - ‘libxcb-1.12’ - ‘libxslt-1.1.29’- ‘libxml2-2.9.4’ -
‘python-2.7.12’

‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘fontconfig-2.12.1’ -
‘dejavu-fonts-2.37’ - ‘fontforge-20160404’ - ‘python-2.7.12’
```
Because only `tkinter` needs this, I added
```
pythonSmall = python.override {x11Support = false;};
```
to break the infinite recursion. We also still have the output
`tkinter`.

However, we might as well build without x11Support by default. Then we build with x11Support as well so we get the tkinter module and put that in a separate package.
2016-10-16 14:31:26 +02:00
Frederik Rietdijk
80433e7030 Python: further unify expressions interpreters 2016-10-14 15:52:14 +02:00
Frederik Rietdijk
cffdffe1f6 Merge pull request #19309 from FRidh/outputs
Python: use separate output for tkinter
2016-10-13 10:40:14 +02:00
Louis Taylor
39e8623906
Python 3.6: 3.6b1 -> 3.6b2 2016-10-11 22:29:22 +01:00
Frederik Rietdijk
104c50dd1a Python: remove modules and pythonFull 2016-10-10 10:33:24 +02:00
Frederik Rietdijk
a2720a25b9 Python 3.6: separate output for tkinter 2016-10-10 10:33:24 +02:00
Frederik Rietdijk
0a08fcd858 Python 3.5: separate output for tkinter 2016-10-10 10:33:24 +02:00
Frederik Rietdijk
0bd4b31f87 Python 3.4: separate output for tkinter 2016-10-10 10:33:24 +02:00
Frederik Rietdijk
cf0932ee84 Python 3.3: separate output for tkinter 2016-10-10 10:33:24 +02:00
Frederik Rietdijk
bee439207b Python 2.7: separate output for tkinter 2016-10-10 10:33:24 +02:00
Eelco Dolstra
7a4209c356 Merge remote-tracking branch 'origin/master' into staging 2016-09-20 17:46:09 +02:00
Frederik Rietdijk
8c30f3d962 python3.6: 3.6.0a3 -> 3.6.0b1
/Lib/plat* has been removed in this release.
http://bugs.python.org/issue28027
2016-09-20 15:48:32 +02:00
Frederik Rietdijk
63ec0068a7 Python on Nix is not manylinux1 compatible
Fixes https://github.com/NixOS/nixpkgs/issues/18484
2016-09-20 15:48:32 +02:00
Frederik Rietdijk
2b66563cde Python: make versions/prefixes more similar 2016-09-20 15:48:32 +02:00
Frederik Rietdijk
1dbb72b91a python.buildenv: don't filter non-python packages
python.buildenv is used to build an env that provides binaries that can
import all modules that were passed in to the env.

Before this change it filtered the propagatedBuildInputs to remove all
non-Python packages, thereby possibly reducing the amount of packages
that were referenced. However, Python packages often don't have non-
Python packages as propagatedBuildInputs. And occasionally, we do want
to be able to add other packages to the env.
2016-09-17 14:28:12 +02:00
Vladimír Čunát
52e1a198cf Merge branch 'master' into staging 2016-09-17 00:31:34 +02:00
Herwig Hochleitner
1172c6be9b pypy: 5.4.0 -> 5.4.1 2016-09-14 18:11:17 +02:00
Dan Peebles
7b9d3f8605 stdenv-darwin: upgrade a few more things
It's a long build and generally painful to split into smaller commits,
so I apologize for lumping many changes into one commit but this is far
easier.

There are still several outdated parts of the darwin stdenv but these
changes should bring us closer to the goal.

Fixes #18461
2016-09-12 01:46:44 -04:00
Josef Kemetmueller
b7819e38c4 python3.x: Patch extra stack size on darwin
Compiling python with "-Wl,-stack_size,1000000" causes problems when
compiling for example pygobject3. pygobject3 uses "python3.x-config
--ldflags" during installation and then fails when
"-Wl,-stack_size,1000000" is present. Maybe we should investigate
removing this during the build of pyobject3, but this stack_size flag is
also not used on the popular darwin homebrew-core channel for python3.5,
so it seems safe to remove it.
2016-09-04 10:14:51 +02:00
Frederik Rietdijk
203004d59a pypy27: 5.3.1 -> 5.4.0 2016-09-03 11:42:55 +02:00
Tuomas Tynkkynen
e2c6740c37 Merge commit 'adaee73' from staging into master
This one was already merged into release-16.09, so let's not have the
stable branch is ahead of master and confuse things. In addition to
that, currently we have an odd situation that master has less things
actually finished building than in staging.

Conflicts:
	pkgs/data/documentation/man-pages/default.nix
2016-09-03 01:02:51 +03:00
Eelco Dolstra
7f520bdad8 Revert "Python 2.6: add less"
This reverts commit 6b11c96c86.
2016-09-01 18:58:14 +02:00
Eelco Dolstra
1e370d7de4 Revert "Python 2.7: add less"
This reverts commit bce5a51a9f.
2016-09-01 18:58:09 +02:00
Eelco Dolstra
0810decaa7 python-3.5: Drop dependency on Berkeley DB
The previous commit revealed that Python wasn't actually using
Berkeley DB; it only had it in its closure due to the build-time flag
dump in Makefile and _sysconfigdata.py. When Python detects both GNU
gdbm and Berkeley DB at build time, it will use the former.
2016-09-01 18:57:43 +02:00
Eelco Dolstra
fdd7399a3c python-3.5: Also remove -L flags
This reduces the Python closure size by another 10 MiB.
2016-09-01 18:57:43 +02:00
Eelco Dolstra
168192f116 python-3.5: Eliminate -dev paths from the runtime closure
This reduces Python's closure size from 200 MiB to 129 MiB. Even
better would be to get move tkinter to a separate output or package
(since that would get rid of all X11 stuff), but that's a bit harder.
2016-09-01 18:57:43 +02:00
Frederik Rietdijk
e1d1a573e5 Python: fix mkPythonDerivation doCheck 2016-09-01 17:11:32 +02:00
Frederik Rietdijk
4f6b6f1472 pythonPackages: use mkPythonDerivation 2016-09-01 16:16:31 +02:00
Frederik Rietdijk
3e05cce97c Python: separate buildPythonPackage into two functions
1. mkDerivation which is used when the source is without setup.py and
not a wheel
2. buildPythonPackage which is used as before and calls mkDerivation
2016-09-01 16:16:31 +02:00
Frederik Rietdijk
725c37b4d3 Python: move wrapPython into own file 2016-09-01 16:16:31 +02:00
Frederik Rietdijk
b080748d42 Python: move python-modules/generic to interpreter folder 2016-09-01 16:16:31 +02:00