python313Packages.nox: 2024.10.09 -> 2025.05.01, python313Packages.dependency-groups: init at 1.3.1 (#433810)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
flit-core,
|
||||
packaging,
|
||||
pythonOlder,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dependency-groups";
|
||||
version = "1.3.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pypa";
|
||||
repo = "dependency-groups";
|
||||
rev = version;
|
||||
hash = "sha256-suuSx3zf0Y45FJdH8Cb6N7hcvPnzleREpHhtdiG2CLg=";
|
||||
};
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
dependencies = [ packaging ];
|
||||
|
||||
optional-dependencies = {
|
||||
cli = [ ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "dependency_groups" ];
|
||||
|
||||
meta = {
|
||||
description = "Standalone implementation of PEP 735 Dependency Groups";
|
||||
homepage = "https://github.com/pypa/dependency-groups";
|
||||
changelog = "https://github.com/pypa/dependency-groups/blob/${src.rev}/CHANGELOG.rst";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -1,15 +1,24 @@
|
||||
{
|
||||
lib,
|
||||
argcomplete,
|
||||
buildPythonPackage,
|
||||
colorlog,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
jinja2,
|
||||
packaging,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
tomli,
|
||||
|
||||
# build-system
|
||||
hatchling,
|
||||
|
||||
# dependencies
|
||||
attrs,
|
||||
argcomplete,
|
||||
colorlog,
|
||||
dependency-groups,
|
||||
jinja2,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
|
||||
# passthru
|
||||
tox,
|
||||
uv,
|
||||
virtualenv,
|
||||
@@ -17,33 +26,26 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "nox";
|
||||
version = "2024.10.09";
|
||||
version = "2025.05.01";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
disabled = pythonOlder "3.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wntrblm";
|
||||
repo = "nox";
|
||||
tag = version;
|
||||
hash = "sha256-GdNz34A8IKwPG/270sY5t3SoggGCZMWfDq/Wyhk0ez8=";
|
||||
hash = "sha256-qH8oh7tmiJkXOobyDZMRZ62w2sRHJF8sh4PX+6s7M70=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Backport of https://github.com/wntrblm/nox/pull/903, which can be removed on next release
|
||||
./fix-broken-mock-on-cpython-3.12.8.patch
|
||||
];
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
attrs
|
||||
argcomplete
|
||||
colorlog
|
||||
packaging
|
||||
dependency-groups
|
||||
virtualenv
|
||||
]
|
||||
++ lib.optionals (pythonOlder "3.11") [
|
||||
tomli
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
@@ -54,19 +56,20 @@ buildPythonPackage rec {
|
||||
uv = [ uv ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "nox" ];
|
||||
|
||||
disabledTests = [
|
||||
# our conda is not available on 3.11
|
||||
"test__create_venv_options"
|
||||
# Assertion errors
|
||||
"test_uv"
|
||||
# Test requires network access
|
||||
"test_noxfile_script_mode_url_req"
|
||||
# Don't test CLi mode
|
||||
"test_noxfile_script_mode"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
@@ -74,12 +77,12 @@ buildPythonPackage rec {
|
||||
"tests/test_tox_to_nox.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Flexible test automation for Python";
|
||||
homepage = "https://nox.thea.codes/";
|
||||
changelog = "https://github.com/wntrblm/nox/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [
|
||||
changelog = "https://github.com/wntrblm/nox/blob/${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
doronbehar
|
||||
fab
|
||||
];
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
diff --git a/nox/command.py b/nox/command.py
|
||||
index 671875c..4984168 100644
|
||||
--- a/nox/command.py
|
||||
+++ b/nox/command.py
|
||||
@@ -30,6 +30,8 @@ TYPE_CHECKING = False
|
||||
if TYPE_CHECKING:
|
||||
from typing import IO
|
||||
|
||||
+_PLATFORM = sys.platform
|
||||
+
|
||||
ExternalType = Literal["error", True, False]
|
||||
|
||||
|
||||
@@ -63,7 +65,7 @@ def _clean_env(env: Mapping[str, str | None] | None = None) -> dict[str, str] |
|
||||
clean_env = {k: v for k, v in env.items() if v is not None}
|
||||
|
||||
# Ensure systemroot is passed down, otherwise Windows will explode.
|
||||
- if sys.platform == "win32":
|
||||
+ if _PLATFORM.startswith("win"):
|
||||
clean_env.setdefault("SYSTEMROOT", os.environ.get("SYSTEMROOT", ""))
|
||||
|
||||
return clean_env
|
||||
diff --git a/tests/test_command.py b/tests/test_command.py
|
||||
index ae398e9..904cf34 100644
|
||||
--- a/tests/test_command.py
|
||||
+++ b/tests/test_command.py
|
||||
@@ -157,7 +157,7 @@ def test_run_env_remove(monkeypatch):
|
||||
)
|
||||
|
||||
|
||||
-@mock.patch("sys.platform", "win32")
|
||||
+@mock.patch("nox.command._PLATFORM", "win32")
|
||||
def test_run_env_systemroot():
|
||||
systemroot = os.environ.setdefault("SYSTEMROOT", "sigil")
|
||||
|
||||
@@ -3553,6 +3553,8 @@ self: super: with self; {
|
||||
|
||||
dep-logic = callPackage ../development/python-modules/dep-logic { };
|
||||
|
||||
dependency-groups = callPackage ../development/python-modules/dependency-groups { };
|
||||
|
||||
dependency-injector = callPackage ../development/python-modules/dependency-injector { };
|
||||
|
||||
deploykit = callPackage ../development/python-modules/deploykit { };
|
||||
|
||||
Reference in New Issue
Block a user