mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
science/py-scikit-sparse: Update 0.2 -> 0.4.3
Port changes: * Fix scipy dependency * Order USE_PYTHON * Modify CFLAGS * Add stripping * Remove patch because it has been applied upstream
This commit is contained in:
parent
31fea6f5a5
commit
df214e1a6c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=468324
science/py-scikit-sparse
@ -2,12 +2,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= scikit-sparse
|
||||
PORTVERSION= 0.2
|
||||
PORTREVISION= 5
|
||||
DISTVERSION= 0.4.3
|
||||
CATEGORIES= science python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= scikits.sparse-${PORTVERSION}
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= Sparse matrix package
|
||||
@ -15,14 +13,17 @@ COMMENT= Sparse matrix package
|
||||
LICENSE= BSD2CLAUSE
|
||||
|
||||
RUN_DEPENDS= ${PYNUMPY} \
|
||||
${PYTHON_SITELIBDIR}/scipy/version.py:science/py-scipy@${FLAVOR}
|
||||
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${FLAVOR}
|
||||
BUILD_DEPENDS= ${RUN_DEPENDS}
|
||||
LIB_DEPENDS= libumfpack.so:math/suitesparse
|
||||
|
||||
USES= fortran python
|
||||
USE_PYTHON= autoplist distutils cython
|
||||
USE_PYTHON= distutils cython autoplist
|
||||
|
||||
CFLAGS+= -I${LOCALBASE}/include
|
||||
CFLAGS+= -I${LOCALBASE}/include/suitesparse
|
||||
LDFLAGS+= -shared
|
||||
|
||||
post-install:
|
||||
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sksparse/cholmod.so
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (scikits.sparse-0.2.tar.gz) = 509d93d1020362607ebd677995df6480c160cbd9f021c296152f1fd59c8c1afc
|
||||
SIZE (scikits.sparse-0.2.tar.gz) = 204097
|
||||
TIMESTAMP = 1524194312
|
||||
SHA256 (scikit-sparse-0.4.3.tar.gz) = 4963d99b4b002378d86751d7e5020ba13a206b45f33368176485d8a194b32bdd
|
||||
SIZE (scikit-sparse-0.4.3.tar.gz) = 251879
|
||||
|
@ -1,36 +0,0 @@
|
||||
This patch is the origin of the upstream contribution referenced by
|
||||
https://github.com/njsmith/scikits-sparse/pull/12
|
||||
|
||||
--- scikits/sparse/test_cholmod.py.orig 2015-06-24 10:39:06 UTC
|
||||
+++ scikits/sparse/test_cholmod.py
|
||||
@@ -53,17 +53,17 @@ def test_integer_size():
|
||||
def test_cholesky_smoke_test():
|
||||
f = cholesky(sparse.eye(10, 10) * 1.)
|
||||
d = np.arange(20).reshape(10, 2)
|
||||
- print "dense"
|
||||
+ print("dense")
|
||||
assert np.allclose(f(d), d)
|
||||
- print "sparse"
|
||||
+ print("sparse")
|
||||
s_csc = sparse.csc_matrix(np.eye(10)[:, :2] * 1.)
|
||||
assert sparse.issparse(f(s_csc))
|
||||
assert np.allclose(f(s_csc).todense(), s_csc.todense())
|
||||
- print "csr"
|
||||
+ print("csr")
|
||||
s_csr = s_csc.tocsr()
|
||||
assert sparse.issparse(f(s_csr))
|
||||
assert np.allclose(f(s_csr).todense(), s_csr.todense())
|
||||
- print "extract"
|
||||
+ print("extract")
|
||||
assert np.all(f.P() == np.arange(10))
|
||||
|
||||
def real_matrix():
|
||||
@@ -193,7 +193,7 @@ def test_cholesky_matrix_market():
|
||||
f3.cholesky_AAt_inplace(X.T)
|
||||
assert np.allclose(f3(Xty), answer)
|
||||
|
||||
- print problem, mode
|
||||
+ print(problem, mode)
|
||||
for f in (f1, f2, f3, f4):
|
||||
pXtX = XtX.todense()[f.P()[:, np.newaxis],
|
||||
f.P()[np.newaxis, :]]
|
Loading…
Reference in New Issue
Block a user