Merge pull request #182981 from betaboon/update-pdm

This commit is contained in:
Martin Weinelt 2022-09-01 22:33:42 +02:00 committed by GitHub
commit e701a10249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 103 additions and 35 deletions

View file

@ -8,13 +8,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pdm-pep517"; pname = "pdm-pep517";
version = "1.0.2"; version = "1.0.4";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-nVoqpYlvNzN1UJeUXsKnUc0Z7jOZMG4JlRQBSx5JrfE="; sha256 = "sha256-OS+MK0fG7CBVDLjhniS529Jzc0E/BntW7Ndfl2f5MBU=";
}; };
preCheck = '' preCheck = ''

View file

@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, requests
}:
buildPythonPackage rec {
pname = "requests-wsgi-adapter";
version = "0.4.1";
src = fetchPypi {
inherit pname version;
hash = "sha256-WncJ6Qq/SdGB9sMqo3eUU39yXeD23UI2K8jIyQgSyHg=";
};
propagatedBuildInputs = [
requests
];
# tests are not contained in pypi-release
doCheck = false;
meta = with lib; {
description = "WSGI Transport Adapter for Requests";
homepage = "https://github.com/seanbrant/requests-wsgi-adapter";
license = licenses.bsd3;
maintainers = with maintainers; [ betaboon ];
};
}

View file

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, cached-property
, packaging
, pdm-pep517
, requests
, flask
, pytest-httpserver
, pytestCheckHook
, requests-wsgi-adapter
, trustme
}:
buildPythonPackage rec {
pname = "unearth";
version = "0.6.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-S3v719NKEWc9gN+uf6u/khwTmqx4OD+wyhapDTtTpm4=";
};
nativeBuildInputs = [
pdm-pep517
];
propagatedBuildInputs = [
packaging
requests
] ++ lib.optionals (pythonOlder "3.8") [
cached-property
];
checkInputs = [
flask
pytest-httpserver
pytestCheckHook
requests-wsgi-adapter
trustme
];
meta = with lib; {
homepage = "https://github.com/frostming/unearth";
description = "A utility to fetch and download python packages";
license = licenses.mit;
maintainers = with maintainers; [ betaboon ];
};
}

View file

@ -1,12 +0,0 @@
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)

View file

@ -24,28 +24,19 @@ in
with python.pkgs; with python.pkgs;
buildPythonApplication rec { buildPythonApplication rec {
pname = "pdm"; pname = "pdm";
version = "1.14.0"; version = "2.1.2";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-ZUbcuIRutSoHW5egCpwCKca2IZCgQsRAd72ueDzGySI="; hash = "sha256-U8aXskq3PdIVXNhUTZ7TVRza4dexZoheHO1GO0aGneo=";
}; };
# 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
];
propagatedBuildInputs = [ propagatedBuildInputs = [
blinker blinker
click cachecontrol
certifi
findpython findpython
installer installer
packaging packaging
@ -54,12 +45,17 @@ buildPythonApplication rec {
pip pip
platformdirs platformdirs
python-dotenv python-dotenv
pythonfinder requests-toolbelt
resolvelib resolvelib
rich
shellingham shellingham
tomli tomli
tomlkit tomlkit
] ++ lib.optionals (pythonOlder "3.8") [ unearth
virtualenv
]
++ cachecontrol.optional-dependencies.filecache
++ lib.optionals (pythonOlder "3.8") [
importlib-metadata importlib-metadata
typing-extensions typing-extensions
]; ];
@ -79,14 +75,11 @@ buildPythonApplication rec {
''; '';
disabledTests = [ disabledTests = [
# sys.executable and expected executable are different # fails to locate setuptools (maybe upstream bug)
"test_set_non_exist_python_path" "test_convert_setup_py_project"
# pythonfinder isn't aware of nix's python infrastructure # pythonfinder isn't aware of nix's python infrastructure
"test_auto_isolate_site_packages"
"test_use_wrapper_python" "test_use_wrapper_python"
"test_find_python_in_path" "test_use_invalid_wrapper_python"
# calls pip install and exits != 0
"test_pre_and_post_hooks"
]; ];
meta = with lib; { meta = with lib; {

View file

@ -9489,6 +9489,8 @@ in {
requests-unixsocket = callPackage ../development/python-modules/requests-unixsocket { }; requests-unixsocket = callPackage ../development/python-modules/requests-unixsocket { };
requests-wsgi-adapter = callPackage ../development/python-modules/requests-wsgi-adapter { };
requirements-detector = callPackage ../development/python-modules/requirements-detector { }; requirements-detector = callPackage ../development/python-modules/requirements-detector { };
requirements-parser = callPackage ../development/python-modules/requirements-parser { }; requirements-parser = callPackage ../development/python-modules/requirements-parser { };
@ -11248,6 +11250,8 @@ in {
uncompyle6 = callPackage ../development/python-modules/uncompyle6 { }; uncompyle6 = callPackage ../development/python-modules/uncompyle6 { };
unearth = callPackage ../development/python-modules/unearth { };
unicodecsv = callPackage ../development/python-modules/unicodecsv { }; unicodecsv = callPackage ../development/python-modules/unicodecsv { };
unicodedata2 = callPackage ../development/python-modules/unicodedata2 { }; unicodedata2 = callPackage ../development/python-modules/unicodedata2 { };