313 Commits
Author SHA1 Message Date
Artturin f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Alyssa Ross b2f01b8861 python3: get the triple from the build system
We don't need the sysconfigdata name at eval time, so trying to
reimplement platform_triplet.c in Nix is unnecessarily painful
compared to just getting it from the build system after the fact.
2024-09-10 17:32:02 +02:00
github-actions[bot]andGitHub b857d97eec Merge master into staging-next 2024-08-30 18:04:02 +00:00
Martin Weinelt 0ea153ce17 python313FreeThreading: fix build
The build uses a `t` suffix on the lib prefix.
2024-08-28 01:15:37 +02:00
K900 5c68540f8b Merge remote-tracking branch 'origin/staging-next' into staging 2024-08-22 13:20:38 +03:00
Alyssa Ross 007088359e python3: break infinite recursion
Checking if bluez is a derivation requires evaluating whether an
emulator is available (in the case that gobject-introspection is
available), which when cross compiling requires evaluating qemu, which
requires evaluating libxml2, which requires evaluating Python.

The recursion break happens in the Python expression because it's the
thing behaving unusually, by forcing evaluation of all of its
arguments, even ones that are optional and unused.

Fixes: 8b3a4a617e ("bluez: fix when gobject-introspection unsupported")
2024-08-21 18:45:30 +02:00
Tobias Mayer f4917d2893 pkgsStatic.python312: fix build 2024-08-20 10:48:39 +02:00
Martin Weinelt 8878d8afcd python312: 3.12.4 -> 3.12.5
https://docs.python.org/release/3.12.5/whatsnew/changelog.html
2024-08-08 15:36:12 +02:00
Randy Eckenrode 0e8dbe9540 python313: drop patch for _PY_SHORT_FLOAT_REPR == 0
The patch was merged upstream and is included in Python 3.13b4.
2024-07-21 00:26:22 -04:00
Randy Eckenrode 53f938e573 python{310,311,312,313}: fix LTO build
Python LTO builds using clang require the clang’s `llvm-ar` even on Darwin.
2024-07-20 21:33:28 -04:00
Randy Eckenrode d5f637590e tree-wide: enable LTO on Darwin 2024-07-20 03:19:54 -04:00
Randy Eckenrode 0d7d9280d3 python{311,312,313}: use system libmpdec again
Override the configure check not to do a universal build. Using the system libmpdec is required to enable LTO on Darwin.
2024-07-20 01:11:53 -04:00
Alyssa Ross aba1b58d1f python312: make portability backport unconditional
This avoids the maintenance headache associated with conditionally
applied patches, and fixes building for s390.
2024-07-17 12:33:29 +02:00
YurekaandFlorian Klink 8cfb27bc21 python3*: backport fix for armv7l, aarch64, riscv64
Co-Authored-By: Florian Klink <flokli@flokli.de>
Signed-off-by: Yureka <fork-nixpkgs-with@yuka.dev>
2024-07-07 12:19:22 +03:00
K900 bde999c03e Merge branch 'master' into staging-next 2024-06-29 10:13:13 +03:00
Martin Weinelt 27b67c584a cpython: fix changelog anchor for beta versions 2024-06-28 13:19:35 +02:00
Randy Eckenrode da8f4fd6cb python3Minimal: ensure _scproxy is disabled on Darwin
Python 3.12 attempts to build with the _scproxy enabled even when building python3Minimal. Override the configure check to make sure it is disabled. Otherwise, the Darwin stdenv bootstrap will fail.
2024-06-26 19:41:29 -04:00
Alyssa Ross 3df6bb2c85 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
github-actions[bot]andGitHub 668adff0d4 Merge master into staging-next 2024-06-09 12:01:06 +00:00
Audrey Dutcher 22913c86f1 python3: Enable FreeBSD cross build
This only enables x86_64-unknown-freebsd, not any other FreeBSD, since I
do not have any other machines to tests on. If you're reading this, feel
free to try out other arches!
2024-06-07 20:28:29 -07:00
Randy Eckenrode 07ab74e4aa python3: fix build on Darwin
https://github.com/NixOS/nixpkgs/pull/311767 improved build purity, but Python’s configure script checks the Darwin version to enable platform features. Replacing the check with a check for Darwin without the version allows the build to succeed again.
2024-05-30 19:40:13 -04:00
Audrey Dutcher 948d0cf589 python3: fix build on native FreeBSD
* Make use of libxcrypt conditional (documented inline)
* Patch use of uname to to not pull in some impure information
* Various cases where behavior is split out among operating systems are
  now inclusive of FreeBSD
2024-05-26 11:48:09 -07:00
Frederik Rietdijk 5772ac5a75 Removing FRidh as active maintainer of packages
In the past I was very active with Python packaging.
For several years now I was hardly around as maintainer,
so it does not make sense I am listed as a maintainer for
these makes. Looking back, I should have removed myself
as maintainer already much longer ago. Anyway, better late
than never.

It's been a fun ride, and  I do intend to occasionally contribute
to Nixpkgs, but not in the same way it once was.
2024-04-28 12:20:07 +02:00
Sandro JäckelandJonathan Ringer b3b12c2d08 Revert "Fix venv creation in Python environments"
This commit reverts all python changes from 234bb31f61.
2024-04-11 08:26:39 -07:00
github-actions[bot]andGitHub 97f05fe383 Merge staging-next into staging 2024-03-23 12:01:37 +00:00
kirillrdyandGitHub b5c54289bb Merge pull request #296225 from oliviacrain/py39-docs-sphinx-fix
python39.doc: fix build with sphinx >= 5.3.0
2024-03-23 20:18:17 +11:00
Domen KožarandGitHub fb884172ab Merge pull request #297628 from cwp/python-env-venv
Fix venv creation in Python environments
2024-03-22 19:17:13 +07:00
Colin Putney 234bb31f61 Fix venv creation in Python environments
The way we build python environments is subtly broken. A python
environment should be semantically identical to a vanilla Python
installation in, say, /usr/local. The current implementation, however,
differs in two important ways. The first is that it's impossible to use
python packages from the environment in python virtual environments. The
second is that the nix-generated environment appears to be a venv, but
it's not.

This commit changes the way python environments are built:

  * When generating wrappers for python executables, we inherit argv[0]
    from the wrapper. This causes python to initialize its configuration
    in the environment with all the correct paths.
  * We remove the sitecustomize.py file from the base python package.
    This file was used tweak the python configuration after it was
    incorrectly initialized. That's no longer necessary.

The end result is that python environments no longer appear to be venvs,
and behave more like a vanilla python installation. In addition it's
possible to create a venv using an environment and use packages from
both the environment and the venv.
2024-03-21 19:26:57 -06:00
Olivia Crain b51c572c62 python39.doc: fix build with sphinx >= 5.3.0
Backport upstream fix for cpython issue 98366 from 3.10 tree
2024-03-20 10:28:16 -05:00
natsukium 8837f2fef2 python313: add a flag to disable GIL 2024-03-13 23:32:38 +09:00
Martin Weinelt b89f66b768 python313: 3.13.0a3 -> 3.13.0a5
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-4
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-5
2024-03-13 14:43:51 +01:00
Martin Weinelt bc775ec0dd cpython: allow full variant on all platformns where bluez is available
Closes: #289113
2024-02-17 14:05:32 +01:00
Martin Weinelt 76f6ad253d python312: use vendored mpdecimal library on darwin
Building with --with-system-mpdecimal fails on both darwin architectures,
independent of the mpdecimal version used.
2024-02-06 20:44:08 +01:00
Martin Weinelt 9b516e4288 cpython: build with our own libmpdecimal 2024-02-02 12:28:09 +01:00
Martin Weinelt 2d6fa6f35d cpython: refactor & clean up
- group dependencies logically
- remove `? null` fallback value
- remove redundant isPy3k conditions
- remove overly broad `with lib` import
- more assertion messages
- move python310 out of sources attrset
2024-02-02 12:28:09 +01:00
Martin Weinelt 97625d0307 cpython: prune patches and configure flags
- Using the system-provided ffi has been the default since 3.6
2024-02-02 12:28:08 +01:00
Martin Weinelt f2f4cf0515 cpython: resolve substituteStream --replace deprecation 2024-02-02 12:28:08 +01:00
Martin Weinelt b22414ea35 cpython: unpin legacy openssl
Various packages failed to build due to the removal of hashes like MD5,
but they now work or have been dropped.
2024-02-02 12:28:07 +01:00
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]andGitHub 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]andGitHub 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
YurekaandGitHub 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
YurekaandAlyssa Ross 1d3c3d4f5b python: simplify ABI name detection 2023-10-09 15:12:20 +00:00
github-actions[bot]andGitHub d987b47512 Merge master into staging-next 2023-09-08 06:00:58 +00:00