aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile1
-rw-r--r--math/py-pyreadstat/Makefile25
-rw-r--r--math/py-pyreadstat/distinfo3
-rw-r--r--math/py-pyreadstat/files/patch-setup.py14
-rw-r--r--math/py-pyreadstat/pkg-descr3
5 files changed, 46 insertions, 0 deletions
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 <bsd.port.mk>
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.