diff options
Diffstat (limited to 'math/py-pyreadr/files')
-rw-r--r-- | math/py-pyreadr/files/patch-pyreadr-librdata.c | 36 | ||||
-rw-r--r-- | math/py-pyreadr/files/patch-pyreadr-librdata.pxd | 20 | ||||
-rw-r--r-- | math/py-pyreadr/files/patch-setup.py | 23 |
3 files changed, 79 insertions, 0 deletions
diff --git a/math/py-pyreadr/files/patch-pyreadr-librdata.c b/math/py-pyreadr/files/patch-pyreadr-librdata.c new file mode 100644 index 000000000000..d708f7f8dadb --- /dev/null +++ b/math/py-pyreadr/files/patch-pyreadr-librdata.c @@ -0,0 +1,36 @@ +--- pyreadr/librdata.c.orig 2021-06-07 07:39:42 UTC ++++ pyreadr/librdata.c +@@ -4,8 +4,6 @@ + { + "distutils": { + "depends": [ +- "pyreadr/libs/librdata/src/rdata.h", +- "pyreadr/libs/librdata/src/rdata_io_unistd.h" + ], + "extra_compile_args": [ + "-DHAVE_ZLIB", +@@ -23,13 +21,6 @@ + "name": "pyreadr.librdata", + "sources": [ + "pyreadr/librdata.pyx", +- "pyreadr/libs/librdata/src/CKHashTable.c", +- "pyreadr/libs/librdata/src/rdata_bits.c", +- "pyreadr/libs/librdata/src/rdata_error.c", +- "pyreadr/libs/librdata/src/rdata_io_unistd.c", +- "pyreadr/libs/librdata/src/rdata_parser.c", +- "pyreadr/libs/librdata/src/rdata_read.c", +- "pyreadr/libs/librdata/src/rdata_write.c" + ] + }, + "module_name": "pyreadr.librdata" +@@ -645,8 +636,8 @@ static CYTHON_INLINE float __PYX_NAN() { + #include <time.h> + #include <stdint.h> + #include <sys/types.h> +-#include "libs/librdata/src/rdata.h" +-#include "libs/librdata/src/rdata_io_unistd.h" ++#include <rdata.h> ++#include <rdata_io_unistd.h> + #include <sys/stat.h> + #include <unistd.h> + #include <fcntl.h> diff --git a/math/py-pyreadr/files/patch-pyreadr-librdata.pxd b/math/py-pyreadr/files/patch-pyreadr-librdata.pxd new file mode 100644 index 000000000000..7b09086fc162 --- /dev/null +++ b/math/py-pyreadr/files/patch-pyreadr-librdata.pxd @@ -0,0 +1,20 @@ +--- pyreadr/librdata.pxd.orig 2020-12-09 08:50:11 UTC ++++ pyreadr/librdata.pxd +@@ -11,7 +11,7 @@ cdef extern from '<sys/types.h>': + cdef extern from 'Python.h': + object PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len) + +-cdef extern from 'libs/librdata/src/rdata.h': ++cdef extern from '<rdata.h>': + + cdef enum rdata_type_t 'rdata_type_e': + RDATA_TYPE_STRING +@@ -128,7 +128,7 @@ cdef extern from 'libs/librdata/src/rdata.h': + rdata_error_t rdata_end_table(rdata_writer_t *writer, int32_t row_count, const char *datalabel); + rdata_error_t rdata_end_file(rdata_writer_t *writer); + +-cdef extern from 'libs/librdata/src/rdata_io_unistd.h': ++cdef extern from '<rdata_io_unistd.h>': + cdef struct rdata_unistd_io_ctx_t 'rdata_unistd_io_ctx_s': + int fd + diff --git a/math/py-pyreadr/files/patch-setup.py b/math/py-pyreadr/files/patch-setup.py new file mode 100644 index 000000000000..546a07909986 --- /dev/null +++ b/math/py-pyreadr/files/patch-setup.py @@ -0,0 +1,23 @@ +--- setup.py.orig 2021-06-07 06:47:51 UTC ++++ setup.py +@@ -13,7 +13,6 @@ from setuptools import setup, Extension + from Cython.Build import cythonize + + librdata_source_files = [] +-librdata_source_files += glob.glob('pyreadr/libs/librdata/src/*.c') + librdata_source_files += ['pyreadr/librdata.pyx'] + + library_dirs = [] +@@ -52,10 +51,11 @@ elif platform.system() == 'Windows': + libraries.append('bz2') + libraries.append('lzma') + +-elif platform.system() == 'Linux': ++elif platform.system() == 'FreeBSD' or platform.system() == 'Linux': + libraries.append('z') + libraries.append('bz2') + libraries.append('lzma') ++ libraries.append('rdata') + #extra_compile_args.append("--std=gnu99") + else: + raise RuntimeError('Unsupported OS') |