diff --git a/pkgs/development/python-modules/bindep/default.nix b/pkgs/development/python-modules/bindep/default.nix index 8153354843a4..7feb91d8d971 100644 --- a/pkgs/development/python-modules/bindep/default.nix +++ b/pkgs/development/python-modules/bindep/default.nix @@ -1,47 +1,49 @@ { lib, - fetchPypi, buildPythonPackage, distro, - pbr, - setuptools, + fetchPypi, packaging, parsley, + pbr, + setuptools, }: + buildPythonPackage rec { pname = "bindep"; version = "2.11.0"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-rLLyWbzh/RUIhzR5YJu95bmq5Qg3hHamjWtqGQAufi8="; }; - buildInputs = [ + env.PBR_VERSION = version; + + build-system = [ distro pbr setuptools ]; - propagatedBuildInputs = [ + dependencies = [ parsley pbr packaging distro ]; - patchPhase = '' - # Setting the pbr version will skip any version checking logic - # This is required because pbr thinks it gets it's own version from git tags - # See https://docs.openstack.org/pbr/latest/user/packagers.html - export PBR_VERSION=5.11.1 - ''; + # Checks moved to 'passthru.tests' to workaround infinite recursion + doCheck = false; + + pythonImportsCheck = [ "bindep" ]; meta = with lib; { description = "Bindep is a tool for checking the presence of binary packages needed to use an application / library"; homepage = "https://docs.opendev.org/opendev/bindep/latest/"; license = licenses.asl20; - maintainers = with maintainers; [ melkor333 ]; + mainProgram = "bindep"; + maintainers = teams.openstack.members; }; } diff --git a/pkgs/development/python-modules/openstackdocstheme/default.nix b/pkgs/development/python-modules/openstackdocstheme/default.nix index 20c0dd9c176c..b316a7aaeee2 100644 --- a/pkgs/development/python-modules/openstackdocstheme/default.nix +++ b/pkgs/development/python-modules/openstackdocstheme/default.nix @@ -6,19 +6,20 @@ pbr, sphinx, pythonAtLeast, + setuptools, }: buildPythonPackage rec { pname = "openstackdocstheme"; - version = "3.2.0"; - format = "setuptools"; + version = "3.3.0"; + pyproject = true; # breaks on import due to distutils import through pbr.packaging disabled = pythonAtLeast "3.12"; src = fetchPypi { inherit pname version; - hash = "sha256-PwSWLJr5Hjwz8cRXXutnE4Jc+vLcL3TJTZl6biK/4E4="; + hash = "sha256-wmZJmX5bQKM1uwqWxynkY5jPJaBn+Y2eqSRkE2Ub0qM="; }; postPatch = '' @@ -27,7 +28,9 @@ buildPythonPackage rec { rm test-requirements.txt ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ dulwich pbr sphinx diff --git a/pkgs/development/python-modules/openstacksdk/default.nix b/pkgs/development/python-modules/openstacksdk/default.nix index 5bf0f23accba..121f64dd535b 100644 --- a/pkgs/development/python-modules/openstacksdk/default.nix +++ b/pkgs/development/python-modules/openstacksdk/default.nix @@ -23,10 +23,10 @@ buildPythonPackage rec { pname = "openstacksdk"; - version = "3.3.0"; + version = "4.0.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; outputs = [ "out" @@ -35,7 +35,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-BghpDKN8pzMnsPo3YdF+ZTlb43/yALhzXY8kJ3tPSYA="; + hash = "sha256-54YN2WtwUxMJI8EdVx0lgCuWjx4xOIRct8rHxrMzv0s="; }; postPatch = '' @@ -44,14 +44,15 @@ buildPythonPackage rec { --replace-fail "'sphinxcontrib.rsvgconverter'," "#'sphinxcontrib.rsvgconverter'," ''; - build-system = [ + nativeBuildInputs = [ openstackdocstheme - setuptools sphinxHook ]; sphinxBuilders = [ "man" ]; + build-system = [ setuptools ]; + dependencies = [ platformdirs cryptography diff --git a/pkgs/development/python-modules/openstacksdk/tests.nix b/pkgs/development/python-modules/openstacksdk/tests.nix index 43633f98a038..be333be87665 100644 --- a/pkgs/development/python-modules/openstacksdk/tests.nix +++ b/pkgs/development/python-modules/openstacksdk/tests.nix @@ -56,6 +56,7 @@ buildPythonPackage { openstack.tests.unit.image.v2.test_proxy.TestImageProxy.test_wait_for_task_wait openstack.tests.unit.image.v2.test_proxy.TestTask.test_wait_for_task_error_396 openstack.tests.unit.image.v2.test_proxy.TestTask.test_wait_for_task_wait + openstack.tests.unit.test_resource.TestWaitForDelete.test_callback openstack.tests.unit.test_resource.TestWaitForDelete.test_callback_without_progress openstack.tests.unit.test_resource.TestWaitForDelete.test_status openstack.tests.unit.test_resource.TestWaitForDelete.test_success_not_found diff --git a/pkgs/development/python-modules/oslo-config/default.nix b/pkgs/development/python-modules/oslo-config/default.nix index c799b6c67f30..dbcde501d345 100644 --- a/pkgs/development/python-modules/oslo-config/default.nix +++ b/pkgs/development/python-modules/oslo-config/default.nix @@ -16,13 +16,13 @@ buildPythonPackage rec { pname = "oslo-config"; - version = "9.5.0"; + version = "9.6.0"; pyproject = true; src = fetchPypi { pname = "oslo.config"; inherit version; - hash = "sha256-qlAARIhrbFX3ZXfLWpNJKkWWxfkoM3Z2DqeFLMScmaM="; + hash = "sha256-nwXvcOSNmmGo0Mm+04naJPLvWonfW26N63x0HWETZn4="; }; postPatch = '' diff --git a/pkgs/development/python-modules/python-cinderclient/default.nix b/pkgs/development/python-modules/python-cinderclient/default.nix index b942574c6e9c..92e896e3ff65 100644 --- a/pkgs/development/python-modules/python-cinderclient/default.nix +++ b/pkgs/development/python-modules/python-cinderclient/default.nix @@ -4,29 +4,46 @@ fetchPypi, ddt, keystoneauth1, + openstackdocstheme, oslo-i18n, oslo-serialization, oslo-utils, pbr, requests, prettytable, + pythonOlder, + reno, requests-mock, + setuptools, simplejson, + sphinxHook, stestr, stevedore, }: buildPythonPackage rec { pname = "python-cinderclient"; - version = "9.5.0"; - format = "setuptools"; + version = "9.6.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-G51xev+TytQgBF+2xS9jdqty8IX4GTEwiSAg7EbJNVU="; + hash = "sha256-P+/eJoJS5S4w/idz9lgienjG3uN4/LEy0xyG5uybojg="; }; - propagatedBuildInputs = [ + nativeBuildInputs = [ + openstackdocstheme + reno + sphinxHook + ]; + + sphinxBuilders = [ "man" ]; + + build-system = [ setuptools ]; + + dependencies = [ simplejson keystoneauth1 oslo-i18n @@ -45,7 +62,9 @@ buildPythonPackage rec { ]; checkPhase = '' + runHook preCheck stestr run + runHook postCheck ''; pythonImportsCheck = [ "cinderclient" ]; diff --git a/pkgs/development/python-modules/python-designateclient/default.nix b/pkgs/development/python-modules/python-designateclient/default.nix index fa2a61d85aa4..44b5b4a665ef 100644 --- a/pkgs/development/python-modules/python-designateclient/default.nix +++ b/pkgs/development/python-modules/python-designateclient/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "python-designateclient"; - version = "6.0.1"; + version = "6.1.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -32,21 +32,24 @@ buildPythonPackage rec { owner = "openstack"; repo = "python-designateclient"; rev = version; - hash = "sha256-vuaouOA69REx+ZrzXjLGVz5Az1/d6x4WRT1h78xeebk="; + hash = "sha256-MwcpRQXH8EjWv41iHxorbFL9EpYu8qOLkDeUx6inEAU="; }; env.PBR_VERSION = version; - build-system = [ + nativeBuildInputs = [ openstackdocstheme - pbr - setuptools sphinxHook sphinxcontrib-apidoc ]; sphinxBuilders = [ "man" ]; + build-system = [ + pbr + setuptools + ]; + dependencies = [ debtcollector jsonschema @@ -57,8 +60,6 @@ buildPythonPackage rec { requests ]; - doCheck = true; - nativeCheckInputs = [ oslotest requests-mock diff --git a/pkgs/development/python-modules/python-keystoneclient/default.nix b/pkgs/development/python-modules/python-keystoneclient/default.nix index e8f19e2a01a2..3c25f946ea2e 100644 --- a/pkgs/development/python-modules/python-keystoneclient/default.nix +++ b/pkgs/development/python-modules/python-keystoneclient/default.nix @@ -9,6 +9,7 @@ pbr, pythonOlder, requests-mock, + setuptools, stestr, testresources, testscenarios, @@ -16,17 +17,19 @@ buildPythonPackage rec { pname = "python-keystoneclient"; - version = "5.4.0"; - format = "setuptools"; + version = "5.5.0"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-srS9vp2vews1O4gHZy7u0B+H3QO0+LQtDQYbCbiTH0E="; + hash = "sha256-wvWTT5VXaTbJjkW/WZrUi8sKxFFZPl+DROv1LLD0EfU="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ keystoneauth1 oslo-config oslo-serialization @@ -42,7 +45,9 @@ buildPythonPackage rec { ]; checkPhase = '' + runHook preCheck stestr run + runHook postCheck ''; pythonImportsCheck = [ "keystoneclient" ]; diff --git a/pkgs/development/python-modules/python-novaclient/default.nix b/pkgs/development/python-modules/python-novaclient/default.nix index e0257ae1cfda..481827342f53 100644 --- a/pkgs/development/python-modules/python-novaclient/default.nix +++ b/pkgs/development/python-modules/python-novaclient/default.nix @@ -6,29 +6,43 @@ iso8601, keystoneauth1, openssl, + openstackdocstheme, oslo-i18n, oslo-serialization, pbr, prettytable, pythonOlder, requests-mock, + setuptools, + sphinxcontrib-apidoc, + sphinxHook, stestr, testscenarios, }: buildPythonPackage rec { pname = "python-novaclient"; - version = "18.6.0"; - format = "setuptools"; + version = "18.7.0"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-VzwQqkILCJjTX7FG7di7AFgGv/8BMa4rWjDKIqyJR3s="; + hash = "sha256-lMrQ8PTBYc7VKl7NhdE0/Wc7mX2nGUoDHAymk0Q0Cw0="; }; - propagatedBuildInputs = [ + nativeBuildInputs = [ + openstackdocstheme + sphinxcontrib-apidoc + sphinxHook + ]; + + sphinxBuilders = [ "man" ]; + + build-system = [ setuptools ]; + + dependencies = [ iso8601 keystoneauth1 oslo-i18n @@ -46,12 +60,14 @@ buildPythonPackage rec { ]; checkPhase = '' + runHook preCheck stestr run -e <(echo " novaclient.tests.unit.test_shell.ParserTest.test_ambiguous_option novaclient.tests.unit.test_shell.ParserTest.test_not_really_ambiguous_option novaclient.tests.unit.test_shell.ShellTest.test_osprofiler novaclient.tests.unit.test_shell.ShellTestKeystoneV3.test_osprofiler ") + runHook postCheck ''; pythonImportsCheck = [ "novaclient" ]; diff --git a/pkgs/development/python-modules/stevedore/default.nix b/pkgs/development/python-modules/stevedore/default.nix index b1642c4df199..5d6c048ecfb4 100644 --- a/pkgs/development/python-modules/stevedore/default.nix +++ b/pkgs/development/python-modules/stevedore/default.nix @@ -1,38 +1,49 @@ { lib, buildPythonPackage, + callPackage, fetchPypi, pythonOlder, importlib-metadata, pbr, setuptools, - six, }: buildPythonPackage rec { pname = "stevedore"; - version = "5.2.0"; - format = "setuptools"; - disabled = pythonOlder "3.6"; + version = "5.3.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-Rrk8pA4RFM6pPXOKbB42U5aYG7a7eMJwRbdYfJRzVE0="; + hash = "sha256-mmQmX0BgMSgoFRwgTvvpt6mFKg2SKHVjRNvH5AI+N1o="; }; - propagatedBuildInputs = [ + build-system = [ pbr setuptools - six - ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + ]; + dependencies = [ + importlib-metadata + setuptools + ]; + + # Checks moved to 'passthru.tests' to workaround infinite recursion doCheck = false; + + passthru.tests = { + tests = callPackage ./tests.nix { }; + }; + pythonImportsCheck = [ "stevedore" ]; meta = with lib; { description = "Manage dynamic plugins for Python applications"; homepage = "https://docs.openstack.org/stevedore/"; license = licenses.asl20; - maintainers = with maintainers; [ fab ]; + maintainers = teams.openstack.members ++ (with maintainers; [ fab ]); }; } diff --git a/pkgs/development/python-modules/stevedore/tests.nix b/pkgs/development/python-modules/stevedore/tests.nix new file mode 100644 index 000000000000..7ae013a6e241 --- /dev/null +++ b/pkgs/development/python-modules/stevedore/tests.nix @@ -0,0 +1,29 @@ +{ + buildPythonPackage, + docutils, + sphinx, + stestr, + stevedore, +}: + +buildPythonPackage { + pname = "stevedore-tests"; + inherit (stevedore) version src; + format = "other"; + + dontBuild = true; + dontInstall = true; + + nativeCheckInputs = [ + docutils + sphinx + stestr + stevedore + ]; + + checkPhase = '' + runHook preCheck + stestr run + runHook postCheck + ''; +} diff --git a/pkgs/development/tools/bashate/default.nix b/pkgs/development/tools/bashate/default.nix index fd4161499c72..3cbf97398953 100644 --- a/pkgs/development/tools/bashate/default.nix +++ b/pkgs/development/tools/bashate/default.nix @@ -1,39 +1,42 @@ -{ lib -, babel -, buildPythonApplication -, fetchPypi -, fixtures -, mock -, pbr -, pytestCheckHook -, pythonOlder -, setuptools -, testtools +{ + lib, + fetchPypi, + python3Packages, }: -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "bashate"; version = "2.1.1"; - disabled = pythonOlder "3.5"; + pyproject = true; + + disabled = python3Packages.pythonOlder "3.5"; src = fetchPypi { inherit pname version; hash = "sha256-S6tul3+DBacgU1+Pk/H7QsUh/LxKbCs9PXZx9C8iH0w="; }; - propagatedBuildInputs = [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ babel pbr setuptools ]; - nativeCheckInputs = [ + nativeCheckInputs = with python3Packages; [ fixtures mock - pytestCheckHook + stestr testtools ]; + checkPhase = '' + runHook preCheck + stestr run + runHook postCheck + ''; + pythonImportsCheck = [ "bashate" ]; meta = with lib; { @@ -41,6 +44,6 @@ buildPythonApplication rec { mainProgram = "bashate"; homepage = "https://opendev.org/openstack/bashate"; license = with licenses; [ asl20 ]; - maintainers = with maintainers; [ fab ]; + maintainers = teams.openstack.members ++ (with maintainers; [ fab ]); }; } diff --git a/pkgs/development/tools/reno/default.nix b/pkgs/development/tools/reno/default.nix index f687583888f2..c5d79f3badf6 100644 --- a/pkgs/development/tools/reno/default.nix +++ b/pkgs/development/tools/reno/default.nix @@ -1,33 +1,44 @@ -{ lib -, git -, gnupg1 -, python3Packages -, fetchPypi +{ + lib, + fetchPypi, + git, + gnupg1, + python3Packages, }: -with python3Packages; buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "reno"; - version = "3.1.0"; + version = "4.1.0"; + pyproject = true; # Must be built from python sdist because of versioning quirks src = fetchPypi { inherit pname version; - sha256 = "2510e3aae4874674187f88f22f854e6b0ea1881b77039808a68ac1a5e8ee69b6"; + hash = "sha256-+ZLx/b0WIV7J3kevCBMdU6KDDJ54Q561Y86Nan9iU3A="; }; - propagatedBuildInputs = [ + # remove b/c doesn't list all dependencies, and requires a few packages not in nixpkgs + postPatch = '' + rm test-requirements.txt + ''; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ dulwich pbr pyyaml setuptools # required for finding pkg_resources at runtime ]; - nativeCheckInputs = [ + nativeCheckInputs = with python3Packages; [ # Python packages - pytestCheckHook docutils fixtures sphinx + stestr testtools testscenarios @@ -36,17 +47,30 @@ with python3Packages; buildPythonApplication rec { gnupg1 ]; - # remove b/c doesn't list all dependencies, and requires a few packages not in nixpkgs - postPatch = '' - rm test-requirements.txt + checkPhase = '' + runHook preCheck + export HOME=$TMPDIR + stestr run -e <(echo " + # Expects to be run from a git repository + reno.tests.test_cache.TestCache.test_build_cache_db + reno.tests.test_semver.TestSemVer.test_major_post_release + reno.tests.test_semver.TestSemVer.test_major_working_and_post_release + reno.tests.test_semver.TestSemVer.test_major_working_copy + reno.tests.test_semver.TestSemVer.test_minor_post_release + reno.tests.test_semver.TestSemVer.test_minor_working_and_post_release + reno.tests.test_semver.TestSemVer.test_minor_working_copy + reno.tests.test_semver.TestSemVer.test_patch_post_release + reno.tests.test_semver.TestSemVer.test_patch_working_and_post_release + reno.tests.test_semver.TestSemVer.test_patch_working_copy + reno.tests.test_semver.TestSemVer.test_same + reno.tests.test_semver.TestSemVer.test_same_with_note + ") + runHook postCheck ''; - disabledTests = [ - "test_build_cache_db" # expects to be run from a git repository - ]; + pythonImportsCheck = [ "reno" ]; - # verify executable - postCheck = '' + postInstallCheck = '' $out/bin/reno -h ''; @@ -55,6 +79,6 @@ with python3Packages; buildPythonApplication rec { mainProgram = "reno"; homepage = "https://docs.openstack.org/reno/latest"; license = licenses.asl20; - maintainers = with maintainers; [ drewrisinger guillaumekoenig ]; + maintainers = teams.openstack.members ++ (with maintainers; [ drewrisinger guillaumekoenig ]); }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffd966185306..848fcaddc1f7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3369,7 +3369,9 @@ with pkgs; base16384 = callPackage ../tools/text/base16384 { }; - bashate = python3Packages.callPackage ../development/tools/bashate { }; + bashate = python3Packages.callPackage ../development/tools/bashate { + python3Packages = python311Packages; + }; bash-my-aws = callPackage ../tools/admin/bash-my-aws { }; @@ -18713,7 +18715,9 @@ with pkgs; regex-cli = callPackage ../development/tools/misc/regex-cli { }; - reno = callPackage ../development/tools/reno { }; + reno = callPackage ../development/tools/reno { + python3Packages = python311Packages; + }; re2c = callPackage ../development/tools/parsing/re2c { };