2131 Commits
Author SHA1 Message Date
Dan Callaghan fb39dd6f72 update-python-libraries: ignore yanked releases on PyPI 2024-02-25 15:27:31 +11:00
Weijia Wang 5f5062d1ef Merge branch 'master' into staging-next 2024-02-23 05:09:55 +01:00
Martin WeineltandGitHub faadcf03b6 Merge pull request #289531 from mweinelt/python312full-bluez
cpython: allow full variant on all platformns where bluez is available
2024-02-22 16:37:11 +01:00
github-actions[bot]andGitHub ba5eeff4f5 Merge master into staging-next 2024-02-20 06:01:15 +00:00
Martin WeineltandGitHub fa83add1b9 Merge pull request #271597 from adisbladis/python-runtime-build-time-sep
python3.pkgs.buildPythonPackage: Separate runtime & build time dependencies
2024-02-20 05:05:20 +01:00
github-actions[bot]andGitHub 68a2e7449b Merge staging-next into staging 2024-02-18 06:01:34 +00:00
adisbladis 4d0cca4654 mk-python-derivation: Add build-system argument
Much like the previous commit that adds dependencies &
optional-dependencies this aligns PEP-517 build systems with how they
are defined in PEP-518/PEP-621.

The naming `build-system` (singular) is aligned with upstream Python standards.
2024-02-18 17:40:42 +13:00
adisbladis b9138b7c07 mk-python-derivation: Add dependencies & optional-dependencies arguments
Since https://github.com/NixOS/nixpkgs/pull/161835 we've had the
concept of `passthru.optional-dependencies` for Python optional deps.

Having to explicitly put optional-dependencies in the passthru attrset
is a bit strange API-wise, even though it semantically makes sense.

This change unifies the handling of non-optional & optional Python
dependencies using the names established from PEP-621 (standardized pyproject.toml project metadata).
2024-02-18 17:40:42 +13: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
adisbladis e23b901321 python3.hooks: Dont completely overwrite passthru when creating setup hook 2024-02-17 21:19:26 +13:00
adisbladis 48a49f76d7 python3.pkgs.pypaBuildHook: Fix passthru.tests 2024-02-17 21:19:24 +13:00
DavHau ffa815958e pythonCatchConflictsHook: make compatible to all python 3 versions 2024-02-13 11:15:41 +07:00
DavHau 0cbd114d41 pythonCatchConflictsHook: improve and add tests 2024-02-13 11:15:41 +07:00
phaerandDavHau 2651ddc7b0 python/catch_conflicts: scan $out, not sys.path
This changes the non-legacy version of pythonCatchConflictsHook
to recursively scan the output of the target derivation  as well
as its propagatedBuildInputs for duplicate dependencies.

Previously, we did scan sys.path but did prove problematic as it
produced false positives i.e. when build-time dependencies of
hooks - such as setuptools in pythonCatchConflictsHook itself -
where mistakenly flagged as duplicates; even though the are
not included in the outputs of the target dervation.

As all python runtime-dependencies are currently passed via
propagatedBuildInputs in nixpkgs, scanning that plus
site-packages seems sufficient to catch all conflicts that
matter at runtime and less likely to produce false positives.

The legacyHook in catch_conflicts_py2.py needs to be migrated
as well, if it's still needed.
2024-02-12 19:52:28 +07:00
Martin Weinelt 45fd60685f python312: 3.12.1 -> 3.12.2
https://docs.python.org/release/3.11.8/whatsnew/changelog.html
2024-02-08 00:54:57 +01:00
Martin Weinelt 8751812a3b python311: 3.11.7 -> 3.11.8
https://docs.python.org/release/3.11.8/whatsnew/changelog.html
2024-02-07 18:49:49 +01:00
github-actions[bot]andGitHub 03dd2b9470 Merge master into staging-next 2024-02-07 12:01:11 +00:00
SandroandGitHub d5917b14b3 mk-python-derivation: fix passthru.updateScript being merged into the derivation (#241922)
Before updateScript was being merged to pdm.updateScript.
With this commit it is being moved to the expected location pdm.passthru.updateScript
2024-02-07 08:14:34 +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
Felix Buehler d35003e302 python311Packages.recursive-pth-loader: rename from recursivePthLoader 2024-01-25 22:13:17 +01:00
Martin Weinelt 4757e347cf python313: 3.13.0a2 -> 3.13.0a3
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-3
2024-01-19 02:05:51 +01:00
Martin Weinelt 10b01dcc89 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
-	pkgs/development/python-modules/types-setuptools/default.nix
2024-01-10 16:09:52 +01:00
Wim de WithandMartin Weinelt 90af01b76c update-python-libraries: support applications outside python-modules 2024-01-10 15:01:54 +01:00
K900 838aefefc3 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-09 22:42:37 +03:00
Sergei TrofimovichandGitHub c64c04e8bf pythonInterpreters.pypy39_prebuilt: fix tests eval (#278950)
Without the change `test-pythonPackagesExtensions` test fails the eval
as:

    $ nix build -f. pythonInterpreters.pypy39_prebuilt.tests --show-trace
    error:
       … while evaluating an attribute name
         at pkgs/development/interpreters/python/tests.nix:151:16:
          150|       });
          151|     in pkgs_.${python.pythonAttr}.pkgs.foo;
             |                ^
          152|   });

       error: value is null while a string was expected

This happens because `pypy39_prebuilt` exposes `pythonAttr` attribute,
but it has a `null` value. Fix the test to filter out prebuilt pypy.
2024-01-09 18:46:49 +01:00
Martin Weinelt ef1898454c Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
-	pkgs/development/python-modules/aiohappyeyeballs/default.nix
2024-01-08 16:34:52 +01:00
Thiago Kenji Okada a1f364d694 python2.7: remove thiagokokada from maintainers 2024-01-07 21:36:14 +00:00
Weijia Wang eb5334c27d Merge branch 'master' into staging-next 2024-01-03 03:22:40 +01:00
Sergei TrofimovichandGitHub 29a2c82603 pythonInterpreters.pypy39_prebuilt: fix eval (#277543)
Without the change the eval fails as:

    $ nix build --no-link -f. pythonInterpreters.pypy39_prebuilt.buildEnv
    error:
       error: attribute 'pypy38_prebuilt' missing
          208|     # Not included at top-level
          209|     self = __splicedPackages.pythonInterpreters.pypy38_prebuilt;
             |            ^
          210|     sourceVersion = {
       Did you mean one of pypy39_prebuilt or pypy27_prebuilt?
2024-01-02 17:20:05 +01:00
github-actions[bot]andGitHub f50aae4fb1 Merge master into staging-next 2023-12-29 18:00:57 +00:00
Sergei Trofimovich 089b731d87 python/hooks: fix test attribute eval
Without the change `tests` attribute fails the eval as:

    $ nix build --no-link -f. pypy27Packages.pypaBuildHook.tests
    error:
           69|       #   versions of this hook's dependencies.
           70|       passthru.tests = import ./pypa-build-hook-tests.nix {
             |                        ^

Fixed file name and added missing runCommand import.
2023-12-29 11:27:59 +00:00
Martin Weinelt 1128c5bfed python311: 3.11.6 -> 3.11.7
https://docs.python.org/release/3.11.7/whatsnew/changelog.html
2023-12-20 20:46:22 +01:00
Martin Weinelt 48b43e51e5 pythonRelaxDepsHook: make distribution name matching case insensitive
Is it PyOpenSSL or pyOpenSSL or pyopenssl? With this change you don't
have to care. Write it as pYoPeNSsL for all I care¹.

Can we do it like that? Yes, we can. Distribution names should be matched
with `re.IGNORECASE` according to the wheel specification².

[1] https://packaging.python.org/en/latest/specifications/core-metadata/#name
[2] Just kidding, please make it look sane.
2023-12-20 20:46:12 +01:00
Martin Weinelt 8f3162f83f python3.pkgs.pythonRuntimeDepsCheckHook: init
Implements a hook, that checks whether all dependencies, as specified by
the wheel manifest, are present in the current environment.

Complains about missing packages, as well as version specifier
mismatches.
2023-12-20 20:10:22 +01:00
Martin Weinelt e8dd1cf066 Merge remote-tracking branch 'origin/staging-next' into staging 2023-12-12 14:13:07 +01:00
adisbladis 6b9f45ae37 python3.pkgs.buildsetupcfg: Remove function from python-packages-base.nix
This function is not, and never have been, used anywhere inside nixpkgs, outside of bootstrapping setupcfg2nix itself.
It was added in https://github.com/NixOS/nixpkgs/pull/38778 by @shlevy.

It has no out-of-tree users on Github either. External breakage is not expected.
2023-12-12 12:21:38 +13:00
Sandro Jäckel 904e7ce05b pypy: add option to change optimization level, update homepage, cleanup 2023-12-10 03:10:47 +01:00
Martin Weinelt a3feaa36a0 python312: 3.12.0 -> 3.12.1
https://docs.python.org/release/3.12.1/whatsnew/changelog.html

Fixes: CVE-2023-6507
2023-12-08 17:03:13 +01:00
Martin Weinelt ac82700414 update-python-libraries: quiet nix stderr output
We query lots of derivation attributes, most of which do not exist, so
logging stderr causes a lot of noise for no gain.
2023-12-02 03:29:43 +01:00
Martin Weinelt 50311a8d07 update-python-libraries: format with black/isort 2023-12-02 03:22:02 +01:00
Martin Weinelt 180ccef717 update-python-libraries: add package changelog to commit message 2023-12-02 03:22:02 +01:00
Martin Weinelt 929da50216 update-python-libraries: don't update packages with cargoDeps
This is unsupported and breaks packages on update.
2023-12-02 03:22:01 +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
Pavol RusnakandGitHub b608fc233c Merge pull request #269255 from prusnak/rustpython-darwin
rustpython: mark broken on x86_64-darwin
2023-11-26 18:46:09 +01:00
Alexandre MacabiesandPierre Bourdon fc235bb0fc python/hooks: use python.pythonVersion to support PyPy
f292ef4 introduced a check for the Python version but uses `.version`,
which isn't friendly to other Pythons like PyPy which use versions
strings like 7.3, failing the >=3.10 check.

Using `.pythonVersion` fixes this check.

Co-authored-by: Pierre Bourdon <delroth@gmail.com>
2023-11-25 13:38:39 +01:00