From f452d7b439d3ecb03464b87ccffc21a1b407e724 Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Sun, 3 Nov 2024 21:20:44 +0800 Subject: [PATCH] math/py-pyreadstat: Add py-pyreadstat 1.2.8 pyreadstat is a python package to read and write sas (sas7bdat, sas7bcat, xport), spps (sav, zsav, por) and stata (dta) data files into/from pandas dataframes. --- math/Makefile | 1 + math/py-pyreadstat/Makefile | 25 +++++++++++++++++++++++++ math/py-pyreadstat/distinfo | 3 +++ math/py-pyreadstat/files/patch-setup.py | 14 ++++++++++++++ math/py-pyreadstat/pkg-descr | 3 +++ 5 files changed, 46 insertions(+) create mode 100644 math/py-pyreadstat/Makefile create mode 100644 math/py-pyreadstat/distinfo create mode 100644 math/py-pyreadstat/files/patch-setup.py create mode 100644 math/py-pyreadstat/pkg-descr diff --git a/math/Makefile b/math/Makefile index 04d118dcd1e7..e96538f03292 100644 --- a/math/Makefile +++ b/math/Makefile @@ -1055,6 +1055,7 @@ SUBDIR += py-pyodesys SUBDIR += py-pyprobables SUBDIR += py-pyreadr + SUBDIR += py-pyreadstat SUBDIR += py-pyrr SUBDIR += py-pysmt SUBDIR += py-pystan diff --git a/math/py-pyreadstat/Makefile b/math/py-pyreadstat/Makefile new file mode 100644 index 000000000000..bfdc74a27146 --- /dev/null +++ b/math/py-pyreadstat/Makefile @@ -0,0 +1,25 @@ +PORTNAME= pyreadstat +PORTVERSION= 1.2.8 +CATEGORIES= math python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Read and Write SAS, SPSS and Stata files into/from pandas data frames +WWW= https://ofajardo.github.io/pyreadstat_documentation/_build/html/ \ + https://github.com/Roche/pyreadstat + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pandas>=1.2.0,1:math/py-pandas@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent cython pep517 + +post-install: + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + + +.include diff --git a/math/py-pyreadstat/distinfo b/math/py-pyreadstat/distinfo new file mode 100644 index 000000000000..f8963473ffb1 --- /dev/null +++ b/math/py-pyreadstat/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1730540890 +SHA256 (pyreadstat-1.2.8.tar.gz) = ced3f261659f10d23843e36ec3ad6699fcac9a863820e53c6fb4b6c1abcf9e94 +SIZE (pyreadstat-1.2.8.tar.gz) = 560144 diff --git a/math/py-pyreadstat/files/patch-setup.py b/math/py-pyreadstat/files/patch-setup.py new file mode 100644 index 000000000000..ee04a6d9cc21 --- /dev/null +++ b/math/py-pyreadstat/files/patch-setup.py @@ -0,0 +1,14 @@ +--- setup.py.orig 2024-10-18 20:21:39 UTC ++++ setup.py +@@ -26,11 +26,6 @@ if PY_MAJOR_VERSION < 3 and os.name == 'nt': + if PY_MAJOR_VERSION < 3 and os.name == 'nt': + raise Exception("Python 2 is not supported on Windows.") + +-cyver = int(Cython.__version__.split(".")[0]) +-if cyver < 3: +- msg = "Cython version 3 or newer required" +- raise Exception(msg) +- + ext = '.pyx' + + diff --git a/math/py-pyreadstat/pkg-descr b/math/py-pyreadstat/pkg-descr new file mode 100644 index 000000000000..9c725249ba40 --- /dev/null +++ b/math/py-pyreadstat/pkg-descr @@ -0,0 +1,3 @@ +pyreadstat is a python package to read and write sas (sas7bdat, sas7bcat, +xport), spps (sav, zsav, por) and stata (dta) data files into/from pandas +dataframes.