Unverified Commit 31b8e449 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

python313Packages.osc-lib: convert hack to patch

parent 91dd1b3f
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -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";
+18 −0
Original line number Diff line number Diff line
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