14
0
Files
python-rtslib-fb/Install-targetctl-as-an-entrypoint.patch
Lee Duncan df200633bc Accepting request 1255725 from home:lee_duncan:branches:devel:languages:python
- Update to version v2.2.2:
  * Explicitly set build target wheel packages
  * Fix the program name in pyproject.toml
  * Fix and update pre-commit ruf check
  * Add PyPA publish and pre-commit check workflows
  * Add rtslib_fb import compability
  * Silently ignore OSError on close
  * fixup! Fix various issues found by ruff linter rules
  * Add ruff rules, pre-commit config
  * Convert codebase to pathlib
  * Fix various issues found by ruff linter rules
  * Refactor code to Python>=3.9 to pass pyupgrade
  * Fix issues found by ruff pep8-naming rules
  * Fix issues found by ruff pycodestyle rules
  * Use f-strings
  * Fixing issues found by ruff Pyflakes rules
  * Move to PEP-621; Drop -fb from module name
  * rtslib: explicitely import "kmod.error" and "kmod.Kmod"
  * rtslib/LUN: add some ALUA property
  Also, updated the SPEC file, and removed patch no longer needed,
  since the problem is no longer present:
  * rtslib-Fix-handling-of-sysfs-RW-attrs-that-are-actually-RO.patch
  Added three commits, one from upstream, the others submitted there:
  * Install-targetctl-as-an-entrypoint.patch (added from upstream)
  * Remove-use-of-usr-bin-python.patch (submitted upstream)
  * Fix-issue-with-Path-open-needs-parenthesis.patch (submitted upstream)

OBS-URL: https://build.opensuse.org/request/show/1255725
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=81
2025-03-24 19:48:06 +00:00

45 lines
1.3 KiB
Diff

From 4677e05cf54eab01bde48dcf3ae1488b6a8241b4 Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Mon, 10 Mar 2025 09:50:53 +0200
Subject: [PATCH] Install targetctl as an entrypoint
scripts = ['scripts/targetctl'] didn't survive the transition to hatch,
readd it with required modifications.
Bug: https://bugs.gentoo.org/950964
Fixes: 9eea9a306f83b039629350dace0983f65fa9c64f
Signed-off-by: Alfred Wingate <parona@protonmail.com>
---
pyproject.toml | 5 ++++-
scripts/targetctl => rtslib/targetctl.py | 0
2 files changed, 4 insertions(+), 1 deletion(-)
rename scripts/targetctl => rtslib/targetctl.py (100%)
diff --git a/pyproject.toml b/pyproject.toml
index c07186aa007c..adebb9f104ea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,6 +31,9 @@ paths = ["COPYING"]
[project.urls]
Homepage = "http://github.com/open-iscsi/rtslib-fb"
+[project.scripts]
+targetctl = "rtslib.targetctl:main"
+
[tool.hatch.version]
source = "vcs"
@@ -90,4 +93,4 @@ ignore = [
]
[tool.ruff.lint.per-file-ignores]
# Magic value used in comparison
-"scripts/targetctl" = ["PLR2004"]
+"rtslib/targetctl.py" = ["PLR2004"]
diff --git a/scripts/targetctl b/rtslib/targetctl.py
similarity index 100%
rename from scripts/targetctl
rename to rtslib/targetctl.py
--
2.43.0