diff --git a/math/py-numpy2/Makefile b/math/py-numpy2/Makefile new file mode 100644 index 000000000000..8e44b6a79a77 --- /dev/null +++ b/math/py-numpy2/Makefile @@ -0,0 +1,69 @@ +PORTNAME= numpy +PORTVERSION= 2.0.1 +CATEGORIES= math python +MASTER_SITES= PYPI \ + https://numpy.org/doc/${PORTVERSION:R}/:doc +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +PKGNAMESUFFIX= 2 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + numpy-html.zip:doc +DIST_SUBDIR= numpy-${PORTVERSION:R} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= python@FreeBSD.org +COMMENT= The New Numeric Extension to Python +WWW= https://www.numpy.org/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>=3.0.6:lang/cython3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}meson-python>=0.15.0,1:devel/meson-python@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>=6.68.1:devel/py-hypothesis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=7.4.0,1:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-cov>=4.1.0:devel/py-pytest-cov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0:devel/py-pytest-xdist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.2.0:devel/py-typing-extensions@${PY_FLAVOR} + +USES= compiler:c11 cpe fortran python:3.9+ shebangfix +USE_PYTHON= allflavors autoplist concurrent pep517 + +GCCLIBDIR_CMDS= ${FC} -print-file-name=libgfortran.so | ${SED} -e s/libgfortran.so// +LDFLAGS+= -s + +PORTDOCS= * + +CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}numpy ${PYTHON_PKGNAMEPREFIX}numpy2 + +SHEBANG_FILES= numpy/f2py/crackfortran.py \ + numpy/f2py/f2py2e.py \ + numpy/f2py/rules.py \ + numpy/testing/print_coercion_tables.py + +OPTIONS_DEFINE= DOCS SUITESPARSE +OPTIONS_SINGLE= BLASLIB +OPTIONS_SINGLE_BLASLIB= ATLAS NETLIB OPENBLAS +OPTIONS_DEFAULT= OPENBLAS SUITESPARSE +SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse + +ATLAS_USES= blaslapack:atlas +ATLAS_VARS= BLASLIBS="ptf77blas, ptcblas" BLASNAME=atlas LAPACKLIBS=alapack LIBRARIES=atlas_libs +NETLIB_LIB_DEPENDS= libcblas.so:math/cblas +NETLIB_USES= blaslapack:netlib +NETLIB_VARS= BLASLIBS="blas, cblas" BLASNAME=atlas LAPACKLIBS=lapack LIBRARIES=atlas_libs +OPENBLAS_USES= blaslapack:openblas +OPENBLAS_VARS= BLASLIBS="openblas, gfortran" BLASNAME=openblas LAPACKLIBS="openblas, gfortran" LIBRARIES=libraries +SUITESPARSE_LIB_DEPENDS=libumfpack.so:math/suitesparse-umfpack + +post-install: + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${UNZIP_NATIVE_CMD} -d ${STAGEDIR}${DOCSDIR} -qo ${DISTDIR}/${DIST_SUBDIR}/numpy-html.zip -x .buildinfo + +do-test: + ${PYTHON_CMD} -c 'import numpy; numpy.test()' + +.include diff --git a/math/py-numpy2/distinfo b/math/py-numpy2/distinfo new file mode 100644 index 000000000000..90a21853207a --- /dev/null +++ b/math/py-numpy2/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1722272918 +SHA256 (numpy-2.0/numpy-2.0.1.tar.gz) = 485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3 +SIZE (numpy-2.0/numpy-2.0.1.tar.gz) = 18872007 +SHA256 (numpy-2.0/numpy-html.zip) = 8eaa946da13197d5714421d7352712e9c11729376750c1e16cd87175077388e3 +SIZE (numpy-2.0/numpy-html.zip) = 25343413 diff --git a/math/py-numpy2/pkg-descr b/math/py-numpy2/pkg-descr new file mode 100644 index 000000000000..4120046671b7 --- /dev/null +++ b/math/py-numpy2/pkg-descr @@ -0,0 +1,11 @@ +NumPy is the fundamental package for scientific computing with Python. It +contains among other things: +- a powerful N-dimensional array object +- sophisticated (broadcasting) functions +- tools for integrating C/C++ and Fortran code +- useful linear algebra, Fourier transform, and random number capabilities + +Besides its obvious scientific uses, NumPy can also be used as an efficient +multi-dimensional container of generic data. Arbitrary data-types can be +defined. This allows NumPy to seamlessly and speedily integrate with a wide +variety of databases.