python312Packages.python-aodhclient: fix package build
This commit is contained in:
@@ -1,24 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
cliff,
|
||||
fetchFromGitHub,
|
||||
keystoneauth1,
|
||||
openstackdocstheme,
|
||||
pbr,
|
||||
setuptools,
|
||||
|
||||
# direct
|
||||
cliff,
|
||||
osc-lib,
|
||||
oslo-i18n,
|
||||
oslo-serialization,
|
||||
oslo-utils,
|
||||
oslotest,
|
||||
osprofiler,
|
||||
pbr,
|
||||
keystoneauth1,
|
||||
pyparsing,
|
||||
setuptools,
|
||||
|
||||
# tests
|
||||
stestrCheckHook,
|
||||
versionCheckHook,
|
||||
openstacksdk,
|
||||
oslotest,
|
||||
tempest,
|
||||
testtools,
|
||||
pifpaf,
|
||||
|
||||
# docs
|
||||
sphinxHook,
|
||||
stestr,
|
||||
openstackdocstheme,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "python-aodhclient";
|
||||
version = "3.10.1";
|
||||
pyproject = true;
|
||||
@@ -26,11 +37,11 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "openstack";
|
||||
repo = "python-aodhclient";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-xm42ZicdBxxm4LTDHPhEIeNU6evBZtp2PGvGy6V2t8c=";
|
||||
};
|
||||
|
||||
env.PBR_VERSION = version;
|
||||
env.PBR_VERSION = finalAttrs.version;
|
||||
|
||||
build-system = [
|
||||
pbr
|
||||
@@ -44,6 +55,10 @@ buildPythonPackage rec {
|
||||
|
||||
sphinxBuilders = [ "man" ];
|
||||
|
||||
patches = [
|
||||
./fix-pyproject.patch
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
cliff
|
||||
keystoneauth1
|
||||
@@ -57,23 +72,31 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
stestrCheckHook
|
||||
openstacksdk
|
||||
oslotest
|
||||
stestr
|
||||
tempest
|
||||
testtools
|
||||
pifpaf
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
stestr run
|
||||
runHook postCheck
|
||||
'';
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
pythonImportsCheck = [ "aodhclient" ];
|
||||
pythonImportsCheck = [
|
||||
"aodhclient"
|
||||
"aodhclient.v2"
|
||||
"aodhclient.tests"
|
||||
"aodhclient.tests.functional"
|
||||
"aodhclient.tests.unit"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/openstack/python-aodhclient";
|
||||
description = "Client library for OpenStack Aodh API";
|
||||
description = "Client library for OpenStack AOodh API";
|
||||
homepage = "https://docs.openstack.org/python-aodhclient/latest/";
|
||||
downloadPage = "https://github.com/openstack/python-aodhclientz /releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "aodh";
|
||||
teams = [ lib.teams.openstack ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 877242f..b5707c0 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -33,10 +33,9 @@ classifiers = [
|
||||
Homepage = "https://docs.openstack.org/python-aodhclient"
|
||||
Repository = "https://opendev.org/openstack/python-aodhclient"
|
||||
|
||||
-[tool.setuptools]
|
||||
-packages = [
|
||||
- "aodhclient"
|
||||
-]
|
||||
+[tool.setuptools.packages.find]
|
||||
+where = ["."]
|
||||
+include = ["aodhclient*"]
|
||||
|
||||
[project.scripts]
|
||||
aodh = "aodhclient.shell:main"
|
||||
Reference in New Issue
Block a user