Commit Graph

467 Commits

Author SHA1 Message Date
Frederik Rietdijk
09e16249c6 python: flit: 0.13 -> 1.0 2018-04-08 11:36:07 +02:00
Frederik Rietdijk
402a074cfe python3: 3.6.4 -> 3.6.5 2018-03-30 08:17:24 +02:00
Will Dietz
9aa22191cf python*: set thread stack size on musl
Ensure recursion limit is reached before stack overflow.

Python does this for OSX and BSD:
13ff24582c/Python/thread_pthread.h (L22)

Size of 1MB chosen to match value in Alpine:
https://git.alpinelinux.org/cgit/aports/commit/main/python2/APKBUILD?id=2f35283fec8ec451fe5fb477dd32ffdcc0776e89

Manual testing via Alpine's test-stacksize.py crashes on these
previously, and works with these changes.
2018-03-20 08:14:04 -05:00
Josef Kemetmüller
af0f9fa26b pythonPackages.tkinter: fix darwin build 2018-03-18 22:28:46 +01:00
Will Dietz
4f8292fb35 python2.7: drop unused cross-compile patch 2018-02-13 09:45:03 -06:00
Ben Gamari
cb5453e13a cpython: Enable cross-compilation 2018-02-13 09:44:28 -06:00
Tuomas Tynkkynen
68052b5619 python: Pull ensureNewerSourcesHook call to all-packages.nix
Documents the reason why it's needed and also prevents the
ensureNewerSourcesHook call being evaluated again and again for every
single Python package.
2018-02-13 16:32:16 +02:00
Frederik Rietdijk
870e736177 python35: 3.5.4 -> 3.5.5 2018-02-05 11:53:38 +01:00
Frederik Rietdijk
8243d2b96f python34: 3.4.7 -> 3.4.8 2018-02-05 11:53:38 +01:00
Tuomas Tynkkynen
3cd40f1a4f pypy: Doesn't support aarch64
https://hydra.nixos.org/build/67861197
2018-01-23 21:42:30 +02:00
Frederik Rietdijk
1623c8371c buildPythonPackage: rename nix_run_setup.py to nix_run_setup
If the extension is .py it tends to be picked up by tools, breaking for
example tests.
2018-01-20 13:31:14 +01:00
Frederik Rietdijk
f72a465e84 CPython and PyPy: update meta.maintainers 2018-01-20 12:25:56 +01:00
Anders Kaseorg
77e6d6c7f7 pypy: Remove redundant manual building of CFFI extensions
This hardcoded list of CFFI extension modules gets stale when PyPy adds
more, but fortunately the main translation step already builds these now
(hack_for_cffi_modules in pypy/goal/targetpypystandalone.py).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-01-18 04:22:57 -05:00
Anders Kaseorg
11c4ba3f65 pypy: 5.9.0 -> 5.10.0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-01-17 23:19:26 -05:00
John Ericson
4d2b763817
Merge pull request #26805 from obsidiansystems/cross-elegant
Make cross compilation elegant
2017-12-30 22:58:02 -05:00
John Ericson
046f091e0d treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
2017-12-30 22:04:22 -05:00
Frederik Rietdijk
5920579a3d Python: disable user site-packages in setup hook
Wrappers already included `PYTHONNOUSERSITE=1`, but now this env var is
also set in the Python setup hook. This improves purity in case of
non-sandboxes builds and nix-shell.
2017-12-30 17:09:09 +01:00
John Ericson
31e5662785
Merge pull request #32953 from obsidiansystems/python-dep-fix
buildPythonPackage: Make setup hook part of nativeBuildInputs
2017-12-21 13:13:28 -08:00
John Ericson
dc906952be buildPythonPackage: Make setup hook part of nativeBuildInputs
This is better organization in general, but also needed to make python
work with #26805.
2017-12-21 15:54:52 -05:00
Frederik Rietdijk
c9044dee32 python36: 3.6.3 -> 3.6.4 2017-12-20 10:27:10 +01:00
Frederik Rietdijk
35ccdb8632
Merge pull request #32544 from FRidh/pythonmodule
Python: rewrite requiredPythonModules to prevent stack overflows
2017-12-11 09:46:15 +01:00
Frederik Rietdijk
44f46a3293
Merge pull request #32542 from FRidh/bytecode
buildPythonPackage: remove bytecode from bin folder
2017-12-11 09:45:50 +01:00
Frederik Rietdijk
a334930490 Python: rewrite requiredPythonModules. Add requiredPythonModules attribute to derivation 2017-12-10 20:40:34 +01:00
Frederik Rietdijk
d945b3e53b buildPythonPackage: remove bytecode from bin folder
When a Python script has the extension `.py`, bytecode is generated.
Typically, executables in bin have no extension, so no bytecode is
generated. However, some packages do provide executables with
extensions, and thus bytecode is generated.
2017-12-10 16:01:09 +01:00
Frederik Rietdijk
163ba09117 python.buildEnv: always include the $out output
28299f669adc41e5278372cad952fb1e1165b44b introduced the first Python
packages having multiple outputs. The required outputs were not picked
up by `python.buildEnv` (#31857).

This commit modifies `python.buildEnv` so that it always includes the
$out output and thus fixes #31857.
2017-12-10 15:21:35 +01:00
Shea Levy
3dfbf51a25
Add gurobipy for python2.7 on darwin. 2017-12-09 15:00:43 -05:00
Shea Levy
d077d22893
python27: Enable building with alternate UCS encoding 2017-12-09 12:00:52 -05:00
Frederik Rietdijk
35f5912db5 Merge remote-tracking branch 'upstream/python-unstable' into HEAD 2017-11-23 16:38:39 +01:00
Frederik Rietdijk
6ad79678d4 Merge remote-tracking branch 'upstream/master' into HEAD 2017-11-23 16:38:31 +01:00
Frederik Rietdijk
80329e7123 python.pkgs.buildPythonPackage: some comments 2017-11-23 15:11:03 +01:00
Frederik Rietdijk
209ee2f20f python.pkgs.buildPythonPackage: do not pass attributes that stdenv.mkDerivation does not use 2017-11-23 15:11:03 +01:00
Frederik Rietdijk
42eece04e4 python.pkgs.buildPythonPackage: meta.maintainers: don't add chaoflow 2017-11-23 15:11:03 +01:00
Frederik Rietdijk
40851a4d26 Python: the pythonModule attribute
Python libraries or modules now have an attribute `pythonModule = interpreter;` to indicate
they provide Python modules for the specified `interpreter`.

The package set provides the following helper functions:

- hasPythonModule: Check whether a derivation provides a Python module.
- requiredPythonModules: Recurse into a list of Python modules, returning all Python modules that are required.
- makePythonPath: Create a PYTHONPATH from a list of Python modules.

Also included in this commit is:
- disabledIf: Helper function for disabling non-buildPythonPackage functions.
2017-11-23 15:11:02 +01:00
Joerg Thalheim
17a0c80355 pypy: cleanup indentation mess 2017-11-21 20:52:54 +00:00
Joerg Thalheim
b99226706d pypy: 5.8 -> 5.9 2017-11-21 20:50:54 +00:00
John Ericson
da19c34d0f stdenv setup: Always use both propagated files
This continues #23374, which always kept around both attributes, by
always including both propagated files: `propgated-native-build-inputs`
and `propagated-build-inputs`. `nativePkgs` and `crossPkgs` are still
defined as before, however, so this change should only barely
observable.

This is an incremental step to fully keeping the dependencies separate
in all cases.
2017-11-21 10:44:44 -05:00
Dan Peebles
0f75e6bef7 cpython: make configd optional (for sandboxed darwin bootstraps) 2017-11-08 22:20:00 -05:00
Orivej Desh
78ed9da5e4 mkPythonDerivation: let name default to ${pname}-${version} 2017-11-03 04:15:36 +00:00
Jon Banafato
f906d6d18e python36: 3.6.2 -> 3.6.3 2017-10-22 18:24:56 +02:00
John Ericson
f037625f87 Merge remote-tracking branch 'upstream/staging' into deps-reorg 2017-09-28 12:32:57 -04:00
Nikolay Amiantov
74c3cdd893 python.buildEnv: add extraOutputsToInstall attribute 2017-09-25 22:40:09 +03:00
John Ericson
531e4b80c9 misc pkgs: Basic sed to get fix pkgconfig and autoreconfHook buildInputs
Only acts on one-line dependency lists.
2017-09-21 15:49:53 -04:00
Frederik Rietdijk
96d15eaddb python27: support test/support
In the maintenance release bump in
90059701a836b0d0dbc676e2d1ce417cc5a25bd2 a certain change to /test/ was
backported from Python 3:

- bpo-30207: To simplify backports from Python 3, the test.test_support
  module was converted into a package and renamed to test.support.  The
  test.script_helper module was moved into the test.support package.
  Names test.test_support and test.script_helper are left as aliases to
  test.support and test.support.script_helper.
2017-09-17 11:09:26 +02:00
Frederik Rietdijk
90059701a8 python27: 2.7.13 -> 2.7.14
The enosys patch is not needed anymore since the patch is included in
this maintenance release.
2017-09-17 09:57:55 +02:00
Tuomas Tynkkynen
a0a8f0ac87 python2: Use system libffi on Aarch64
libffi needs a patch to actually work on aarch64 (or the cffi Python package
fails its testsuite). Of course the bundled version of libffi has the
same bug, so don't use the buggy version on aarch64.

Python3 already uses the system libffi on all platforms. I don't know
why Python2 doesn't.
2017-09-16 01:16:08 +03:00
Frederik Rietdijk
77baf6e818 python35: check LD_LIBRARY_PATH
Backports support for LD_LIBRARY_PATH from 3.6
2017-09-14 10:17:58 +02:00
Frederik Rietdijk
03898f2f23 python34: check LD_LIBRARY_PATH
Backports support for LD_LIBRARY_PATH from 3.6
2017-09-14 10:17:36 +02:00
Frederik Rietdijk
c3a0c3c9f1 Revert "python.pkgs.buildPythonPackage: use distutils-cfg to block downloads, fixes #25428"
This reverts commit b73e3bfafd42dbc9caca2eae918ce936c9471c23.

See https://github.com/NixOS/nixpkgs/issues/29103
2017-09-08 08:55:05 +02:00
Frederik Rietdijk
b73e3bfafd python.pkgs.buildPythonPackage: use distutils-cfg to block downloads, fixes #25428
While we tell pip not to fetch (with the `--no-index` option),
`setuptools` can do so itself. In the past we used a `distutils.cfg`
with `allow-hosts = None` to prevent setuptools from fetching itself.
This was removed when we started building wheels in
2562f94de4e4fd2ddc677187fa2e2848L69.

The `dist-utils.cfg` code was still there, and adding it to
`buildInputs` is sufficient.

Tested with python.pkgs.passlib by removing the `checkInputs` / `nose`.
2017-09-07 19:22:06 +02:00
Frederik Rietdijk
6d4bd78fad Merge commit '2858c41' into HEAD 2017-08-30 21:07:07 +02:00