pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-ruff



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Nov 17 12:49:52 UTC 2024

Modified Files:
        pkgsrc/devel/py-ruff: Makefile distinfo
Added Files:
        pkgsrc/devel/py-ruff/patches: patch-python_ruff_____main____.py

Log Message:
py-ruff: find Ruff binary with Python version suffix


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 pkgsrc/devel/py-ruff/Makefile
cvs rdiff -u -r1.42 -r1.43 pkgsrc/devel/py-ruff/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/py-ruff/patches/patch-python_ruff_____main____.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-ruff/Makefile
diff -u pkgsrc/devel/py-ruff/Makefile:1.44 pkgsrc/devel/py-ruff/Makefile:1.45
--- pkgsrc/devel/py-ruff/Makefile:1.44  Sun Nov 17 09:55:01 2024
+++ pkgsrc/devel/py-ruff/Makefile       Sun Nov 17 12:49:52 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2024/11/17 09:55:01 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2024/11/17 12:49:52 adam Exp $
 
 DISTNAME=      ruff-0.7.4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -28,6 +28,7 @@ SITES.salsa-${SALSA_REV}.tar.gz+=             -${MA
 MAKE_ENV+=     CARGO_NET_OFFLINE=true
 
 post-install:
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/ruff/__main__.py.orig
        cd ${DESTDIR}${PREFIX}/bin && \
        ${MV} ruff ruff-${PYVERSSUFFIX} || ${TRUE}
 

Index: pkgsrc/devel/py-ruff/distinfo
diff -u pkgsrc/devel/py-ruff/distinfo:1.42 pkgsrc/devel/py-ruff/distinfo:1.43
--- pkgsrc/devel/py-ruff/distinfo:1.42  Sun Nov 17 09:55:01 2024
+++ pkgsrc/devel/py-ruff/distinfo       Sun Nov 17 12:49:52 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.42 2024/11/17 09:55:01 wiz Exp $
+$NetBSD: distinfo,v 1.43 2024/11/17 12:49:52 adam Exp $
 
 BLAKE2s (adler-1.0.2.crate) = f263779d752af886455fc0f42c997893fb1a09edcf1bd2980605251c2e3602aa
 SHA512 (adler-1.0.2.crate) = 7ab190d31890fc05b0b55d8e2c6527a505e06793d5496be0b3831e0513412f9ba97f8148f6f68ed0770fa9cd980a5092d885e058becf1d5506b7c74b82674aa1
@@ -1219,3 +1219,4 @@ BLAKE2s (zstd-sys-2.0.11+zstd.1.5.6.crat
 SHA512 (zstd-sys-2.0.11+zstd.1.5.6.crate) = 37081282feffee1e78ddd8992ad5d8b2179ed7ec1be340d0cef0ce0aeea4aaa57850050f4b896d02875f0dec04ac1c20d9aa392f01b12e49ed885f4b8929f48d
 Size (zstd-sys-2.0.11+zstd.1.5.6.crate) = 749078 bytes
 SHA1 (patch-Cargo.toml) = fbe2935512dda150595dd366a70d36c5e1414c3c
+SHA1 (patch-python_ruff_____main____.py) = 389d75d66b901f4ae563c6d9175427147b3d1cbf

Added files:

Index: pkgsrc/devel/py-ruff/patches/patch-python_ruff_____main____.py
diff -u /dev/null pkgsrc/devel/py-ruff/patches/patch-python_ruff_____main____.py:1.1
--- /dev/null   Sun Nov 17 12:49:52 2024
+++ pkgsrc/devel/py-ruff/patches/patch-python_ruff_____main____.py      Sun Nov 17 12:49:52 2024
@@ -0,0 +1,16 @@
+$NetBSD: patch-python_ruff_____main____.py,v 1.1 2024/11/17 12:49:52 adam Exp $
+
+Find Ruff binary with Python version suffix.
+
+--- python/ruff/__main__.py.orig       2024-11-17 12:32:50.193936982 +0000
++++ python/ruff/__main__.py
+@@ -11,6 +11,9 @@ def find_ruff_bin() -> str:
+     scripts_path = os.path.join(sysconfig.get_path("scripts"), ruff_exe)
+     if os.path.isfile(scripts_path):
+         return scripts_path
++    scripts_path += "-" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
++    if os.path.isfile(scripts_path):
++        return scripts_path
+ 
+     if sys.version_info >= (3, 10):
+         user_scheme = sysconfig.get_preferred_scheme("user")



Home | Main Index | Thread Index | Old Index