| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch builds on the previous to make prefix resolution work
correctly inside virtual environments on Darwin. The --inherit-argv0
mechanism is insufficient, as on Darwin, Python uses the
_NSGetExecutablePath() call to work out the actual path to its binary.
Since this resolves to the real unwrapped binary, --inherit-argv0 is
little use.
This patch adds a new variant, --inherit-argv0-path, which resolves the
full path before passing it to argv[0]. On Darwin this is done using
_NSGetExecutablePath(), on Linux by reading /proc/self/exe. This
bypasses the real_executable lookup, as Python gives precedence to
argv[0] when it appears to be a path (contains a slash).
While not strictly necessary on Linux (as --inherit-argv0 works anyway),
the change is made to both for consistency.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 set argv0 to
the full path of 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.
* When building the environment's bin directory, we now detect wrapped
python scripts from installed packages, and generate unwrapped
copies with the environment's python executable as the interpreter.
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.
|
| |\ |
|
| | |\
| | |
| | | |
cpython: allow full variant on all platformns where bluez is available
|
| | | |
| | |
| | |
| | | |
Closes: #289113
|
| |\| | |
|
| | |\ \
| | | |
| | | | |
python3.pkgs.buildPythonPackage: Separate runtime & build time dependencies
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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).
|
| |\| | |
|
| | | | |
|
| | |/ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
https://docs.python.org/release/3.11.8/whatsnew/changelog.html
|
| |/
|
|
| |
https://docs.python.org/release/3.11.8/whatsnew/changelog.html
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
derivation (#241922)
Before updateScript was being merged to pdm.updateScript.
With this commit it is being moved to the expected location pdm.passthru.updateScript
|
| | |
| |
| |
| |
| | |
Building with --with-system-mpdecimal fails on both darwin architectures,
independent of the mpdecimal version used.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | |
| |
| |
| | |
- Using the system-provided ffi has been the default since 3.6
|
| | | |
|
| |/
|
|
|
| |
Various packages failed to build due to the removal of hashes like MD5,
but they now work or have been dropped.
|
| | |
|
| |
|
|
| |
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-3
|
| |\
| |
| |
| |
| | |
Conflicts:
- pkgs/development/python-modules/types-setuptools/default.nix
|
| | | |
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\|
| |
| |
| |
| | |
Conflicts:
- pkgs/development/python-modules/aiohappyeyeballs/default.nix
|
| | | |
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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?
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
https://docs.python.org/release/3.11.7/whatsnew/changelog.html
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| |/ |
|
| |
|
|
|
|
| |
https://docs.python.org/release/3.12.1/whatsnew/changelog.html
Fixes: CVE-2023-6507
|
| |
|
|
|
| |
We query lots of derivation attributes, most of which do not exist, so
logging stderr causes a lot of noise for no gain.
|
| | |
|
| | |
|
| |
|
|
| |
This is unsupported and breaks packages on update.
|
| |
|
|
|
| |
Fixes a regression from #261323, where all `passthru.tests` were
overwritten.
|
| |\
| |
| | |
rustpython: mark broken on x86_64-darwin
|