depot/third_party/nixpkgs/pkgs/development/python-modules/openstacksdk/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

87 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
callPackage,
fetchPypi,
platformdirs,
cryptography,
dogpile-cache,
jmespath,
jsonpatch,
keystoneauth1,
munch,
netifaces,
openstackdocstheme,
os-service-types,
pbr,
pythonOlder,
pyyaml,
requestsexceptions,
setuptools,
sphinxHook,
}:
buildPythonPackage rec {
pname = "openstacksdk";
version = "4.0.0";
pyproject = true;
disabled = pythonOlder "3.8";
outputs = [
"out"
"man"
];
src = fetchPypi {
inherit pname version;
hash = "sha256-54YN2WtwUxMJI8EdVx0lgCuWjx4xOIRct8rHxrMzv0s=";
};
postPatch = ''
# Disable rsvgconverter not needed to build manpage
substituteInPlace doc/source/conf.py \
--replace-fail "'sphinxcontrib.rsvgconverter'," "#'sphinxcontrib.rsvgconverter',"
'';
nativeBuildInputs = [
openstackdocstheme
sphinxHook
];
sphinxBuilders = [ "man" ];
build-system = [ setuptools ];
dependencies = [
platformdirs
cryptography
dogpile-cache
jmespath
jsonpatch
keystoneauth1
munch
netifaces
os-service-types
pbr
requestsexceptions
pyyaml
];
# Checks moved to 'passthru.tests' to workaround slowness
doCheck = false;
passthru.tests = {
tests = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "openstack" ];
meta = with lib; {
description = "SDK for building applications to work with OpenStack";
mainProgram = "openstack-inventory";
homepage = "https://github.com/openstack/openstacksdk";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}