Commit graph

1297 commits

Author SHA1 Message Date
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
Mario Rodas 2689297c50 rustpython: 2022-10-11 -> 0.2.0 2023-03-07 04:20:00 +00: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 4323150c5c update-python-libraries: Improve code quality
- Prune unused imports
- Collect imports at the top
- Removed unused exception assignments
- Fill bare except clause with
- Expand overly long check_output lines
2023-02-27 02:21:07 +00:00
Martin Weinelt c4ee7b8f62 update-python-libraries: Make the hash replacement more robust
Retrieve the current package hash and use it for a more precise match,
which allows us to update a derivation in situation where multiple
hashes are present.
2023-02-27 02:21:07 +00:00
Martin Weinelt 4ba1db9876 update-python-libraries: Allow packages to deny bulk updates
By settings `passthru.skipBulkUpdate = true` in a python package, it
will be excluded from bulk update runs.

This is useful in case of fragile packages, that require special
attention during updates.
2023-02-27 02:21:07 +00:00
Martin Weinelt 706cae6532 update-python-libraries: Add support for fetchgit
Previously when packages that required the git fetcher were updated, we
would wrongly rely on `nix-prefetch-url`, which would reliable break the
hash.

Instead we need to use `nix-prefetch-git` to determine the proper hash,
when the relevant attributes are present.
2023-02-27 02:21:07 +00:00
Martin Weinelt 6e78ac9785
Merge pull request #217558 from winterqt/pypy3-fix-site-packages
pypy3{8,9}: fix sitePackages
2023-02-26 23:39:27 +00:00
Martin Weinelt 2af27d6143
pypy: Use hash everywhere
Fixes the build after cpython switched to hash.
2023-02-26 13:11:30 +00:00
Winter e4dd2b8ca0 pypy3{8,9}: fix sitePackages
When PyPy introduced Python 3.8 support with version 7.3.6, they also
migrated to using CPython's directory layout [0]:

> The 3.8 package now uses the same layout as CPython, and many of the
PyPy-specific changes to `sysconfig`, `distutils.sysconfig`, and
`distutils.commands.install.py` have been removed. The stdlib now is
located in `<base>/lib/pypy3.8` on `posix` systems...

When we upgraded past this version and added Python 3.8 support [1], the
`sitePackages` value was never updated, leading `bootstrapped-pip` to fail
to build, because wheel was trying to be located in `$out/site-packages`,
when it was actually installed to `$out/lib/pypy3.8/site-packages`.

[0]: https://www.pypy.org/posts/2021/10/pypy-v736-release.html
[1]: eec28b8cfd
2023-02-25 13:43:28 -05:00
Alyssa Ross 52c286ee5b
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/libraries/pmdk/default.nix
2023-02-23 13:51:34 +00:00
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
github-actions[bot] c4fe2133de
Merge staging-next into staging 2023-02-15 06:01:44 +00:00
github-actions[bot] 58cfebde3e
Merge staging-next into staging 2023-02-15 00:02:50 +00:00
Felix Buehler bc3d5934d7 treewide: use lib.optionals 2023-02-14 19:11:59 +01:00
Felix Buehler cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Alyssa Ross b4f74e334e
python2: fix eval
Fixes: ee90eca180 ("cpython: Migrate sha256 occurences to hash")
2023-02-13 17:14:19 +00:00
Martin Weinelt d704ee72c9
python3.tests.nixenv-virtualenv: Fix on darwin
The virtualenv mode is trying to be smart and checks whether it can
write to $out, which for some reason fails on darwin.

> virtualenv: error: argument dest: the destination . is not write-able at /nix/store

But what does work is creating it in the pwd and moving it to $out,
because mv just does what it is told.
2023-02-12 03:03:31 +01:00
Martin Weinelt 20c723dd07
python3.tests.condaExamplePackage: Exclude on non-linux
Allow python3.tests to eval on other platforms than linux, by excluding
conda tests when not on linux, because they include alsa-lib, which is
linux-only.
2023-02-11 23:22:09 +01:00
Martin Weinelt ee90eca180
cpython: Migrate sha256 occurences to hash 2023-02-11 17:50:53 +01:00
Martin Weinelt f0b8e02958
python311: 3.11.1 -> 3.11.2
https://docs.python.org/release/3.11.2/whatsnew/changelog.html
2023-02-11 17:50:10 +01:00
Martin Weinelt f228b9368b
python310: 3.10.9 -> 3.10.10
https://docs.python.org/release/3.10.10/whatsnew/changelog.html
2023-02-11 17:50:10 +01:00
Martin Weinelt a94804c451
python39: Move out of sources attrset 2023-02-11 17:50:08 +01:00
Artturi aaa9ea8ec6
Merge pull request #208537 from Artturin/makesetuphooksupportstrictdeps 2023-02-10 20:08:32 +02:00
github-actions[bot] 87e315024e
Merge staging-next into staging 2023-02-09 18:01:44 +00:00
Martin Weinelt 21d200b26d
python312: 3.12.0a3 -> 3.12.0a5
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0-alpha-4
https://docs.python.org/3.12/whatsnew/changelog.html#python-3-12-0-alpha-5
2023-02-08 21:38:13 +00:00
Artturin 4e3dcf364e treewide: makeSetupHook deps -> propagatedBuildInputs 2023-02-07 21:02:00 +02:00
Artturin 9a9c42e19f makeSetupHook: support depsTargetTargetPropagated 2023-02-07 21:00:18 +02:00
github-actions[bot] dfee1a3150
Merge staging-next into staging 2023-02-05 00:03:15 +00:00
superherointj a411b337d6
Merge pull request #209622 from NickCao/python311-cross
python311: fix cross compilation
2023-02-04 18:04:43 -03:00
Artturi dcc7df7fe6
Merge pull request #211685 from Artturin/splicingstuff1-split 2023-02-03 12:49:08 +02:00
Weijia Wang b062ec5b83 rustpython: unbreak on x86_64-darwin 2023-02-03 00:02:17 +01:00
Alyssa Ross d608fbb9f6 buildPython*: allow overriding disabled packages
Previously:

	nix-repl> python3.pkgs.WSME
	error: WSME-0.11.0 not supported for interpreter python3.10

	nix-repl> python3.pkgs.WSME.overridePythonAttrs (_: { disabled = false; })
	error: WSME-0.11.0 not supported for interpreter python3.10

Now:

	nix-repl> python3.pkgs.WSME
	error: WSME-0.11.0 not supported for interpreter python3.10
	«derivation

	nix-repl> python3.pkgs.WSME.overridePythonAttrs (_: { disabled = false; })
	«derivation /nix/store/cxkiwdfm146zvl573s2hahlbjd1wfrrp-python3.10-WSME-0.11.0.drv»
2023-02-02 16:49:27 +01:00