-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
pdm: init at 1.12.6 #155390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
pdm: init at 1.12.6 #155390
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| diff --git a/tests/conftest.py b/tests/conftest.py | ||
| index d310d36..e15d398 100644 | ||
| --- a/tests/conftest.py | ||
| +++ b/tests/conftest.py | ||
| @@ -252,6 +252,7 @@ def project_no_init(tmp_path, mocker): | ||
| old_config_map = Config._config_map.copy() | ||
| tmp_path.joinpath("caches").mkdir(parents=True) | ||
| p.global_config["cache_dir"] = tmp_path.joinpath("caches").as_posix() | ||
| + p.global_config["check_update"] = False | ||
| do_use(p, getattr(sys, "_base_executable", sys.executable)) | ||
| with temp_environ(): | ||
| os.environ.pop("VIRTUAL_ENV", None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| { lib, python3, fetchFromGitHub, fetchurl }: | ||
| let | ||
| python = python3.override { | ||
| # override resolvelib due to | ||
| # 1. pdm requiring a later version of resolvelib | ||
| # 2. Ansible being packaged as a library | ||
| # 3. Ansible being unable to upgrade to a later version of resolvelib | ||
| # see here for more details: https://github.com/NixOS/nixpkgs/pull/155380/files#r786255738 | ||
| packageOverrides = self: super: { | ||
| resolvelib = super.resolvelib.overridePythonAttrs (attrs: rec { | ||
| version = "0.8.1"; | ||
| src = fetchFromGitHub { | ||
| owner = "sarugaku"; | ||
| repo = "resolvelib"; | ||
| rev = version; | ||
| sha256 = "sha256-QDHEdVET7HN2ZCKxNUMofabR+rxJy0erWhNQn94D7eI="; | ||
| }; | ||
| }); | ||
| }; | ||
| self = python; | ||
| }; | ||
| in | ||
|
|
||
| with python.pkgs; | ||
| buildPythonApplication rec { | ||
| pname = "pdm"; | ||
| version = "1.12.6"; | ||
| format = "pyproject"; | ||
| disabled = pythonOlder "3.7"; | ||
|
|
||
| src = fetchPypi { | ||
| inherit pname version; | ||
| sha256 = "sha256-MXKER2ijU+2yPnsBFH0cu/hjHI4uNt++AqggH5rhnaU="; | ||
| }; | ||
|
|
||
| # this patch allows us to run additional tests that invoke pdm, which checks | ||
| # itself for an update on every invocation by default, drammatically slowing | ||
| # down test runs inside the sandbox | ||
| # | ||
| # the patch is necessary because the fixture is creating a project and | ||
| # doesn't appear to respect the settings in `$HOME`; possibly a bug upstream | ||
| patches = [ | ||
| ./check-update.patch | ||
| (fetchurl { | ||
| # Mark test that require network access | ||
| url = "https://github.com/pdm-project/pdm/files/7911962/mark-network-tests.patch.txt"; | ||
| hash = "sha256:1dizf9j3z7zk4lxvnszwx63xzd9r68f2iva5sszzf8s8na831dvd"; | ||
| }) | ||
| ]; | ||
|
|
||
| propagatedBuildInputs = [ | ||
| blinker | ||
| click | ||
| installer | ||
| packaging | ||
| pdm-pep517 | ||
| pep517 | ||
| pip | ||
| platformdirs | ||
| python-dotenv | ||
| pythonfinder | ||
| resolvelib | ||
| shellingham | ||
| tomli | ||
| tomlkit | ||
| ] ++ lib.optionals (pythonOlder "3.8") [ | ||
| importlib-metadata | ||
| typing-extensions | ||
| ]; | ||
|
|
||
| checkInputs = [ | ||
| pytestCheckHook | ||
| pytest-mock | ||
| pytest-xdist | ||
| ]; | ||
|
|
||
| pytestFlagsArray = [ | ||
| "--numprocesses $NIX_BUILD_CORES" | ||
| "-m 'not network'" | ||
| ]; | ||
|
|
||
| preCheck = "HOME=$TMPDIR"; | ||
|
|
||
| disabledTests = [ | ||
| # sys.executable and expected executable are different | ||
| "test_set_non_exist_python_path" | ||
| # pythonfinder isn't aware of nix's python infrastructure | ||
| "test_auto_isolate_site_packages" | ||
| "test_use_invalid_wrapper_python" | ||
| "test_use_wrapper_python" | ||
| # tries to read/write files without proper permissions | ||
| "test_completion_command" | ||
| "test_plugin_add" | ||
| "test_plugin_list" | ||
| "test_plugin_remove" | ||
| # tries to treat a gzip file as a zipfile and fails | ||
| "test_resolve_local_artifacts" | ||
| ]; | ||
|
|
||
| meta = with lib; { | ||
| homepage = "https://pdm.fming.dev"; | ||
| description = "A modern Python package manager with PEP 582 support"; | ||
| license = licenses.mit; | ||
| maintainers = with maintainers; [ cpcloud ]; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.