python313Packages.osc-lib: convert hack to patch (#491043)

This commit is contained in:
Sandro
2026-02-17 12:56:07 +00:00
committed by GitHub
2 changed files with 34 additions and 7 deletions
@@ -15,7 +15,6 @@
stdenv,
stestr,
stevedore,
writeText,
}:
buildPythonPackage rec {
@@ -30,11 +29,9 @@ buildPythonPackage rec {
hash = "sha256-1mMON/aVJon7t/zfYVhFpuB78b+DmOEVhvIFaTBRqfo=";
};
postPatch = ''
# TODO: somehow bring this to upstreams attention
substituteInPlace pyproject.toml \
--replace-fail '"osc_lib"' '"osc_lib", "osc_lib.api", "osc_lib.cli", "osc_lib.command", "osc_lib.test", "osc_lib.tests", "osc_lib.tests.api", "osc_lib.tests.cli", "osc_lib.tests.command", "osc_lib.tests.utils", "osc_lib.utils"'
'';
patches = [
./fix-pyproject.diff
];
env.PBR_VERSION = version;
@@ -79,7 +76,19 @@ buildPythonPackage rec {
runHook postCheck
'';
pythonImportsCheck = [ "osc_lib" ];
pythonImportsCheck = [
"osc_lib"
"osc_lib.api"
"osc_lib.cli"
"osc_lib.command"
"osc_lib.test"
"osc_lib.tests"
"osc_lib.tests.api"
"osc_lib.tests.cli"
"osc_lib.tests.command"
"osc_lib.tests.utils"
"osc_lib.utils"
];
meta = {
description = "OpenStackClient Library";
@@ -0,0 +1,18 @@
diff --git a/pyproject.toml b/pyproject.toml
index 34680b2..95f573c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -37,10 +37,9 @@ test = [
"testtools>=2.2.0", # MIT
]
-[tool.setuptools]
-packages = [
- "osc_lib"
-]
+[tool.setuptools.packages.find]
+where = ["."]
+include = ["osc_lib*"]
[tool.mypy]
show_column_numbers = true