pkgsrc-WIP-changes archive

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

py-macs2: Successful build on NetBSD 9



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Fri Jan 20 09:24:08 2023 -0600
Changeset:	b7ae5808fe26ef83153bef40e0e4f6336145e59c

Modified Files:
	py-macs2/Makefile
	py-macs2/PLIST
	py-macs2/distinfo
	py-macs2/patches/patch-setup.py

Log Message:
py-macs2: Successful build on NetBSD 9

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b7ae5808fe26ef83153bef40e0e4f6336145e59c

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

diffstat:
 py-macs2/Makefile               | 22 +++++++++++++++++-----
 py-macs2/PLIST                  | 22 +++++++---------------
 py-macs2/distinfo               |  8 ++++----
 py-macs2/patches/patch-setup.py | 26 ++++++++++++++++++++++----
 4 files changed, 50 insertions(+), 28 deletions(-)

diffs:
diff --git a/py-macs2/Makefile b/py-macs2/Makefile
index 994bbb0e16..e4fc6ea97a 100644
--- a/py-macs2/Makefile
+++ b/py-macs2/Makefile
@@ -5,24 +5,36 @@
 #              Thu Nov  2 10:04:18 CDT 2017               #
 ###########################################################
 
-DISTNAME=	macs2-2.2.7.1
+DISTNAME=	MACS2-2.2.7.1
 PKGNAME=	${PYPKGPREFIX}-macs2-2.2.7.1
 CATEGORIES=	biology
 MASTER_SITES=	${MASTER_SITE_GITHUB:=taoliu/}
 GITHUB_PROJECT=	MACS
-GITHUB_TAG=     v${PKGVERSION_NOREV}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://pypi.python.org/pypi/macs2
 COMMENT=	Novel algorithm for identifying transcript factor binding sites
 LICENSE=	modified-bsd
 
+TOOL_DEPENDS+=	${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython
+
+# Does not build with python > 3.9
+# PYTHON_VERSIONS_INCOMPATIBLE=	310 311
+
+# these files do not support python 3.11 in the 3.5 release
+post-extract:
+	${MV} ${WRKSRC}/MACS2/cPosValCalculation.c ${WRKSRC}
+	${RM} ${WRKSRC}/MACS2/*.c ${WRKSRC}/MACS2/*/*.c
+	cd ${WRKSRC} && cythonize-${PYVERSSUFFIX} ${WRKSRC}/MACS2/*.pyx ${WRKSRC}/MACS2/*/*.pyx
+	${MV} ${WRKSRC}/cPosValCalculation.c ${WRKSRC}/MACS2
+
 post-install:
 	${STRIP} \
-		${DESTDIR}${PYTHON_SITELIBDIR}/MACS2/*.so \
-		${DESTDIR}${PYTHON_SITELIBDIR}/MACS2/*/*.so
+		${DESTDIR}${PREFIX}/${PYSITELIB}/MACS2/*.so \
+		${DESTDIR}${PREFIX}/${PYSITELIB}/MACS2/*/*.so
 
 .include "../../lang/python/egg.mk"
 .include "../../math/py-numpy/buildlink3.mk"
-#.include "../../devel/py-cython/buildlink3.mk"
+.include "../../devel/py-cython/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/py-macs2/PLIST b/py-macs2/PLIST
index dff868c3f2..aa8cb212ca 100644
--- a/py-macs2/PLIST
+++ b/py-macs2/PLIST
@@ -1,18 +1,15 @@
 @comment $NetBSD$
 bin/macs2
-${PYSITELIB}/MACS2-2.1.1.20160309-py${PYVERSSUFFIX}.egg-info/PKG-INFO
-${PYSITELIB}/MACS2-2.1.1.20160309-py${PYVERSSUFFIX}.egg-info/SOURCES.txt
-${PYSITELIB}/MACS2-2.1.1.20160309-py${PYVERSSUFFIX}.egg-info/dependency_links.txt
-${PYSITELIB}/MACS2-2.1.1.20160309-py${PYVERSSUFFIX}.egg-info/requires.txt
-${PYSITELIB}/MACS2-2.1.1.20160309-py${PYVERSSUFFIX}.egg-info/top_level.txt
+${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}/MACS2/Constants.py
 ${PYSITELIB}/MACS2/Constants.pyc
 ${PYSITELIB}/MACS2/Constants.pyo
 ${PYSITELIB}/MACS2/IO/BedGraph.so
 ${PYSITELIB}/MACS2/IO/BedGraphIO.so
-${PYSITELIB}/MACS2/IO/BinKeeper.py
-${PYSITELIB}/MACS2/IO/BinKeeper.pyc
-${PYSITELIB}/MACS2/IO/BinKeeper.pyo
 ${PYSITELIB}/MACS2/IO/CallPeakUnit.so
 ${PYSITELIB}/MACS2/IO/FixWidthTrack.so
 ${PYSITELIB}/MACS2/IO/PairedEndTrack.so
@@ -33,7 +30,6 @@ ${PYSITELIB}/MACS2/PeakModel.so
 ${PYSITELIB}/MACS2/Pileup.so
 ${PYSITELIB}/MACS2/Prob.so
 ${PYSITELIB}/MACS2/Signal.so
-${PYSITELIB}/MACS2/Statistics.so
 ${PYSITELIB}/MACS2/__init__.py
 ${PYSITELIB}/MACS2/__init__.pyc
 ${PYSITELIB}/MACS2/__init__.pyo
@@ -52,24 +48,20 @@ ${PYSITELIB}/MACS2/bdgopt_cmd.pyo
 ${PYSITELIB}/MACS2/bdgpeakcall_cmd.py
 ${PYSITELIB}/MACS2/bdgpeakcall_cmd.pyc
 ${PYSITELIB}/MACS2/bdgpeakcall_cmd.pyo
+${PYSITELIB}/MACS2/cPosValCalculation.pxd
 ${PYSITELIB}/MACS2/callpeak_cmd.py
 ${PYSITELIB}/MACS2/callpeak_cmd.pyc
 ${PYSITELIB}/MACS2/callpeak_cmd.pyo
 ${PYSITELIB}/MACS2/cmbreps_cmd.py
 ${PYSITELIB}/MACS2/cmbreps_cmd.pyc
 ${PYSITELIB}/MACS2/cmbreps_cmd.pyo
-${PYSITELIB}/MACS2/data/__init__.py
-${PYSITELIB}/MACS2/data/__init__.pyc
-${PYSITELIB}/MACS2/data/__init__.pyo
-${PYSITELIB}/MACS2/data/g0.01.dat
-${PYSITELIB}/MACS2/data/g0.05.dat
 ${PYSITELIB}/MACS2/diffpeak_cmd.py
 ${PYSITELIB}/MACS2/diffpeak_cmd.pyc
 ${PYSITELIB}/MACS2/diffpeak_cmd.pyo
 ${PYSITELIB}/MACS2/filterdup_cmd.py
 ${PYSITELIB}/MACS2/filterdup_cmd.pyc
 ${PYSITELIB}/MACS2/filterdup_cmd.pyo
-${PYSITELIB}/MACS2/hashtable.so
+${PYSITELIB}/MACS2/khash.pxd
 ${PYSITELIB}/MACS2/pileup_cmd.py
 ${PYSITELIB}/MACS2/pileup_cmd.pyc
 ${PYSITELIB}/MACS2/pileup_cmd.pyo
diff --git a/py-macs2/distinfo b/py-macs2/distinfo
index 8423658b13..fc9834522c 100644
--- a/py-macs2/distinfo
+++ b/py-macs2/distinfo
@@ -1,6 +1,6 @@
 $NetBSD$
 
-BLAKE2s (macs2-2.2.7.1.tar.gz) = 9018fcf83634355b625d8cbf6f67071c78d469bb35732318115470b7b7d30f8a
-SHA512 (macs2-2.2.7.1.tar.gz) = 2591ff3258124b1d577b0f417838e13ca6151b011590dbb769fd500d7ee5c7969349a7e40d11c3d8cbe75555786f3b76d3950586d7ed144e6e7679018c32d5c5
-Size (macs2-2.2.7.1.tar.gz) = 134872405 bytes
-SHA1 (patch-setup.py) = c08f7d2c8f11032b223c4ba2f93f35c419a9544c
+BLAKE2s (MACS2-2.2.7.1.tar.gz) = 9018fcf83634355b625d8cbf6f67071c78d469bb35732318115470b7b7d30f8a
+SHA512 (MACS2-2.2.7.1.tar.gz) = 2591ff3258124b1d577b0f417838e13ca6151b011590dbb769fd500d7ee5c7969349a7e40d11c3d8cbe75555786f3b76d3950586d7ed144e6e7679018c32d5c5
+Size (MACS2-2.2.7.1.tar.gz) = 134872405 bytes
+SHA1 (patch-setup.py) = 9b17fd669b1d67aeb1e7ab8d8fc2b93624755f47
diff --git a/py-macs2/patches/patch-setup.py b/py-macs2/patches/patch-setup.py
index e2fcb21c0f..e0532e7050 100644
--- a/py-macs2/patches/patch-setup.py
+++ b/py-macs2/patches/patch-setup.py
@@ -1,10 +1,10 @@
 $NetBSD$
 
-# Remove lexical version comparison
+# Remove lexical version check and pip requirement
 
---- setup.py.orig	2023-01-19 15:12:37.871351424 +0000
+--- setup.py.orig	2020-04-12 00:00:15.000000000 +0000
 +++ setup.py
-@@ -20,10 +20,6 @@ numpy_requires = '>=1.17'
+@@ -20,28 +20,8 @@ numpy_requires = '>=1.17'
  install_requires = [f"numpy>={numpy_requires}",]
  
  def main():
@@ -14,4 +14,22 @@ $NetBSD$
 -
      cwd = os.path.abspath(os.path.dirname(__file__))
  
-     # install required numpy
+-    # install required numpy
+-    p = subprocess.call([sys.executable, "-m", 'pip', 'install', f'numpy{numpy_requires}'],cwd=cwd)
+-    if p != 0:
+-        # Could be due to a too old pip version and build isolation, check that
+-        try:
+-            # Note, pip may not be installed or not have been used
+-            import pip
+-            if LooseVersion(pip.__version__) < LooseVersion('18.0.0'):
+-                raise RuntimeError("Installing requirements failed. Possibly due "
+-                                   "to `pip` being too old, found version {}, "
+-                                   "needed is >= 18.0.0.".format(pip.__version__))
+-            else:
+-                raise RuntimeError("Installing requirements failed!")
+-        except ImportError:
+-            raise RuntimeError("Installing requirement failed! `pip` has to be installed!")
+-        
+     from numpy import get_include as numpy_get_include
+     numpy_include_dir = [numpy_get_include()]
+         


Home | Main Index | Thread Index | Old Index