Commit Graph

1136 Commits

Author SHA1 Message Date
Frederik Rietdijk
d3ca664b6a Merge staging-next into staging 2022-10-27 10:06:54 +02:00
Frederik Rietdijk
33d12e5f0b pythonPackages: ensure all derivations provide python modules
This adds a test to ensure no new uses of `buildPythonApplication` can
be added to `python-packages.nix`.

Python packages can be grouped into two groups: 1) applications and 2)
packages providing importable modules. In `python-packages.nix` we only
want to have 2). 1) should be in the top-level package set.

To achieve this, all setup hooks need to be marked as being a setup hook.
For the setup hooks in the Python packages set this is done by creating
a new builder, `makePythonHook`.

Because there were issues with splicing, the file importing all the hooks
is converted to an extension. All non-packages were moved out of `python-packages.nix`
into `python-packages-base.nix`. The `keep` argument to `makeScopeWithSplicing
was cleaned up as well; there is no need to keep this one manually in sync
reducing the risk of breaking cross-compilation.
2022-10-27 10:03:16 +02:00
github-actions[bot]
81a6c5a54c
Merge staging-next into staging 2022-10-25 18:16:24 +00:00
Martin Weinelt
4932ed92a4
python311: 3.11.0-rc2 -> 3.11.0
https://www.python.org/downloads/release/python-3110/
https://discuss.python.org/t/python-3-11-0-final-is-now-available/20291
2022-10-25 00:30:25 +02:00
github-actions[bot]
70da3334cf
Merge staging-next into staging 2022-10-17 18:16:14 +00:00
github-actions[bot]
3834216ec6
Merge master into staging-next 2022-10-17 18:10:17 +00:00
Jörg Thalheim
0d7a8e28d0 pypy: fix executable name for 3.9 2022-10-17 14:23:01 +02:00
github-actions[bot]
bcfb4956fd
Merge staging-next into staging 2022-10-17 12:01:57 +00:00
github-actions[bot]
969a1796ef
Merge master into staging-next 2022-10-17 12:01:24 +00:00
Jörg Thalheim
ea13f7cd4c pypy: 7.3.7 -> 7.3.9 2022-10-17 10:21:06 +02:00
github-actions[bot]
ec95041d85
Merge staging-next into staging 2022-10-16 00:04:36 +00:00
Martin Weinelt
51fcbf5bb7 Merge remote-tracking branch 'origin/master' into staging-next 2022-10-16 00:18:40 +02:00
Artturin
c86122e5bd pythonInterpreters: get self from __splicedPackages
BEFORE:

the python derivation did not contain .nativeDrv and .crossDrv because
it was not from the __splicedPackages set

the python used in mk-python-derivation.nix was for host

```
nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs
[ «derivation /nix/store/bhz39ds4v02hn6x4py4mzjyilw4a589h-python3-aarch64-unknown-linux-gnu-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «deri→
```

AFTER:

the python derivation does contain .nativeDrv and .crossDrv because
it is from the __splicedPackages set

those 2 are what makes nativeBuildInputs and buildInputs function
properly

the python used in mk-python-derivation.nix is for build

```
nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs
[ «derivation /nix/store/hvb9yxgv1133cfhxxd869sibldvv2vdx-python3-3.10.7.drv» «derivation /nix/store/v880cnh4ml7czmivfbk3cdh93hz9yvbn-hook.drv» «derivation /nix/store/f243ab7wv92gqsmc9h7gr0qcnj0xcgdb-hook.drv» «derivation /nix/store/880lf8895bzn8d94lrr2y7ilgkxq0lc4-python-remove-tests-dir-hook.drv» «derivation /nix/store/fzjnhawfs1wpw58hcd1vxd9y750dc08y-python-remove-bin-bytecode-hook.drv» «derivation /nix/store/n8l59iparx98yfw8g5ydqmzmk3fdic75-setuptools-setup-hook.drv» «derivation /nix/store/7vyhynla→
```
2022-10-15 09:35:29 +02:00
Artturin
19d04b5f47 pythonInterpreters: don't use with pkgs 2022-10-15 09:35:29 +02:00
github-actions[bot]
92e8a46d79
Merge staging-next into staging 2022-10-15 06:08:33 +00:00
github-actions[bot]
4f07e7f326
Merge master into staging-next 2022-10-15 06:07:54 +00:00
Martin Weinelt
87761da934
python37: 3.7.14 -> 3.7.15
https://docs.python.org/release/3.7.15/whatsnew/changelog.html
2022-10-14 22:50:59 +02:00
Martin Weinelt
997b80d632
python39: 3.9.14 -> 3.9.15
http://docs.python.org/release/3.9.15/whatsnew/changelog.html
2022-10-14 19:03:55 +02:00
Martin Weinelt
a88ce6dc0b
python310: 3.10.7 -> 3.10.8
https://docs.python.org/release/3.10.8/whatsnew/changelog.html
2022-10-14 19:03:50 +02:00
Martin Weinelt
8444183652
python38: 3.8.14 -> 3.8.15
http://docs.python.org/release/3.8.15/whatsnew/changelog.html
2022-10-14 18:13:25 +02:00
Vladimír Čunát
00a757ed3f
Merge branch 'master' into staging 2022-10-13 08:27:55 +02:00
Alyssa Ross
3dae05bb91 update-python-libraries: enable nix command
Since the Nix command used is an implementation detail of the script,
it's the script that will have to be updated if the command changes,
it's the script that should be opting into this, rather than making
the user do it globally.
2022-10-12 11:38:55 +00:00
Alyssa Ross
6425011efe update-python-libraries: remove old Nix fallback
Since c0972c16dc ("update-python-libraries: add missing dependency nix"),
Nix will be provided as a dependency, so we know we'll always be using
a modern version and no longer need the fallback.
2022-10-12 11:38:55 +00:00
Pascal Bach
17c13ef886 rustpython: unstable-2021-12-09 -> unstable-2022-10-11 2022-10-11 22:59:44 +02:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Artturin
f4ea1208ec treewide: *Flags convert to list from str
*Flags implies a list

slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172

the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
2022-10-10 15:30:59 +03:00
Martin Weinelt
829f89581a
Merge pull request #181764 from mweinelt/glibc-without-libcrypt 2022-10-09 21:07:26 +02:00
github-actions[bot]
3b37795067
Merge staging-next into staging 2022-10-09 18:02:10 +00:00
Franz Pletz
194d852242
cpython: fix build with libxcrypt 2022-10-09 18:09:39 +02:00
Ryan Mulligan
c0972c16dc update-python-libraries: add missing dependency nix
nix is needed for nix-prefetch-url
2022-10-09 16:06:59 +00:00
Frederik Rietdijk
69ea4c8696 pythonPackages.buildPython*: also output dist when using wheel
Typically the actual wheel will be unchanged, but it is possible we use
the relax deps hook modifying the wheel.
2022-10-04 15:34:46 +02:00
Frederik Rietdijk
de5951f3c2 pythonPackages.pythonRelaxDepsHook: cleanup unpacked folder
or it will end up in the dist output.
2022-10-04 15:34:46 +02:00
John Ericson
0427e5eca8
Merge pull request #193528 from cidkidnix/android-cpyth
android: cpython: fix stdenv.cc.cc.libllvm
2022-09-29 10:42:44 -04:00
cidkidnix
94d9904072 cpython: fix stdenv.cc.cc.libllvm 2022-09-29 09:05:13 -05:00
Martin Weinelt
68c0ca4416 Merge remote-tracking branch 'origin/master' into staging-next 2022-09-25 21:36:31 +02:00
K900
641f6dd3d1 pythonDocs: fix eval 2022-09-24 10:21:54 +03:00
Artturi
c326b7e088
Merge pull request #192624 from FRidh/hooks-cross 2022-09-23 22:41:36 +03:00
Frederik Rietdijk
7a41be7b2a Python hooks: use spliced packages in hooks
This fixes issues when cross-compiling.
2022-09-23 22:19:52 +03:00
Sandro Jäckel
dfc6e194bc
pythonDocs: bring back pname+version, allow script to be executed from anywhere 2022-09-23 18:43:50 +02:00
Spencer Baugh
52117cce92 pythonDocs: 3.7 -> 3.10
Also include texinfo docs for Python 3 (they aren't generated for
Python 2)

A few minor fixes had to be made to generate.sh as well.
2022-09-23 15:18:59 +02:00
Frederik Rietdijk
86ab83260f Revert "Revert "buildPython*: store dist (wheel/sdist) in dist output""
Most packages were fixed on python-unstable.

This reverts commit 0a4898c21a.
2022-09-20 09:49:55 +02:00
Frederik Rietdijk
8895944c57 Revert "Revert "buildPython*: wrap setuptools in hook for catching conflicts""
Most packages were fixed up on python-unstable branch.

This reverts commit 3ff2d9362c.
2022-09-20 09:49:27 +02:00
Frederik Rietdijk
3ff2d9362c Revert "buildPython*: wrap setuptools in hook for catching conflicts"
Revert for now and fix on python-unstable branch.

This reverts commit 13bb0f49f7.
2022-09-19 10:01:25 +02:00
Frederik Rietdijk
0a4898c21a Revert "buildPython*: store dist (wheel/sdist) in dist output"
Revert for now and fix on python-unstable branch.

This reverts commit adbc59c9d3.
2022-09-19 10:00:42 +02:00
github-actions[bot]
86dee601b1
Merge staging-next into staging 2022-09-13 18:01:48 +00:00
Frederik Rietdijk
13bb0f49f7 buildPython*: wrap setuptools in hook for catching conflicts
By default buildPython* runs a hook for detecting conflicting packages.
This hook needs pkg_resources which is part of setuptools.

Before this commit, setuptools was simply added to the build. This meant
that when setuptools was forgotten to be added to the build, the build
and installation would still succeed because of this package from the
hook. During runtime (and cross-compilation) one would notice the
missing package.
2022-09-13 18:48:08 +02:00
Martin Weinelt
1a1cd4b6cd python311: 3.11.0rc1 -> 3.11.0rc2
https://docs.python.org/3.11/whatsnew/changelog.html#python-3-11-0-release-candidate-2
2022-09-13 18:19:34 +02:00
Frederik Rietdijk
adbc59c9d3 buildPython*: store dist (wheel/sdist) in dist output
Store the intermediate artifacts. In time, we should build, install and
test in separate derivations as that reduces circular dependencies,
avoids rebuilds when fixing tests, and makes it possible to use the
wheels for creating say virtualenv's.
2022-09-12 22:15:39 +02:00
github-actions[bot]
5de711e49b
Merge staging-next into staging 2022-09-08 18:01:54 +00:00
github-actions[bot]
60b28ae00d
Merge master into staging-next 2022-09-08 18:01:13 +00:00