Skip to content

Commit

Permalink
python311Packages.python-{watcherclient,zaqarclient,zunclient}: init (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium authored Sep 14, 2024
2 parents 037b786 + d9ebc91 commit a3e08f4
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
python-mistralclient,
python-neutronclient,
python-openstackclient,
python-watcherclient,
python-zaqarclient,
python-zunclient,
requests-mock,
requests,
setuptools,
Expand Down Expand Up @@ -79,6 +82,9 @@ buildPythonPackage rec {
python-manilaclient
python-mistralclient
python-neutronclient
python-watcherclient
python-zaqarclient
python-zunclient
];
};
tests.version = testers.testVersion {
Expand Down
75 changes: 75 additions & 0 deletions pkgs/development/python-modules/python-watcherclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
lib,
buildPythonPackage,
cliff,
fetchFromGitHub,
keystoneauth1,
openstackdocstheme,
osc-lib,
oslo-i18n,
oslo-serialization,
oslo-utils,
pbr,
pythonOlder,
setuptools,
sphinxcontrib-apidoc,
sphinxHook,
stestr,
}:

buildPythonPackage rec {
pname = "python-watcherclient";
version = "4.4.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "openstack";
repo = "python-watcherclient";
rev = "refs/tags/${version}";
hash = "sha256-lDdiZKaeteKZEyfjpBx8KY+0FLFOYAnQXl0pTbqq0Ss=";
};

env.PBR_VERSION = version;

build-system = [
pbr
setuptools
];

nativeBuildInputs = [
openstackdocstheme
sphinxcontrib-apidoc
sphinxHook
];

sphinxBuilders = [ "man" ];

dependencies = [
cliff
keystoneauth1
osc-lib
oslo-i18n
oslo-serialization
oslo-utils
];

nativeCheckInputs = [ stestr ];

checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';

pythonImportsCheck = [ "watcherclient" ];

meta = {
homepage = "https://opendev.org/openstack/python-watcherclient";
description = "Client library for OpenStack Watcher API";
license = lib.licenses.asl20;
mainProgram = "watcher";
maintainers = lib.teams.openstack.members;
};
}
82 changes: 82 additions & 0 deletions pkgs/development/python-modules/python-zaqarclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
lib,
buildPythonPackage,
ddt,
fetchFromGitHub,
jsonschema,
keystoneauth1,
openstackdocstheme,
osc-lib,
oslo-i18n,
oslo-log,
oslo-utils,
pbr,
pythonOlder,
requests-mock,
requests,
setuptools,
sphinxHook,
stestr,
stevedore,
}:

buildPythonPackage rec {
pname = "python-zaqarclient";
version = "2.7.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "openstack";
repo = "python-zaqarclient";
rev = "refs/tags/${version}";
hash = "sha256-WphTlqhrwxg5g88NH1W4b3uLAxLImnS34hDrlJjWeEU=";
};

env.PBR_VERSION = version;

build-system = [
pbr
setuptools
];

nativeBuildInputs = [
openstackdocstheme
sphinxHook
];

sphinxBuilders = [ "man" ];

dependencies = [
jsonschema
keystoneauth1
osc-lib
oslo-i18n
oslo-log
oslo-utils
requests
stevedore
];

nativeCheckInputs = [
ddt
requests-mock
stestr
];

checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';

pythonImportsCheck = [ "zaqarclient" ];

meta = {
homepage = "https://opendev.org/openstack/python-zaqarclient";
description = "Client library for OpenStack Zaqar API";
license = lib.licenses.asl20;
maintainers = lib.teams.openstack.members;
};
}
92 changes: 92 additions & 0 deletions pkgs/development/python-modules/python-zunclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
lib,
buildPythonPackage,
docker,
fetchFromGitHub,
keystoneauth1,
openstackdocstheme,
osc-lib,
oslo-i18n,
oslo-log,
oslo-utils,
pbr,
prettytable,
pythonOlder,
setuptools,
sphinxHook,
stestr,
websocket-client,
}:

buildPythonPackage rec {
pname = "python-zunclient";
version = "5.0.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "openstack";
repo = "python-zunclient";
rev = "refs/tags/${version}";
hash = "sha256-EVfrxSc/eHYZR0FGFnNAxFCiXangt8uRkAC2zpwWqcA=";
};

env.PBR_VERSION = version;

build-system = [
pbr
setuptools
];

nativeBuildInputs = [
openstackdocstheme
sphinxHook
];

sphinxBuilders = [ "man" ];

# python-openstackclient is unused upstream
# and will cause infinite recursion in openstackclient-full package.
pythonRemoveDeps = [ "python-openstackclient" ];

dependencies = [
docker
keystoneauth1
osc-lib
oslo-i18n
oslo-log
oslo-utils
prettytable
websocket-client
];

nativeCheckInputs = [ stestr ];

checkPhase = ''
runHook preCheck
stestr run -e <(echo "
zunclient.tests.unit.test_shell.ShellTest.test_main_endpoint_internal
zunclient.tests.unit.test_shell.ShellTest.test_main_endpoint_public
zunclient.tests.unit.test_shell.ShellTest.test_main_env_region
zunclient.tests.unit.test_shell.ShellTest.test_main_no_region
zunclient.tests.unit.test_shell.ShellTest.test_main_option_region
zunclient.tests.unit.test_shell.ShellTestKeystoneV3.test_main_endpoint_internal
zunclient.tests.unit.test_shell.ShellTestKeystoneV3.test_main_endpoint_public
zunclient.tests.unit.test_shell.ShellTestKeystoneV3.test_main_env_region
zunclient.tests.unit.test_shell.ShellTestKeystoneV3.test_main_no_region
zunclient.tests.unit.test_shell.ShellTestKeystoneV3.test_main_option_region
")
runHook postCheck
'';

pythonImportsCheck = [ "zunclient" ];

meta = {
homepage = "https://opendev.org/openstack/python-zunclient";
description = "Client library for OpenStack Zun API";
license = lib.licenses.asl20;
mainProgram = "zun";
maintainers = lib.teams.openstack.members;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22916,6 +22916,8 @@ with pkgs;
mistralclient = with python311Packages; toPythonApplication python-mistralclient;
swiftclient = with python311Packages; toPythonApplication python-swiftclient;
troveclient = with python311Packages; toPythonApplication python-troveclient;
watcherclient = with python311Packages; toPythonApplication python-watcherclient;
zunclient = with python311Packages; toPythonApplication python-zunclient;

openvdb = callPackage ../development/libraries/openvdb { };

Expand Down
6 changes: 6 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12846,6 +12846,8 @@ self: super: with self; {

python-vlc = callPackage ../development/python-modules/python-vlc { };

python-watcherclient = callPackage ../development/python-modules/python-watcherclient { };

python-whois = callPackage ../development/python-modules/python-whois { };

python-wifi = callPackage ../development/python-modules/python-wifi { };
Expand All @@ -12856,8 +12858,12 @@ self: super: with self; {

python-xz = callPackage ../development/python-modules/python-xz { };

python-zaqarclient = callPackage ../development/python-modules/python-zaqarclient { };

python-zbar = callPackage ../development/python-modules/python-zbar { };

python-zunclient = callPackage ../development/python-modules/python-zunclient { };

pythran = callPackage ../development/python-modules/pythran {
inherit (pkgs.llvmPackages) openmp;
};
Expand Down

0 comments on commit a3e08f4

Please sign in to comment.