lbry-android-sdk/p4a/pythonforandroid/recipes/pandas/fix_numpy_includes.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

2022-12-02 21:15:34 +01:00
--- pandas-1.0.1/setup.py.orig 2020-02-05 17:15:24.000000000 +0100
+++ pandas-1.0.1/setup.py 2020-03-15 13:47:57.612237225 +0100
@@ -37,11 +37,12 @@ min_cython_ver = "0.29.13" # note: sync
setuptools_kwargs = {
"install_requires": [
- "python-dateutil >= 2.6.1",
- "pytz >= 2017.2",
- f"numpy >= {min_numpy_ver}",
+ # dependencies managed via p4a's recipe
+ # "python-dateutil >= 2.6.1",
+ # "pytz >= 2017.2",
+ # f"numpy >= {min_numpy_ver}",
],
- "setup_requires": [f"numpy >= {min_numpy_ver}"],
+ "setup_requires": [],
"zip_safe": False,
}
@@ -514,7 +515,10 @@ def maybe_cythonize(extensions, *args, *
)
raise RuntimeError("Cannot cythonize without Cython installed.")
- numpy_incl = pkg_resources.resource_filename("numpy", "core/include")
+ if 'NUMPY_INCLUDES' in os.environ:
+ numpy_incl = os.environ['NUMPY_INCLUDES']
+ else:
+ numpy_incl = pkg_resources.resource_filename("numpy", "core/include")
# TODO: Is this really necessary here?
for ext in extensions:
if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: