pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-macs2: Patches for cython 3
Module Name: pkgsrc-wip
Committed By: Jason W. Bacon <bacon%NetBSD.org@localhost>
Pushed By: outpaddling
Date: Sat Dec 23 09:38:14 2023 -0600
Changeset: 5d511c354b2c9daf80132b3746465db98f631581
Modified Files:
py-macs2/Makefile
py-macs2/PLIST
py-macs2/distinfo
Added Files:
py-macs2/patches/patch-MACS2_IO_CallPeakUnit.pyx
py-macs2/patches/patch-MACS2_IO_FixWidthTrack.pyx
Log Message:
py-macs2: Patches for cython 3
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5d511c354b2c9daf80132b3746465db98f631581
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
py-macs2/Makefile | 8 +++++---
py-macs2/PLIST | 10 +++++-----
py-macs2/distinfo | 2 ++
py-macs2/patches/patch-MACS2_IO_CallPeakUnit.pyx | 15 +++++++++++++++
py-macs2/patches/patch-MACS2_IO_FixWidthTrack.pyx | 15 +++++++++++++++
5 files changed, 42 insertions(+), 8 deletions(-)
diffs:
diff --git a/py-macs2/Makefile b/py-macs2/Makefile
index 5955b57361..b165f43857 100644
--- a/py-macs2/Makefile
+++ b/py-macs2/Makefile
@@ -12,20 +12,22 @@ HOMEPAGE= https://github.com/macs3-project/MACS
COMMENT= Algorithm for identifying transcription factor binding sites
LICENSE= modified-bsd
-TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-0.*:../../wip/py-cython-legacy
+# TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-0.*:../../wip/py-cython-legacy
+TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-3.*:../../devel/py-cython
+# Requires new python features
PYTHON_VERSIONS_INCOMPATIBLE= 27 38
CYTHONIZE= ${PREFIX}/bin/cythonize-${PYVERSSUFFIX}
# Distributed .c files do not support python > 3.9
-post-extract:
+post-patch:
${MV} ${WRKSRC}/MACS2/cPosValCalculation.c ${WRKSRC}
${RM} -f ${WRKSRC}/MACS2/*.c ${WRKSRC}/MACS2/*/*.c
cd ${WRKSRC} && ${CYTHONIZE} ${WRKSRC}/MACS2/*.pyx
cd ${WRKSRC} && ${CYTHONIZE} ${WRKSRC}/MACS2/*/*.pyx
${MV} ${WRKSRC}/cPosValCalculation.c ${WRKSRC}/MACS2
-.include "../../lang/python/egg.mk"
+.include "../../lang/python/wheel.mk"
.include "../../math/py-numpy/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/py-macs2/PLIST b/py-macs2/PLIST
index aa8cb212ca..9b22123791 100644
--- a/py-macs2/PLIST
+++ b/py-macs2/PLIST
@@ -1,10 +1,10 @@
@comment $NetBSD$
bin/macs2
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
${PYSITELIB}/MACS2/Constants.py
${PYSITELIB}/MACS2/Constants.pyc
${PYSITELIB}/MACS2/Constants.pyo
diff --git a/py-macs2/distinfo b/py-macs2/distinfo
index df4d78b548..3650591fb6 100644
--- a/py-macs2/distinfo
+++ b/py-macs2/distinfo
@@ -3,3 +3,5 @@ $NetBSD$
BLAKE2s (MACS2-2.2.9.1.tar.gz) = a4563cb4e23096b972941c55eb416ec7db9b05b207c82747dee31657c00d79c3
SHA512 (MACS2-2.2.9.1.tar.gz) = 6d001d95bac6b6c8ac99592a9345a6ac6836eeb61ff522129c9660ac9bf42bf293af56bd84824b721793a0ec2c73d0a062adb171e5a5a033045aa7552fa28e8b
Size (MACS2-2.2.9.1.tar.gz) = 133109075 bytes
+SHA1 (patch-MACS2_IO_CallPeakUnit.pyx) = 7a9b53f97fd468eca87f5b7f677d624a069d3062
+SHA1 (patch-MACS2_IO_FixWidthTrack.pyx) = fa5814d2218868c0a317861e9083b9adcda257d6
diff --git a/py-macs2/patches/patch-MACS2_IO_CallPeakUnit.pyx b/py-macs2/patches/patch-MACS2_IO_CallPeakUnit.pyx
new file mode 100644
index 0000000000..309d33fb03
--- /dev/null
+++ b/py-macs2/patches/patch-MACS2_IO_CallPeakUnit.pyx
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Fix cython 3 error
+
+--- MACS2/IO/CallPeakUnit.pyx.orig 2023-12-23 15:31:06.614325825 +0000
++++ MACS2/IO/CallPeakUnit.pyx
+@@ -197,7 +197,7 @@ cdef wtd_find_summit(chrom, np.ndarray p
+ wtd_list = np.zeros( search_end - search_start + 1, dtype="float32")
+ i = 0
+ for j in range(search_start, search_end+1):
+- wtd_list[i] = max((2 * (watson_left * crick_right)**0.5 - watson_right - crick_left),0) # minimum score is 0
++ wtd_list[i] = max((2 * (watson_left * crick_right)**0.5 - watson_right - crick_left),complex(0)) # minimum score is 0
+ watson_left += left_forward(watson, j, window_size)
+ watson_right += right_forward(watson, j, window_size)
+ crick_left += left_forward(crick, j, window_size)
diff --git a/py-macs2/patches/patch-MACS2_IO_FixWidthTrack.pyx b/py-macs2/patches/patch-MACS2_IO_FixWidthTrack.pyx
new file mode 100644
index 0000000000..5123e60065
--- /dev/null
+++ b/py-macs2/patches/patch-MACS2_IO_FixWidthTrack.pyx
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Fix cython 3 error
+
+--- MACS2/IO/FixWidthTrack.pyx.orig 2023-07-21 14:25:59.000000000 +0000
++++ MACS2/IO/FixWidthTrack.pyx
+@@ -946,7 +946,7 @@ cdef tuple wtd_find_summit(chrom, np.nda
+ wtd_list = np.zeros( search_end - search_start + 1, dtype="float32")
+ i = 0
+ for j in range(search_start, search_end+1):
+- wtd_list[i] = max((2 * (watson_left * crick_right)**0.5 - watson_right - crick_left),0) # minimum score is 0
++ wtd_list[i] = max((2 * (watson_left * crick_right)**0.5 - watson_right - crick_left),complex(0)) # minimum score is 0
+ watson_left += left_forward(watson, j, window_size)
+ watson_right += right_forward(watson, j, window_size)
+ crick_left += left_forward(crick, j, window_size)
Home |
Main Index |
Thread Index |
Old Index