Commit Graph

1285 Commits

Author SHA1 Message Date
Ryan Hendrickson
56a07ba986 update-python-libraries: escape vars in regexes 2023-04-18 18:05:01 -04: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
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
github-actions[bot]
d7f991bb53
Merge master into staging-next 2023-01-29 00:02:27 +00:00
Alyssa Ross
b682fef8e9 python3.pkgs: fix splice through unsupported hosts
Previously, unless unsupported platforms were allowed, the following
would fail to evaluate (from an "x86_64-linux" system):

    pkgsCross.x86_64-freebsd.__splicedPackages.docutils.__spliced.buildHost

It shouldn't have, because the buildHost package ends up being for
Linux.  This broke evaluation of e.g. pkgsCross.x86_64-freebsd.libdrm,
because it has docutils in nativeBuildInputs.  mkDerivation would try
to go through __spliced.buildHost on docutils to get to the Linux
version, but the check in ensurePythonModules would kick in first,
triggering the meta check because of the equality check in the
implementation of hasPythonModule, which would fail because Python is
not marked as supported on FreeBSD in Nixpkgs at the moment.  Thus,
even though they're not supposed to be, the meta checks would be
triggered even though the only attribute being accessed on the
unsupported derivation was __spliced.

We can fix this by using the same mechanism used to implement the meta
checks themselves: lib.extendDerivation.  Now, attempting to access
drvPath or outPath on an attribute that fails the validity check will
produce the same error as before, but other accesses will be allowed
through, fixing splicing.

I've tested evaluation of packages that pass and fail the validity
check, and confirmed that the behaviour is still correct.
2023-01-28 21:08:50 +00:00
Alyssa Ross
02ee33a5c1 python3.pkgs: simplify ensurePythonModules logic
It wasn't clear before, but it turns out that this is just four
separate conditions, and an attribute is valid if any of the
conditions is true, so we don't need a sea of parentheses to express
it.
2023-01-28 21:08:50 +00:00
Vladimír Čunát
8a77ed60ac
Merge branch 'master' into staging-next 2023-01-27 09:36:55 +01:00
Shawn8901
a59dda942c treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
github-actions[bot]
d8bfd0a059
Merge master into staging-next 2023-01-23 06:01:12 +00:00
Nick Cao
6ad4d75364
Merge pull request #211079 from NickCao/py37
python37: remove leftovers
2023-01-23 11:22:35 +08:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Guillaume Girol
339a5491bb buildPythonPackage: support nativeCheckInputs 2023-01-21 16:42:09 +01:00
Guillaume Girol
90c78aee6c Merge branch 'nativeCheckInputs' into staging-nativeCheckInputs 2023-01-21 12:00:00 +00:00
figsoda
3290828905 fetchPypi: move to top level
fetchPypi doesn't use python under the hood and doesn't need to be tied
to a specific version of python. Moving it to top level makes it more
consistent with other fetchers and makes code generation easier.
2023-01-21 08:21:33 +01:00
Artturin
b94fa2c253 python-packages-base: use extends instead of //
// shouldn't be used when overrideAttrs is available

here we can use extends instead of overrideAttrs for performance
2023-01-20 19:19:18 +02:00