Commit Graph

173 Commits

Author SHA1 Message Date
Martin Weinelt f69da37098 cpython: restore passthru.tests
Fixes a regression from #261323, where all `passthru.tests` were
overwritten.
2023-11-28 02:09:29 +01:00
Adam Joseph bc2d598878 treewide: change pythonForBuild to pythonOnBuildForHost 2023-11-05 17:42:12 -08:00
natsukium 56b570d6af python311Packages.python-docs-theme: rename from python_docs_theme 2023-11-04 12:34:41 +09: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] 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
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
Yureka 1d3c3d4f5b python: simplify ABI name detection 2023-10-09 15:12:20 +00: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
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
Sandro Jäckel 4514e57231 cpython: use correct variable to set meta.mainProgram 2023-08-08 17:25:28 +00: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
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
Felix Buehler 6672dde558 treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
Weijia Wang 82e6dcefb9 python311Packages.tkinter: fix runtime error on darwin 2023-06-22 17:52:12 +03: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
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
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
superherointj b3b4bc0052 Merge pull request #208636 from wegank/python-framework
python3: allow enabling framework on darwin
2023-03-04 07:31:34 -03:00
Martin Weinelt ee90eca180 cpython: Migrate sha256 occurences to hash 2023-02-11 17:50:53 +01:00
superherointj a411b337d6 Merge pull request #209622 from NickCao/python311-cross
python311: fix cross compilation
2023-02-04 18:04:43 -03:00
Minijackson 2b43490121 python: improve ABI name detection 2023-01-19 15:20:31 +01:00
github-actions[bot] ceb05ad4bf Merge master into staging-next 2023-01-13 06:01:09 +00:00
Nick Cao f742c6d443 python311: fix cross compilation 2023-01-08 12:39:02 +08:00
Martin Weinelt e75f5e8efa python37: drop
The package set hasn't been working for a long time now, due to infinite
recursions, that nobody was going to fix.

The release is going to go EOL in 2023/06 and we don't want to ship it
in NixOS 23.05 anyway.
2023-01-05 13:20:49 +01:00
Weijia Wang f6fd1b9a53 python312: fix build on darwin 2023-01-02 13:07:46 +01:00
Weijia Wang a440e955e0 python3: allow enabling framework on darwin 2023-01-01 16:05:48 +01:00
github-actions[bot] cfbecb45cc Merge staging-next into staging 2022-12-12 18:01:51 +00:00
Vladimír Čunát 1a5af95367 python311: revert asyncio changes done in 3.11.1
Almost same as in the parent commit.
2022-12-12 14:33:17 +01:00
Vladimír Čunát 9ee1d16c36 python310: revert asyncio changes done in 3.10.9
They brought significant regressions.  Upstream is now discussing
what to do, but we still want the security fixes from 3.10.9.
2022-12-12 14:23:49 +01:00
Robert Hensing 16f5747575 Merge pull request #175649 from Artturin/opt-in-structured-attrs
stdenv: support opt-in __structuredAttrs
2022-12-10 21:12:43 +01:00
Vladimír Čunát 9c497bb8d6 Merge branch 'staging-next' into staging 2022-12-09 10:27:46 +01:00
Artturin adc8900df1 treewide: fix some core package structuredAttrs 2022-12-08 21:05:28 +02:00
Martin Weinelt 6dcc133aae cpython: Update meta and add changelog url 2022-12-07 16:31:39 +01:00
Martin Weinelt 72231c9177 cpython: Restore libxcrypt CFLAGS and LIBS in configureFlags 2022-12-02 22:50:55 +01:00
Martin Weinelt adae7334e4 python312: init at 3.12.0a2
https://blog.python.org/2022/10/python-3120-alpha-1-released.html
https://blog.python.org/2022/11/python-3120-alpha-2-released.html
2022-11-29 01:55:35 +01:00
Martin Weinelt b5a4d7760d cpython: drop leftover 3.5/3.6 logic and patches 2022-11-29 01:34:59 +01:00
ajs124 2b3c729654 python3: use openssl_legacy 2022-11-21 13:46:00 +01:00
ajs124 f06f950183 Revert "Revert "python3: pin to openssl_1_1""
This reverts commit 017fd89527.
2022-11-21 13:46:00 +01:00
ajs124 017fd89527 Revert "python3: pin to openssl_1_1"
This reverts commit 8dfc998207.
2022-10-28 14:15:18 +02:00
Franz Pletz 194d852242 cpython: fix build with libxcrypt 2022-10-09 18:09:39 +02:00
cidkidnix 94d9904072 cpython: fix stdenv.cc.cc.libllvm 2022-09-29 09:05:13 -05:00
ajs124 8dfc998207 python3: pin to openssl_1_1 2022-08-17 20:16:44 +02:00