Commit Graph

576 Commits

Author SHA1 Message Date
Jan Tojnar
ef935fa101
Merge branch 'master' into staging 2018-12-24 15:02:29 +01:00
Frederik Rietdijk
3d5025ba79 buildPython*: don't override custom updateScript 2018-12-23 09:59:56 +01:00
Jörg Thalheim
1b146a8c6f
treewide: remove paxutils from stdenv
More then one year ago we removed grsecurity kernels from nixpkgs:
https://github.com/NixOS/nixpkgs/pull/25277

This removes now also paxutils from stdenv.
2018-12-22 12:55:05 +01:00
Jörg Thalheim
855777ad22 wrap-python: fix pypy site-packages path 2018-12-20 14:18:25 +00:00
Jörg Thalheim
cc30e48624
Merge pull request #52481 from Mic92/python37-cross
python37: fix cross-compilation
2018-12-20 15:06:22 +01:00
Jan Tojnar
e69ee9b53e
buildPython*: simplify updateScript
updateScript accepts a list, in which case, it will execute the head with the
tail as arguments. Switching to this style will allow us to get rid of the need
to create extra script doing just that.
2018-12-20 00:28:49 +01:00
Anders Kaseorg
85379a29ec pypy3: init at 6.0.0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-19 09:53:31 +01:00
Jörg Thalheim
ab9c602fd4
Merge pull request #40459 from andersk/pypy
pypy: 5.10.0 -> 6.0.0
2018-12-18 20:35:38 +00:00
Jörg Thalheim
14b2dcea8f python37: fix cross-compilation 2018-12-18 12:39:24 +00:00
Frederik Rietdijk
74d0b82f29 buildPython*: add updateScript to passthru
All Python packages now have an updateScript. The script calls
`update-python-libraries` and passes it the position of the derivation
expression obtained using `meta.position`. This works fine in case a Nix
expression represents only a single derivation. If there are more in it,
`update-python-libraries` will fail.
2018-12-07 15:48:54 +01:00
Anders Kaseorg
6d80927a43 pypy: Set isPy2, isPy27
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-20 01:59:08 -08:00
Anders Kaseorg
8b80dec522 pypy: Reenable tests fixed upstream
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-20 01:59:08 -08:00
Anders Kaseorg
91333c1740 pypy: Remove redundant --withmod-* flags
--allworkingmodules is already the default.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-20 01:59:08 -08:00
Anders Kaseorg
f96349c456 pypy: Change libPrefix from pypy5.10 to pypy2.7
To avoid conflicting with pypy3, as per
https://github.com/NixOS/nixpkgs/pull/34066#issuecomment-359155484.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-20 01:59:08 -08:00
Frederik Rietdijk
63c6875f26 Merge master into staging-next 2018-11-18 10:32:12 +01:00
Travis Athougies
d0eb502327 Enable cross compilation for cpython 2.7 (#50245) 2018-11-15 19:36:03 +01:00
Frederik Rietdijk
917400bcff Revert "Python: reduce amount of warnings when building with buildPython*"
Turns out that many packages' testsuites rely on the default warnings setup.

This reverts commit c1e003ff2f.
2018-11-12 18:55:50 +01:00
Franz Pletz
ae3e9b5a27 python27: add patch to fix CVE-2018-1000802 2018-11-11 09:00:31 +01:00
Frederik Rietdijk
53d00c3351 Merge master into staging-next 2018-11-10 11:08:54 +01:00
Frederik Rietdijk
b1bdce0793 python34: remove
Python 3.4 will receive it's final patch release in March 2019 and there won't
be any releases anymore after that, so also not during NixOS 2019.03.

Python 3.4 is not used anymore in Nixpkgs. In any case, migrating code from
3.4 to 3.4+ is trivial.
2018-11-04 18:48:24 +01:00
Frederik Rietdijk
c1e003ff2f Python: reduce amount of warnings when building with buildPython*
By default all warnings were printed. This occasionally resulted in
a lot of warnings leading to builds being killed.

This commit reduces the amount of warnings printed.
2018-11-04 10:19:48 +01:00
Frederik Rietdijk
e4d84434a7 python37: 3.7.0 -> 3.7.1 2018-10-20 20:58:51 +02:00
Frederik Rietdijk
241bab3a5e python36: 3.6.6 -> 3.6.7 2018-10-20 20:58:40 +02:00
Frederik Rietdijk
548ced628d python.buildEnv: new argument makeWrapperArgs
`python.buildEnv` would already wrap executables exporting `PYTHONHOME`.
With this change, it is possible to pass in additional arguments to the
underlying `makeWrapper`.
2018-10-13 12:31:52 +02:00
John Ericson
e2a2073011 Merge remote-tracking branch 'upstream/master' into staging 2018-09-26 11:23:18 -04:00
John Ericson
715e0a4e59 python-*: Format pythonPackages bindings 2018-09-25 15:27:09 -04:00
Dan Peebles
4efd4053ed stdenv/darwin: integrate a new CoreFoundation
This also updates the bootstrap tool builder to LLVM 5, but not the ones
we actually use for bootstrap. I'll make that change in a subsequent commit
so as to provide traceable provenance of the bootstrap tools.
2018-09-15 16:05:46 -04:00
John Ericson
0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
Frederik Rietdijk
3a61a94789 python35: 3.5.5 -> 3.5.6 2018-08-02 16:30:27 +02:00
Frederik Rietdijk
3bd5580b04 python34: 3.4.8 -> 3.4.9 2018-08-02 16:30:16 +02:00
Cray Elliott
3c21535b5c pypy: 5.10 -> 6.0 2018-08-01 20:49:53 -07:00
Daiderd Jordan
cacf0925a5
python-boot: add error message when accessing python.pkgs 2018-07-27 22:36:54 +02:00
Frederik Rietdijk
099c13da1b Merge staging-next into master (#44009)
* substitute(): --subst-var was silently coercing to "" if the variable does not exist.

* libffi: simplify using `checkInputs`

* pythonPackges.hypothesis, pythonPackages.pytest: simpify dependency cycle fix

* utillinux: 2.32 -> 2.32.1

https://lkml.org/lkml/2018/7/16/532

* busybox: 1.29.0 -> 1.29.1

* bind: 9.12.1-P2 -> 9.12.2

https://ftp.isc.org/isc/bind9/9.12.2/RELEASE-NOTES-bind-9.12.2.html

* curl: 7.60.0 -> 7.61.0

* gvfs: make tests run, but disable

* ilmbase: disable tests on i686. Spooky!

* mdds: fix tests

* git: disable checks as tests are run in installcheck

* ruby: disable tests

* libcommuni: disable checks as tests are run in installcheck

* librdf: make tests run, but disable

* neon, neon_0_29: make tests run, but disable

* pciutils: 3.6.0 -> 3.6.1

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/pciutils/versions.

* mesa: more include fixes

mostly from void-linux (thanks!)

* npth: 1.5 -> 1.6

minor bump

* boost167: Add lockfree next_prior patch

* stdenv: cleanup darwin bootstrapping

Also gets rid of the full python and some of it's dependencies in the
stdenv build closure.

* Revert "pciutils: use standardized equivalent for canonicalize_file_name"

This reverts commit f8db20fb3a.
Patching should no longer be needed with 3.6.1.

* binutils-wrapper: Try to avoid adding unnecessary -L flags

(cherry picked from commit f3758258b8895508475caf83e92bfb236a27ceb9)
Signed-off-by: Domen Kožar <domen@dev.si>

* libffi: don't check on darwin

libffi usages in stdenv broken darwin. We need to disable doCheck for that case.

* "rm $out/share/icons/hicolor/icon-theme.cache" -> hicolor-icon-theme setup-hook

* python.pkgs.pytest: setupHook to prevent creation of .pytest-cache folder, fixes #40273

When `py.test` was run with a folder as argument, it would not only
search for tests in that folder, but also create a .pytest-cache folder.
Not only is this state we don't want, but it was also causing
collisions.

* parity-ui: fix after merge

* python.pkgs.pytest-flake8: disable test, fix build

* Revert "meson: 0.46.1 -> 0.47.0"

With meson 0.47.0 (or 0.47.1, or git)
things are very wrong re:rpath handling
resulting in at best missing libs but
even corrupt binaries :(.

When we run patchelf it masks the problem
by removing obviously busted paths.
Which is probably why this wasn't noticed immediately.

Unfortunately the binary already
has a long series of paths scribbled
in a space intended for a much smaller string;
in my testing it was something like
lengths were 67 with 300+ written to it.

I think we've reported the relevant issues upstream,
but unfortunately it appears our patches
are what introduces the overwrite/corruption
(by no longer being correct in what they assume)

This doesn't look so bad to fix but it's
not something I can spend more time on
at the moment.

--

Interestingly the overwritten string data
(because it is scribbled past the bounds)
remains in the binary and is why we're suddenly
seeing unexpected references in various builds
-- notably this is is the reason we're
seeing the "extra-utils" breakage
that entirely crippled NixOS on master
(and probably on staging before?).

Fixes #43650.

This reverts commit 305ac4dade.

(cherry picked from commit 273d68eff8f7b6cd4ebed3718e5078a0f43cb55d)
Signed-off-by: Domen Kožar <domen@dev.si>
2018-07-24 15:04:48 +01:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Vladimír Čunát
0f01215203
Merge branch 'master' into staging-next
Hydra: ?compare=1468896
2018-07-14 18:15:30 +02:00
Daiderd Jordan
63aed85367
Merge pull request #42894 from LnL7/darwin-python37
python37: fix darwin build
2018-07-09 23:12:11 +02:00
Daiderd Jordan
0c4595a9b6
python37: fix darwin build 2018-07-09 22:34:55 +02:00
Orivej Desh
fb36c7acff Add type_getattro.patch because it is no longer downloadable (#43130)
See f2f7c4287f
2018-07-06 23:39:39 +00:00
Dmitry Kalinkin
ea08cf9e6c python37: apply distutils patch 2018-07-03 13:29:07 -04:00
Dmitry Kalinkin
29c3f32841 python36: fix on darwin
Fixes: 78e05215a7 ('python36: 3.6.5 -> 3.6.6')
2018-07-03 13:28:23 -04:00
Vladimír Čunát
c1ffc65d1a
Merge branch 'master' into staging
This apparently fixes some broken src fetches (gnuradio, twisted).
2018-07-02 11:10:26 +02:00
Jörg Thalheim
cb2862e214 python37: fix openssl detection
Before python37 was build without ssl support.
Tested with `python  -c 'import ssl'`
2018-07-01 21:00:26 +01:00
Vladimír Čunát
f7781f5293
Merge branch 'master' into staging 2018-06-30 01:41:59 +02:00
Andy Dirnberger
780959ce8f
python36: fix version in identifier 2018-06-28 23:40:47 -04:00
Frederik Rietdijk
78e05215a7 python36: 3.6.5 -> 3.6.6 2018-06-28 08:25:50 +02:00
Frederik Rietdijk
7261a66d71 python37: 3.7.0rc1 -> 3.7.0 2018-06-28 08:23:49 +02:00
Frederik Rietdijk
7c9d95fef5 python37: init at 3.7.0rc1 2018-06-25 10:41:32 +02:00
Timo Kaufmann
f2f7c4287f python: Fix upstream bugs #27177 and #25750
27177 was merged but not backported to 2.7.
There is currently an open PR for 25750.
2018-06-02 13:44:28 +02:00
Vladimír Čunát
59beaf7fa2 python: 2.7.14 -> 2.7.15 (bugfix + security)
Fixes CVE-2018-1000030, /cc #38993.

The ncurses patch no longer applied, and it appears the problems have
been resolved upstream https://bugs.python.org/issue25720
https://github.com/python/cpython/commit/6ba0b583d67
2018-05-09 16:40:35 +02:00
Matthew Justin Bauer
1d3fe7d894
Merge pull request #39576 from veprbl/pr/py3_distutils_fix
python3: add C++ compiler support for distutils
2018-05-09 06:11:44 +00:00
Matthew Justin Bauer
ca4fe58b44
Merge pull request #39627 from veprbl/pr/python_issue24658
python35, python36: fix reading large files on darwin
2018-05-01 10:23:38 -05:00
Michael Raskin
a591d28c17
Merge pull request #39464 from oxij/stdenv/docheck-infra
stdenv: implement most of #33599
2018-04-30 17:17:24 +00:00
Dmitry Kalinkin
b8917dc0f3
python35, python36: fix reading large files on darwin 2018-04-27 17:47:50 -04:00
Dmitry Kalinkin
31010e0f89
python3: add C++ compiler support for distutils
This implements 095095c4 ('python: add C++ compiler support for distutils')
for python3. Should fix various problems with python packages on darwin.
2018-04-26 18:27:42 -04:00
Jan Malakhovski
87651b32fe stdenv: steal checkInputs from buildPythonPackage
Note that a bunch of non-python packages use this attribute already.
Some of those are clearly unaware of the fact that this attribute does
not exists in stdenv because they define it but don't to add it to
their `bulidInputs` :)

Also note that I use `buildInputs` here and only handle regular
builds because python and haskell builders do it this way and I'm not
sure how to properly handle the cross-compilation case.
2018-04-26 20:22:51 +00:00
Jan Malakhovski
912cfb8aaa buildPythonPackage: use config.doCheckByDefault 2018-04-26 20:15:52 +00:00
Will Dietz
b11f3bc8e3 cpython: don't use lchmod() on Linux, fix w/musl
upstream issue:
https://bugs.python.org/issue31940

There are two PR's proposed to fix this,
but both seem to be stalling waiting for review.

I previously used what appears to be the favored
of the two approaches[1] to fix this,
with plan of keeping it musl-only until PR was merged.

However, while writing up a commit message
explaining the problem and why it needed fixing...

I investigated a bit and found it increasingly
hard to justify anything other than ...
simply not using lchmod.

Here's what I found:
* lchmod is non-POSIX, seems BSD-only these days
* Functionality of lchmod isn't supported on Linux
  * best scenario on Linux would be an error
* POSIX does provide lchmod-esque functionality
  with fchmodat(), which AFAICT is generally preferred.
* Python intentionally overlooks fchmodat()[2]
  electing instead to use lchmod() behavior
  as a proxy for whether fchmodat() "works".
  I'm not sure I follow their reasoning...
* both glibc and musl provide lchmod impls:
  * glibc returns ENOSYS "not implemented"
  * musl implements lchmod with fchmodat(),
    and so returns EOPNOTSUPP "op not supported"
* Python doesn't expect EOPNOTSUPP from lchmod,
  since it's not valid on BSD's lchmod.
* "configure" doesn't actually check lchmod usefully,
  instead checks for glibc preprocessor defines
  to indicate if the function is just a stub[3];
  somewhat fittingly, if the magic macros are defined
  then the next line of the C source is "choke me",
  causing the compiler to trip, fall, and point
  a finger at whatever is near where it ends up.
  (somewhat amusing, but AFAIK effective way to get an error :P)

I'm leaving out links to threads on mailing lists and such,
but for now I hope I've convinced you
(or to those reading commit history: explained my reasons)
that this is a bit of a mess[4].

And so instead of making a big mess messier,
and with hopes of never thinking about this again,
I propose we simply tell Python "don't use lchmod" on Linux.

[1] https://github.com/python/cpython/pull/4783
[2] 28453feaa8/Lib/os.py (L144)
[3] 28453feaa8/configure (L2198)
[4] Messes happen, no good intention goes unpunished :).
2018-04-25 21:46:13 -05:00
Jan Malakhovski
7438083a4d tree-wide: disable doCheck and doInstallCheck where it fails (the trivial part) 2018-04-25 04:18:46 +00:00
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
28299f669a 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