Commit Graph

2158 Commits

Author SHA1 Message Date
Yueh-Shun Li
42ba377ba8 python3Packages.buildPythonPackage: make passthru.{dependencies,build-system} overridable 2025-09-29 01:55:06 +08:00
Yueh-Shun Li
67d2a84468 python3Packages.buildPythonPackage: pass passthru.dependencies empty or not 2025-09-29 01:55:05 +08:00
Yueh-Shun Li
e2f75c6f5e python3Packages.buildPythonPackage: use pythonRelaxDepsHook iff related attributes non-empty 2025-09-29 01:55:05 +08:00
Yueh-Shun Li
e25f3c9103 python3Packages.buildPythonPackage: make src overridable 2025-09-29 01:55:04 +08:00
Yueh-Shun Li
b02dda8ea8 python3Packages.buildPythonPackage: make passthru.pyproject overridable 2025-09-29 01:55:04 +08:00
Yueh-Shun Li
0aebd262f1 python3Packages.buildPythonPackage: add internal helper getFinalPassthru
Add getFinalPassthru, an internal helper function that
produces informative error message
when an atttribute is not found in `finalAttrs.passthru`.
2025-09-29 01:55:02 +08:00
Sandro
bc22ff6f69 python2: 2.7.18.8 -> 2.7.18.12 (#442970) 2025-09-27 02:38:56 +02:00
ghpzin
b95b6d641e python27: fix build with gcc15
- add " -std=gnu17" to `env.NIX_CFLAGS_COMPILE`

Fixes build failure with gcc15:
```
In file included from Include/Python-ast.h:3,
                 from Python/bltinmodule.c:4:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
    9 | typedef enum {false, true} bool;
      |               ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
    9 | typedef enum {false, true} bool;
      |                            ^~~~
Include/asdl.h:9:28: warning: useless type name in empty declaration
In file included from Include/Python-ast.h:3,
                 from Python/compile.c:26:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
    9 | typedef enum {false, true} bool;
      |               ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
    9 | typedef enum {false, true} bool;
      |                            ^~~~
```
2025-09-25 18:03:25 +03:00
adisbladis
3e6a5988c7 pythonInterpreters: Add passthru.pythonABITags
As documented in https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#abi-tag.

This is useful to check whether a wheel is compatible with a certain interpreter. [Pyproject.nix](https://github.com/pyproject-nix/pyproject.nix) has [functions to perform wheel compatibility checking](https://pyproject-nix.github.io/pyproject.nix/lib/pypa.html#function-library-lib.pypa.isWheelFileCompatible) against a Python interpreter, and has computed interpreter ABI tags itself.
The recent addition of free threading (`python313FreeThreading`) complicates this by not being introspectable:
A GIL Python (non free-threaded) has an ABI tag `cp313` while the free-threaded Python has `cp313t`, but the package doesn't communicate whether `enableGIL` is true or false, leaving no way to compute the tag.
The same goes for if debugging support was added to the derivation: A `d` suffix would need to be added.

Additionally ABI tags has no defined format and can really only be accurately computed by having insight into how the ABI tags are used by a specific interpreter, meaning that the only correct place to compute ABI tags is within the context of a particular Python derivation.

While this has no immediate use within nixpkgs it could be used as a basis to provide compatibility assertions regarding wheel compat at eval time.
2025-09-22 16:36:36 +12:00
Sandro
c503be9946 pypy3: 7.3.19 -> 7.3.20 (#443765) 2025-09-19 20:58:59 +00:00
Martin Weinelt
2444890a3d python314: 3.14.0rc2 -> 3.14.0rc3
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0rc3
2025-09-18 14:34:55 +02:00
Sandro Jäckel
8cb36f5d88 pypy3: 7.3.19 -> 7.3.20
This fixes https://github.com/pypy/pypy/issues/5247 which should fix a
failing test in numpy https://github.com/numpy/numpy/issues/28469
2025-09-17 16:46:37 +02:00
Sandro Jäckel
7b2776c904 pypy: create and install _sysconfigdata__*.py like _sysconfigdata__linux_x86_64-linux-gnu.py 2025-09-16 13:13:01 +02:00
Sandro Jäckel
cee6df3f9d pypy: fix optimizationLevel 1 erroring 2025-09-16 13:12:40 +02:00
qbisi
743ae5d20c pypy: fix installPhase 2025-09-16 00:38:54 +02:00
Sandro Jäckel
c71ffb21a9 pypy: fix eval 2025-09-16 00:38:53 +02:00
Sandro Jäckel
963a04e217 python2: 2.7.18.8 -> 2.7.18.12 2025-09-14 20:03:29 +02:00
Sandro Jäckel
6c77e93a06 pypy: put NIX_CFLAGS_COMPILE under env to fix withCFlags 2025-09-14 19:39:46 +02:00
Sandro
5dda9c5637 python: Allow users to set nativeInstallCheckInputs and installCheckInputs (#439663) 2025-09-10 17:51:12 +02:00
Ross Smyth
4241178a62 python: Allow users to set nativeInstallCheckInputs and installCheckInputs
to make consistent with the rest of nixpkgs
2025-09-02 14:00:28 -04:00
Martin Weinelt
251d713d0c cpython: build with bluetooth support in default build
Closes: #341001
2025-08-30 14:48:04 +02:00
Martin Weinelt
bba34e2f19 cpython: remove x11support
This is required for tkinter, which we now build standalone as tkinter
in the python package set.
2025-08-30 14:28:10 +02:00
Martin Weinelt
168959b55b cpython: disable pie on aarch64-linux minimal
The intermediate pythonMinimal build that uses the glibc from bootstrap
files cannot currently be built with PIE, because the Scrt.o startup
script is missing in there.
2025-08-29 15:38:31 +02:00
Martin Weinelt
996d406da0 cpython: enable pie (#437366) 2025-08-28 23:55:16 +02:00
Martin Weinelt
38ba6fb329 cpython: enable pie 2025-08-24 00:02:49 +02:00
nixpkgs-ci[bot]
3d5a013c05 Merge staging-next into staging 2025-08-22 06:06:42 +00:00
nixpkgs-ci[bot]
597354df74 Merge master into staging-next 2025-08-22 06:06:05 +00:00
Martin Weinelt
048507355c buildPythonPackage: use nix-update as the default update script
Much more robust and supports various fetchers like cargo, npm or yarn.
2025-08-22 02:37:00 +02:00
Wolfgang Walther
25fedb005f Revert "python3Packages.buildPythonPackage: default enabledTestPaths = [ "." ]" 2025-08-19 12:47:11 +00:00
nixpkgs-ci[bot]
bffa08fa9f Merge staging-next into staging 2025-08-19 06:06:52 +00:00
Fabián Heredia Montiel
0e9af74ced Merge remote-tracking branch 'origin/master' into staging-next 2025-08-18 22:43:58 -06:00
7c6f434c
dc2ad08bd9 pypy: make CFFI builds find libsqlite3 (#431707) 2025-08-18 23:09:30 +00:00
Wolfgang Walther
746cd1fbea python3Packages.buildPythonPackage: default enabledTestPaths = [ "." ] (#425191) 2025-08-18 14:54:30 +00:00
Yueh-Shun Li
5bf25dffb6 python3Packages.buildPythonPackage: default enabledTestPaths = [ "." ]
Explicitly provide a default value for the argument `enabledTestPaths`
as the current working directory (`enabledTestPaths = [ "." ]`)
to simplify overriding (making `enabledTestPaths` always specified as a
non-empty list) while preserving `pytest`'s default behaviour of
discovering tests in the current working directory.

Assert the specified `enabledTestPaths` value to be a non-empty list.
2025-08-18 04:43:19 +08:00
nixpkgs-ci[bot]
9553b76500 Merge staging-next into staging 2025-08-16 06:14:01 +00:00
K900
f4924fc36c Merge remote-tracking branch 'origin/master' into staging-next 2025-08-16 09:11:21 +03:00
Martin Weinelt
53582707b1 python314: 3.14.0rc1 -> 3.14.0rc2
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0rc2
2025-08-16 02:53:00 +02:00
Martin Weinelt
4345a37636 python313: 3.13.6 -> 3.13.7
https://docs.python.org/release/3.13.7/whatsnew/changelog.html
2025-08-14 23:14:35 +02:00
Martin Weinelt
8dbf0b3423 cpython: remove libxcrypt on 3.13 and newer
The 3.13 release dropped support for the crypt module, so this dependency
could have been dropped much earlier.

Drops the `withLibxcrypt` argument, because manging the default has
become quite a bit more complicated.
2025-08-13 22:16:01 +02:00
Martin Weinelt
5f974fa39f python313: revert commit that locks ssl sockets
This breaks among other things the websockets package and is due to be
reverted in 3.13.7.
2025-08-10 00:06:16 +02:00
DavHau
9edd40908d python3Minimal: remove pkg-config dependency
Removes the build time dependency on pkg-config if python3 is build with the `withMinimal` flag enabled

This change is driven by the motivation to use python3 earlier in stdenv for hooks.
2025-08-09 19:04:52 +02:00
DavHau
bce0bb82a0 python3Minimal: refactor - add withMinimal flag
simplifies the interface of building cpython minimally
2025-08-09 19:04:51 +02:00
Martin Weinelt
838a7bde50 python313: 3.13.5 -> 3.13.6
https://docs.python.org/release/3.13.6/whatsnew/changelog.html
2025-08-07 13:48:01 +02:00
Max Wipfli
e33181bc62 pypy{27,310,311}: make CFFI builds find libsqlite3 2025-08-07 11:00:23 +02:00
Emily
5ba6a021b5 python3: fix build directory scrubbing 2025-08-03 20:52:24 +01:00
Ross Smyth
bb7c7900e1 rocksdb, s7, python3, flint, release-cross: mingw_w64_pthreads -> pthreads 2025-08-01 15:47:52 -04:00
Wolfgang Walther
4fbb23ef4e top-level/release-attrpaths-superset: remove __attrsFailEvaluation (#428015) 2025-07-24 19:45:36 +00:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Wolfgang Walther
59233ecd0d top-level/release-attrpaths-superset: remove __attrsFailEvaluation
This doesn't seem to be necessary anymore. I confirmed by:
- Adding a lib.warn into the __attrsFailsEvaluation branch - never got
any.
- Removing it everywhere and running full Eval on it - no errors, no
rebuilds.
2025-07-23 19:23:23 +02:00
Martin Weinelt
6855b0a86e python3: fix passthru tests after b937eac (#427590) 2025-07-23 01:08:50 +02:00