Commit Graph

1529 Commits

Author SHA1 Message Date
Gaetan Lepage
f99f9ced56 rustpython: 0.2.0 -> 0.3.0 2023-11-22 17:08:07 +01:00
Martin Weinelt
d9327a53de Revert "python2/mk-python-derivation: disable catchConflictsHook"
This reverts commit 397a8fd06b.

The hook now uses the old implementation based on the deprecated
pkg_resources library provided by setuptools again.
2023-11-18 12:58:15 +01:00
Martin Weinelt
f292ef4958
python/hooks: restore catchConflictHook for python<3.10
By restoring and diverting to the old version.

Previously the newer language features and use of more modern stdlib
imports broke the hook on Python<3.10.
2023-11-18 12:57:18 +01:00
K900
397a8fd06b python2/mk-python-derivation: disable catchConflictsHook
It's broken on Py2. Hopefully people still using 2 know what they're doing?
2023-11-17 07:48:13 +03:00
github-actions[bot]
6a7c026ba7
Merge master into staging-next 2023-11-14 06:01:03 +00:00
Silvan Mosberger
7eddbf5690
Merge pull request #265710 from ShamrockLee/lib-copy-function-args
lib.mirrorFunctionArgs: init
2023-11-14 05:33:40 +01:00
github-actions[bot]
5725d489f3
Merge staging-next into staging 2023-11-09 12:01:36 +00:00
Alyssa Ross
e3e57b8f18 lib.systems: elaborate Rust metadata
We need this stuff to be available in lib so make-derivation.nix can
access it to construct the Meson cross file.

This has a couple of other advantages:

 - It makes Rust less special.  Now figuring out what Rust calls a
   platform is the same as figuring out what Linux or QEMU call it.

 - We can unify the schema used to define Rust targets, and the schema
   used to access those values later.  Just like you can set "config"
   or "system" in a platform definition, and then access those same
   keys on the elaborated platform, you can now set "rustcTarget" in
   your crossSystem, and then access "stdenv.hostPlatform.rustcTarget"
   in your code.

"rustcTarget", "rustcTargetSpec", "cargoShortTarget", and
"cargoEnvVarTarget" have the "rustc" and "cargo" prefixes because
these are not exposed to code by the compiler, and are not
standardized.  The arch/os/etc. variables are all named to match the
forms in the Rust target spec JSON.

The new rust.target-family only takes a list, since we don't need to
worry about backwards compatibility when that name is used.

The old APIs are all still functional with no warning for now, so that
it's possible for external code to use a single API on both 23.05 and
23.11.  We can introduce the warnings once 23.05 is EOL, and make them
hard errors when 23.11 is EOL.
2023-11-09 10:02:24 +01:00
Randy Eckenrode
34b48d4af6
python2: fix build with clang 16 on x86_64-darwin
Apply the patch to fix using libutil.h instead of util.h on Darwin for
`forkpty` and `openpty`.
2023-11-08 19:08:48 -05:00
github-actions[bot]
d49b3ff9e3
Merge staging-next into staging 2023-11-08 12:02:19 +00:00
Fabián Heredia Montiel
2188896a57 python3Packages.sphinxHook: fix eval after merge of bc2d598878 2023-11-08 01:51:41 -06:00
Adam Joseph
ba2ed469c2
Merge branch 'master' into staging-next 2023-11-08 06:15:46 +00:00
Weijia Wang
8012034692 Merge branch 'staging-next' into staging 2023-11-07 03:41:49 +01:00
Yueh-Shun Li
b3e2c15000 makeOverridablePythonPackage: preserve function arguments 2023-11-07 01:58:48 +00:00
Adam Joseph
f0011fd103 python: deprecate pythonForBuild in favor of pythonOnBuildForHost 2023-11-07 02:28:58 +02:00
Weijia Wang
32da89a1a1 Merge branch 'master' into staging-next 2023-11-06 14:33:18 +01:00
Adam Joseph
bc2d598878 treewide: change pythonForBuild to pythonOnBuildForHost 2023-11-05 17:42:12 -08:00
Adam Joseph
563a66dc31 python: add python.pythonOnBuildForHost 2023-11-04 21:29:33 -07:00
Weijia Wang
9627659c22 Merge branch 'master' into staging-next 2023-11-04 17:27:09 +01:00
natsukium
56b570d6af
python311Packages.python-docs-theme: rename from python_docs_theme 2023-11-04 12:34:41 +09:00
Martin Weinelt
646c23a2f7
buildPythonPackage: port catch-conflicts to importlib.metadata
To escape the pkg_resources API deprecation:

> catch-conflicts.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

Also remove exceptions for the previus bootstrap packages.
2023-10-30 12:42:36 +01:00
Frederik Rietdijk
7a0d080298 python3.pkgs.buildPython*: allow overriding of the stdenv
With this change it is possible to pass in `stdenv` directly to
`buildPython*` or override it using e.g.

```
numpy.overridePythonAttrs(_: {
  stdenv = clangStdenv;
})
```
2023-10-19 18:56:47 +02:00
github-actions[bot]
3c8c81154a
Merge staging-next into staging 2023-10-18 12:02:01 +00:00
github-actions[bot]
8e8fc73296
Merge master into staging-next 2023-10-18 12:01:25 +00:00
Martin Weinelt
13c8e4299a
python313: init at 3.13.0a1
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-1
2023-10-17 23:06:20 +02:00
github-actions[bot]
ba519bf3b1
Merge staging-next into staging 2023-10-17 00:02:46 +00:00
github-actions[bot]
8c62479810
Merge master into staging-next 2023-10-17 00:02:14 +00:00
Meet Barot
a76390f69c python3*: Add meta.pkgConfigModules and test 2023-10-16 00:36:25 -04:00
github-actions[bot]
c68d98e9d4
Merge staging-next into staging 2023-10-13 18:01:31 +00:00
Yureka
ef60280d57
python311: fix cross to/from musl (#260641)
The situation:

Python <3.11: under Linux the abi string is always -gnu*

Python 3.11-3.12: musl is treated as its own abi in the python build system, but when cross-compiling the build host's libc is used for the target abi string. Cross compiling from glibc to musl gives a -gnu* target abi string and vice versa.

Python >=3.13: musl is treated as its own abi, and when cross-compiling the target libc is used for the target abi string

We backport the fix for python 3.11-3.12, since the intermediate state is almost impossible to model in the nix expression
2023-10-13 17:47:11 +02:00
Artturi
183df628da
Merge pull request #258223 from OroraTech/fix/propagated-sphinx 2023-10-13 07:18:12 +03:00
github-actions[bot]
e1565d6a86
Merge staging-next into staging 2023-10-09 18:01:36 +00:00
github-actions[bot]
75d4639be3
Merge master into staging-next 2023-10-09 18:00:59 +00:00
Yureka
1d3c3d4f5b python: simplify ABI name detection 2023-10-09 15:12:20 +00:00
Martin Weinelt
edd561abce
python311: 3.11.5 -> 3.11.6
https://docs.python.org/release/3.11.6/whatsnew/changelog.html
2023-10-03 10:31:23 +02:00
github-actions[bot]
23a7292114
Merge master into staging-next 2023-10-02 18:01:04 +00:00
Martin Weinelt
1fcb41f796
python312: 3.12.0-rc3 -> 3.12.0
https://docs.python.org/dev/whatsnew/3.12.html
https://docs.python.org/release/3.12.0/whatsnew/changelog.html
2023-10-02 17:47:17 +02:00
Leandro Reina
48f25989c3 python3Packages.sphinxHook: Avoid propagating sphinx
Fixes some side effects of #249157 (see #255810)
2023-09-30 18:21:18 +02:00
natsukium
836da00391 python311: 3.11.4 -> 3.11.5
https://docs.python.org/release/3.11.5/whatsnew/changelog.html

Fixes: CVE-2023-40217
2023-09-27 15:32:44 +02:00
natsukium
6086908c98 python310: 3.10.12 -> 3.10.13
https://docs.python.org/release/3.10.13/whatsnew/changelog.html

Fixes: CVE-2023-40217
2023-09-27 15:32:44 +02:00
Martin Weinelt
d77e13848d python3: 3.10 -> 3.11
Updates the default python version to 3.11, while keeping 3.10 around
until after the NixOS 23.11 release.
2023-09-27 15:32:44 +02:00
github-actions[bot]
cc5ae613ff
Merge master into staging-next 2023-09-26 00:02:17 +00:00
Thiago Kenji Okada
d72b2ed9ac python27: disable tests that expect Python 3+ 2023-09-25 14:51:43 +01:00
github-actions[bot]
3e52e5929d
Merge master into staging-next 2023-09-25 12:01:02 +00:00
Thiago Kenji Okada
795e0c0851 pypy310: init at 3.7.12 2023-09-25 12:21:36 +01:00
Thiago Kenji Okada
2b0c3f0001 pypy39: 3.7.11 -> 3.7.12 2023-09-25 12:07:50 +01:00
Thiago Kenji Okada
e0874acbdd pypy27: 7.3.11 -> 7.3.12 2023-09-25 12:03:58 +01:00
Thiago Kenji Okada
9b15be3aa9 pythonInterpreters.pypy39_prebuilt: 7.3.11 -> 7.3.12 2023-09-25 12:03:19 +01:00
Thiago Kenji Okada
6ae570f76b pythonInterpreters.pypy27_prebuilt: 3.7.11 -> 3.7.12 2023-09-25 11:50:03 +01:00
Peder Bergebakken Sundt
bdda7b0a53 python3Packages.flitBuildHook: remove 2023-09-22 21:11:24 +02:00
github-actions[bot]
2b20c287ac
Merge master into staging-next 2023-09-21 00:02:13 +00:00
Martin Weinelt
eaf1374d93
Merge pull request #256132 from SuperSandro2000/python2
python2: 2.7.18.6 -> 2.7.18.7
2023-09-21 00:51:12 +02:00
Fabián Heredia Montiel
b2f85dbf28 Merge remote-tracking branch 'origin/master' into staging-next 2023-09-20 15:08:16 -06:00
Martin Weinelt
f74c16f4fc
python312: 3.12.0rc2 -> 3.12.0rc3
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0rc3
2023-09-20 03:10:36 +02:00
Sandro Jäckel
63f0a174a0
python2: 2.7.18.6 -> 2.7.18.7 2023-09-19 16:18:58 +02:00
Lassulus
67b2f14549
Merge pull request #254547 from DavHau/fix-pyproject-build
python3.pkgs.pypaBuildHook: fix conflicts via propagated inputs
2023-09-15 21:40:45 +02:00
Frederik Rietdijk
53dd1a6edb
Merge pull request #254136 from figsoda/python
python310Packages.buildPythonPackage: introduce pyproject option
2023-09-14 18:33:49 +02:00
figsoda
6893201945 python310Packages.buildPythonPackage: introduce pyproject option 2023-09-12 19:54:03 -04:00
DavHau
c57e6b692a python3.pkgs.pypaBuildHook: fix conflicts
This modifies the pypaBuildHook to not propagate its own python dependencies into the build environment. This prevents package conflicts.

- modify pypa-build-hook.sh to call pyproject-build via an absolute path. This removes the need of putting the dependencies inside the hook's propagatedBuildInputs
- remove the hook's dependencies from propagatedBuildInputs
- add a passthru test to the hook testing for the fix
2023-09-12 21:04:26 +02:00
Anderson Torres
3fc613c5ba
Merge branch 'master' into staging-next 2023-09-11 23:25:38 +00:00
Martin Weinelt
1faf0ef118
Merge pull request #254221 from natsukium/cpython312/update
python312: 3.12.0b4 -> 3.12.0rc2; python38: 3.8.17 -> 3.7.18; python39: 3.9.17 -> 3.9.18
2023-09-11 16:47:20 +02:00
github-actions[bot]
b6eb350562
Merge master into staging-next 2023-09-10 00:02:16 +00:00
Leandro Reina
a391639845 python3Packages.sphinxHook: Fix cross compilation
Failed due to using host sphinx instead of build one.
2023-09-09 21:34:33 +02:00
natsukium
0a6f3b5857
python39: 3.9.17 -> 3.9.18
https://docs.python.org/release/3.9.18/whatsnew/changelog.html

Fixes: CVE-2023-40217
2023-09-09 19:42:16 +09:00
natsukium
ab5b8e656a
python38: 3.8.17 -> 3.8.18
https://docs.python.org/release/3.8.18/whatsnew/changelog.html

Fixes: CVE-2023-40217
2023-09-09 19:42:16 +09:00
natsukium
bc9bf8621c
python312: 3.12.0b4 -> 3.12.0rc2
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0rc2

Fixes: CVE-2023-40217
2023-09-09 19:42:07 +09:00
github-actions[bot]
d987b47512
Merge master into staging-next 2023-09-08 06:00:58 +00:00
marius david
a02761d722 python311: enable cross-compilation to windows 2023-09-07 02:16:21 +03:00
Sandro Jäckel
28c0cd5b17 cpython: remove broken include/python3.X/python3.Xm symlink
The m flag was removed in Python 3.8:
https://docs.python.org/3/whatsnew/3.8.html#build-and-c-api-changes

Co-authored-by: Anders Kaseorg <26471+andersk@users.noreply.github.com>
2023-09-01 02:52:50 +03:00
Theodore Ni
130e063a3d
pypaInstallHook: enter "dist" directory before installing (#250464) 2023-08-21 08:45:47 +02:00
Theodore Ni
d494084017
Merge branch 'staging-next' into staging
Merging https://github.com/NixOS/nixpkgs/pull/245957 with https://github.com/NixOS/nixpkgs/pull/246022.
2023-08-20 20:09:45 -07:00
Theodore Ni
dab839357e
Merge branch 'master' into staging-next
Had to merge https://github.com/NixOS/nixpkgs/pull/245957 and
https://github.com/NixOS/nixpkgs/pull/247245.
2023-08-20 12:01:22 -07:00
Artturi
bde196dde9
Merge pull request #245957 from amjoseph-nixpkgs/pr/lib/customization/makeScopeWithSplicing2 2023-08-20 18:57:05 +03:00
Theodore Ni
dd1256d2ca python3.pkgs.pythonRelaxDepsHook: don't propagate wheel
The usage of wheel should be restricted to the hook. I discovered this
when trying to remove wheel from the Python bootstrap. Some packages
that needed wheel did not need it added explicitly because they use this
hook. This implicit change to the dependency tree shouldn't happen (even
though it is mostly harmless).
2023-08-20 11:00:51 +02:00
Theodore Ni
4e7188c39a python3.pkgs.buildPythonPackage: disable conflict check for setuptools and wheel
We can do this automatically for packages we know cannot use the
conflict check hook when it would lead to infinite recursion.
2023-08-20 10:59:47 +02:00
Theodore Ni
6c85fff302 python3.pkgs.buildPythonPackage: switch to PyPA build and installer 2023-08-20 10:59:47 +02:00
Theodore Ni
e8cca499a8 python2.{buildPythonPackage,buildPythonApplication}: extract into its own file
As we continue iterating on Python infrastructure for Python 3, some
code is starting to diverge for Python 2. If we copy the current state
of mk-python-derivation.nix and freeze it for Python 2, we can iterate
on it for Python 3 with more freedom.
2023-08-20 10:59:46 +02:00
Theodore Ni
93d25dda84 python3.pkgs.pypaBuildHook: switch to pyproject-build
Upstream's recommended "python -m build" way of invoking build fails
when the working directory contains a file named "build.py". This is
common for poetry projects that build C extensions.
2023-08-20 10:59:46 +02:00
Theodore Ni
a4d66bcc5f python3.pkgs.pypaInstallHook: init 2023-08-20 10:59:46 +02:00
github-actions[bot]
bb1bf988bc
Merge staging-next into staging 2023-08-19 12:01:31 +00:00
github-actions[bot]
d3b2560b73
Merge master into staging-next 2023-08-19 12:01:03 +00:00
Theodore Ni
4ed77bebec
Merge pull request #247868 from doronbehar/pkg/python-tk-test
python.tests.tkinter: init
2023-08-19 04:04:24 -07:00
Doron Behar
ca499f6965 python.tests.tkinter: init 2023-08-19 14:00:56 +03:00
Theodore Ni
ece0953571
Merge branch 'staging-next' into staging 2023-08-18 16:02:27 -07:00
github-actions[bot]
03146a5454
Merge master into staging-next 2023-08-18 06:01:01 +00:00
Nick Cao
e19e2222d7
python3Packages.pythonNamespacesHook: use findutils from buildPackages (#249864) 2023-08-18 07:39:36 +02:00
Adam Joseph
cbc8aa437c treewide: use uncurried version of makeScopeWithSplicing 2023-08-14 02:51:10 +03:00
Thiago Kenji Okada
5dda73a162
Merge pull request #248516 from thiagokokada/remove-version-from-python-relax-deps-hook
pythonRelaxDepsHook: remove version from pkg_name
2023-08-12 00:57:55 +00:00
Thiago Kenji Okada
98de48fc8f pythonRelaxDepsHook: remove version from pkg_name
Since the wheel file name is based on the package metadata instead of
what we set in the derivation, if you set the version as `unstable-YYYYMMDD`,
for example, the hook would silently fail. We will ignore the version
now and just use a glob instead to match anything that has the package
name in its path.

Fixes #248185.
2023-08-11 14:56:14 +01:00
github-actions[bot]
80be812da1
Merge staging-next into staging 2023-08-09 06:01:27 +00:00
Ben Wolsieffer
02719f21e6
cpython: fix _PYTHON_SYSCONFIGDATA_NAME on armv7l with musl (#240770)
Python always uses "gnu" prefixed ABI names, and this patch handles this by
doing a musl->gnu string replacement.

With pkgsCross.armv7l-hf-multiplatform.pkgsStatic, the previous name was:
_sysconfigdata__linux_arm-linux-gnu
Now, the corrected name is:
_sysconfigdata__linux_arm-linux-gnueabihf
2023-08-09 07:16:58 +02:00
github-actions[bot]
792f4d7934
Merge staging-next into staging 2023-08-08 18:01:27 +00:00
Sandro Jäckel
4514e57231 cpython: use correct variable to set meta.mainProgram 2023-08-08 17:25:28 +00:00
Adam Joseph
e67ff6614b
Merge pull request #247245 from Artturin/passthrufunthng1
Revert "Revert "python3: splice python within python3Packages.callPackage""
2023-08-05 21:33:38 +00:00
Artturin
8eff2eea8c Revert "Revert "python3: splice python within python3Packages.callPackage""
This reverts commit 2ffca30cde.

`793cc9d982415b71cdba729cf779bfc49e9d2ae7` `python3: splice python within python3Packages.callPackage`
Was reverted because it broke
`pkgsCross.aarch64-multiplatform.python3Packages.cryptography`

But by reverting the revert `pkgsCross.aarch64-multiplatform.python3Packages.cryptography` still builds.

I tried reverting the 2 cryptography update commits, and it still
worked, so I do not know why this would work now.
2023-08-05 02:37:16 +03:00
github-actions[bot]
5827446dce
Merge master into staging-next 2023-08-03 00:01:56 +00:00
Robert Hensing
34ee0260ec treewide: Add meta.mainProgram
Based on ofborg feedback.
Part of https://github.com/NixOS/nixpkgs/pull/246386
2023-08-01 12:21:05 +02:00
Silvan Mosberger
a0b8caf3bc
Revert "lib.customisation: uncurry makeScopeWithSplicing" 2023-07-28 23:04:09 +02:00
Artturin
3716ef19d8 lib.makeScopeWithSplicing: provide default for keep,extra
These are often unneeded by the user.
2023-07-28 17:41:01 +03:00
Doron Behar
6560d0086c python3.pkgs.pypaBuildHook: init 2023-07-28 12:13:25 +02:00
Doron Behar
1298c367b1 pip-build-hook.sh: Support $pipBuildFlags 2023-07-28 12:13:25 +02:00
Adam Joseph
52d3944057
Merge pull request #212795 from Cynerd/setuptools-rust-hook
Setuptools rust hook for cross compilation
2023-07-28 06:53:09 +00:00
Adam Joseph
cb13669b00 lib.customisation: uncurry makeScopeWithSplicing
Deeply-curried functions are pretty error-prone in untyped languages
like Nix.  This is a particularly bad case because
`top-level/splice.nix` *also* declares a makeScopeWithSplicing, but
it takes *two fewer arguments*.

Let's switch to attrset-passing form, to provide some minimal level
of sanity-checking.
2023-07-27 21:31:59 -07:00
github-actions[bot]
d1b1f7fda7
Merge staging-next into staging 2023-07-27 06:01:53 +00:00
Adam Joseph
2ffca30cde
Revert "python3: splice python within python3Packages.callPackage" 2023-07-27 01:42:35 +00:00
github-actions[bot]
dc058faf6b
Merge staging-next into staging 2023-07-27 00:02:38 +00:00
Artturi
906f999a2f
Merge pull request #245475 from Artturin/splicepython1 2023-07-26 22:43:37 +03:00
github-actions[bot]
bbfd40bb37
Merge staging-next into staging 2023-07-26 06:01:54 +00:00
Artturin
793cc9d982 python3: splice python within python3Packages.callPackage
`lib.extends hooks pythonPackagesFun` includes python which we want to
splice

what this fixes:
```
nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0
«derivation /nix/store/39dkb51rciw6zwg0c2c44gpmpjapddxc-python3-aarch64-unknown-linux-gnu-3.10.12.drv»
```
to
```
nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0
«derivation /nix/store/21ldw2dp26xvv9iyxn9x77a8yh4waqz5-python3-3.10.12.drv»
```

Before https://github.com/NixOS/nixpkgs/pull/194205 The keep python used to work by accident because self was passed from
__splicedPackages https://github.com/NixOS/nixpkgs/pull/196052/files#diff-44ce3495c4f983ce64dd47c86a9d3e77bad210b2709c098a3806998dcd9b000bR213
But now it does not work because overrideAttrs is used on python in
python-packages-base.nix

Preferably we would [ splice the hooks too ](https://github.com/NixOS/nixpkgs/pull/228139) but we cannot do that until [Package sets within derivations (i.e. python3.pkgs) are not spliced](https://github.com/NixOS/nixpkgs/issues/211340) is fixed, because people often use `python3.pkgs.wrapPython` in `nativeBuildInputs` (it's correct but python3.pkgs should be python3Packages to get splicing.
2023-07-26 06:15:26 +03:00
Nick Cao
4570f7fc58
Merge pull request #243074 from mweinelt/cpython-3.12.0b4
python312: 3.12.0b3 -> 3.12.0b4
2023-07-25 19:03:08 -06:00
github-actions[bot]
941ae3102b
Merge staging-next into staging 2023-07-22 12:02:07 +00:00
Felix Bühler
0a2745684e
Merge pull request #239624 from Stunkymonkey/use-optionalString-then
treewide: use optionalString instead of 'then ""'
2023-07-22 13:02:47 +02:00
Sandro
ae6388356f
Merge pull request #153527 from andersk/python3-symlinks
python3: Add manpage symlink to fix ‘man python’
2023-07-20 22:07:42 +02:00
Anders Kaseorg
9c55f23e53
python3: Add manpage symlink to fix ‘man python’
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-07-19 15:33:47 +02:00
Martin Weinelt
6245a65b02
python312: 3.12.0b3 -> 3.12.0b4
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0b4

Fixes: CVE-2023-27043
2023-07-12 15:38:34 +02:00
Janik
7939b3db22
Merge pull request #196802 from jneem/manylinux 2023-07-02 23:23:55 +02:00
Joe Neeman
38d66c2984 pythonManylinuxPackages: add libz and expat
These libs aren't mentioned in PEP 513, but auditwheel allows them
(https://github.com/pypa/auditwheel/issues/152) and so built wheels
may depend on them.
2023-07-02 22:52:11 +07:00
Karel Kočí
9d663f7fcd
setuptools-rust: fix cross compilation
The setuptools-rust requires some environment variables to really
perform cross build, otherwise it just builds for build platform.

This adds setup hook that introduces these environment variables.

There are three variables.
The PYO3_CROSS_LIB_DIR has to point to the target's Python library
directory. This has to be directory for the target not for the build or
host. We have to choose the correct target Python. I am unsure how to do
that simply in nixpkgs and this this implementations just delays this
and waits for the correct Python when package using this hook is build.
The CARGO_BUILD_TARGET triggers cross compilation in setuptools-rust.
This is simply the Rust target specification.
The CARGO_TARGET_*_LINKER variable should not be essentially required
but setuptools-rust probably mangles the Rust build environment somewhat
and that results to the missing linker. By explicitly specifying it
using the environment variable we force the correct linker.
2023-06-30 14:52:25 +02:00
Felix Buehler
6672dde558 treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
Felix Buehler
f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Weijia Wang
82e6dcefb9 python311Packages.tkinter: fix runtime error on darwin 2023-06-22 17:52:12 +03:00
Martin Weinelt
cea1c49331
python312: 3.12.0b2 -> 3.12.0b3
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0b3
2023-06-21 02:31:58 +02:00
github-actions[bot]
622850f61f
Merge staging-next into staging 2023-06-09 18:01:50 +00:00
Martin Weinelt
342ba7d647
python311: 3.11.3 -> 3.11.4
https://docs.python.org/release/3.11.4/whatsnew/changelog.html

Fixes: CVE-2023-24329
2023-06-07 14:41:15 +02:00
Martin Weinelt
f80d434d94
python310: 3.10.11 -> 3.10.12
https://docs.python.org/release/3.10.12/whatsnew/changelog.html

Fixes: CVE-2023-24329
2023-06-07 14:41:14 +02:00
Martin Weinelt
513023c117
python38: 3.8.16 -> 3.8.17
https://docs.python.org/release/3.8.17/whatsnew/changelog.html

Fixes: CVE-2023-24329
2023-06-07 13:06:32 +02:00
Martin Weinelt
1eecd85622
python39: 3.9.16 -> 3.9.17
https://docs.python.org/release/3.9.17/whatsnew/changelog.html

Fixes: CVE-2023-24329
2023-06-07 12:57:41 +02:00
Martin Weinelt
966069ed81
python312: 3.12.0b1 -> 3.12.0b2
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0b2
2023-06-07 12:54:38 +02:00
Domen Kožar
9f3e0de184 cypthon: moduralize so it can be called with other versions 2023-06-05 17:32:40 +02:00
Domen Kožar
b4222d6661 python: add conditionals to be able to compile with 3.6 or older 2023-06-05 17:32:40 +02:00
Dmitry Bogatov
2f181d6f06 python3.doc: build offline documentation
Since python documentation requires Sphinx to build, documentation is built in
separate derivation to avoid hard recursion/bootstrapping questions and plugged
into main derivation. Care is taken that "python3.doc" derivation feels and
looks as close as possible to as if it were main derivation were multi-output
one.

This change does not cause rebuild of python3 itself.
2023-06-03 16:43:46 +02:00
figsoda
ffbf6f27c9 python3.pkgs.fetchPypi: deprecate in favor of top-level fetchPypi 2023-05-31 13:48:06 -04:00
Martin Weinelt
3f736faef0
python312: 3.12.0a7 -> 3.12.0b1
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0b1
2023-05-23 23:38:45 +02:00
github-actions[bot]
b872b6b45c
Merge staging-next into staging 2023-05-09 06:01:52 +00:00
Martin Weinelt
d237a92e63
update-python-libraries: Fix some issues
discovered by ruff and pyright.
2023-05-07 12:23:52 +02:00
Jonas Chevalier
3d2bdd0788
python: implement PEP 668 (#229166)
Add a marker file to the python outputs that tells pip and other tooling
following PEP 668 that they should not be installing things system-wide.

This provides better feedback to the user and also potentially avoids issues in
single-user installs where the /nix/store is owned by the user.

For more details, see <https://peps.python.org/pep-0668/>

Here is how it currently looks like:

    $ pip install requests
    error: externally-managed-environment

    × This environment is externally managed
    ╰─> This command has been disabled as it tries to modify the immutable
        `/nix/store` filesystem.

        To use Python with Nix and nixpkgs, have a look at the online documentation:
        <https://nixos.org/manual/nixpkgs/stable/#python>.
2023-05-04 18:30:25 +02:00
Martin Weinelt
abc97d3572
Merge pull request #226937 from rhendric/rhendric/update-python-libraries
update-python-libraries: escape vars in regexes
2023-05-03 09:28:32 +02:00
jackyliu16
df2c2e63f1 cpython: add loongarch triplets
using patch ref on: https://github.com/python/cpython/issues/90656
  to add loongarch triplets for using cpython in loongarch

  Note: This patch is being reviewed by cpython
2023-05-01 05:16:32 +08:00
Artturi
44075d60d2
Merge pull request #120220 from grahamc/python-kvetch-on-mismatch 2023-04-28 18:47:17 +03:00
Artturin
d44390ab18 mkPythonDerivation: validate propagatedBuildInputs use a matching python
mkPythonDerivation: apply checks to buildInputs as well

fixup: add a suggestion about nativeBuildInputs

Clean up the wording, add reasons for the suggestions

switch to throw

Adjust error to clarify build-time vs. run-time
2023-04-28 17:59:20 +03:00
Ryan Hendrickson
56a07ba986 update-python-libraries: escape vars in regexes 2023-04-18 18:05:01 -04:00
github-actions[bot]
b6cd4a9e24
Merge staging-next into staging 2023-04-09 12:01:50 +00:00
Vladimír Čunát
dee43206d8
pypy*: fixup build
https://hydra.nixos.org/build/215259697
This is most likely fallout from PR #209870
2023-04-09 11:06:49 +02:00
github-actions[bot]
f28229016d
Merge staging-next into staging 2023-04-08 12:01:37 +00:00
Martin Weinelt
cbb4c1eb7b
python311: 3.11.2 -> 3.11.3
https://docs.python.org/release/3.11.3/whatsnew/changelog.html
2023-04-06 02:16:23 +02:00
Martin Weinelt
f36f64723d
python310: 3.10.10 -> 3.10.11
https://docs.python.org/release/3.10.11/whatsnew/changelog.html
2023-04-05 23:57:11 +02:00
Martin Weinelt
6726464b6a
python312: 3.12.0a6 -> 3.12.0a7
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0-alpha-7
2023-04-05 23:54:37 +02:00
Yureka
f8cbc3c281 tree-wide: convert rust with git deps to importCargoLock 2023-03-26 01:52:04 +01:00
Martin Weinelt
084ddae98b
python312: 3.12.0a5 -> 3.12.0a6
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0-alpha-6
2023-03-08 15:40:03 +01:00
Mario Rodas
bb5edc482e rustpython: fix build on aarch64-linux 2023-03-07 04:20:00 +00:00