diff --git a/pkgs/development/python-modules/ansible-pylibssh/default.nix b/pkgs/development/python-modules/ansible-pylibssh/default.nix index cfe8d7e1e1fa..898214c3b508 100644 --- a/pkgs/development/python-modules/ansible-pylibssh/default.nix +++ b/pkgs/development/python-modules/ansible-pylibssh/default.nix @@ -1,20 +1,21 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pythonOlder -, libssh -, cython -, wheel -, setuptools -, setuptools-scm -, toml -, expandvars +{ + lib, + buildPythonPackage, + cython_3, + expandvars, + fetchPypi, + libssh, + pythonOlder, + setuptools, + setuptools-scm, + toml, + wheel, }: buildPythonPackage rec { pname = "ansible-pylibssh"; version = "1.1.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -23,31 +24,28 @@ buildPythonPackage rec { hash = "sha256-spaGux6dYvtUtpOdU6oN7SEn8IgBof2NpQSPvr+Zplg="; }; - # remove after https://github.com/ansible/pylibssh/pull/502 is merged + # Remove after https://github.com/ansible/pylibssh/pull/502 is merged postPatch = '' sed -i "/setuptools_scm_git_archive/d" pyproject.toml ''; - nativeBuildInputs = [ - cython - wheel + build-system = [ + cython_3 + expandvars setuptools setuptools-scm toml - expandvars + wheel ]; - propagatedBuildInputs = [ - libssh - ]; + dependencies = [ libssh ]; - pythonImportsCheck = [ - "pylibsshext" - ]; + pythonImportsCheck = [ "pylibsshext" ]; meta = with lib; { description = "Python bindings to client functionality of libssh specific to Ansible use case"; homepage = "https://github.com/ansible/pylibssh"; + changelog = "https://github.com/ansible/pylibssh/releases/tag/v${version}"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ geluk ]; }; diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index a87762131abb..e9144961c6d7 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -1,8 +1,9 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -19,16 +20,12 @@ buildPythonPackage rec { hash = "sha256-n1Ps0CybeLeDR5E4UnqmSkbFe0SXyplomEGDchAweSY="; }; - nativeBuildInputs = [ - setuptools - ]; + build-system = [ setuptools ]; # avoid circular dependency with xmlschema which directly depends on this doCheck = false; - pythonImportsCheck = [ - "elementpath" - ]; + pythonImportsCheck = [ "elementpath" ]; meta = with lib; { description = "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"; diff --git a/pkgs/development/python-modules/pytest-testinfra/default.nix b/pkgs/development/python-modules/pytest-testinfra/default.nix index 698b61ce058e..d9743ad803e6 100644 --- a/pkgs/development/python-modules/pytest-testinfra/default.nix +++ b/pkgs/development/python-modules/pytest-testinfra/default.nix @@ -1,29 +1,30 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pythonOlder -, setuptools-scm -, ansible-core -, paramiko -, pytestCheckHook -, pytest-xdist -, pywinrm -, salt +{ + lib, + ansible-core, + buildPythonPackage, + fetchPypi, + paramiko, + pytest-xdist, + pytestCheckHook, + pythonOlder, + pywinrm, + salt, + setuptools-scm, }: buildPythonPackage rec { pname = "pytest-testinfra"; version = "10.1.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; hash = "sha256-93Qzm5R3Ws3zqMSjeTqOrS6N/HD/NLd4vhWquhQPoZ4="; }; - nativeBuildInputs = [ - setuptools-scm - ]; + build-system = [ setuptools-scm ]; nativeCheckInputs = [ ansible-core @@ -34,7 +35,7 @@ buildPythonPackage rec { salt ]; - # markers don't get added when docker is not available (leads to warnings): + # Markers don't get added when docker is not available (leads to warnings): # https://github.com/pytest-dev/pytest-testinfra/blob/9.0.0/test/conftest.py#L223 preCheck = '' export HOME=$(mktemp -d) @@ -44,8 +45,8 @@ buildPythonPackage rec { \tskip_wsl: skip test on WSL, no systemd support' setup.cfg ''; - # docker is required for all disabled tests disabledTests = [ + # docker is required for all disabled tests # test/test_backends.py "test_command" "test_encoding" @@ -53,18 +54,16 @@ buildPythonPackage rec { "test_user_connection" "test_sudo" "test_docker_encoding" - ] ++ lib.optionals (pythonOlder "3.11") [ - # broken because salt package only built for python 3.11 + # Broken because salt package only built for Python "test_backend_importables" ]; - disabledTestPaths = [ - "test/test_modules.py" - ]; + disabledTestPaths = [ "test/test_modules.py" ]; meta = with lib; { description = "Pytest plugin for testing your infrastructure"; homepage = "https://github.com/pytest-dev/pytest-testinfra"; + changelog = "https://github.com/pytest-dev/pytest-testinfra/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ hulr ]; };