nixpkgs-suyu/pkgs/development/python-modules/pyproj/001.proj.patch

48 lines
1.6 KiB
Diff
Raw Normal View History

diff a/pyproj/datadir.py b/pyproj/datadir.py
--- a/pyproj/datadir.py
+++ b/pyproj/datadir.py
@@ -52,6 +52,7 @@ def get_data_dir():
str: The valid data directory.
"""
+ return "@proj@/share/proj"
# to avoid re-validating
global _VALIDATED_PROJ_DATA
if _VALIDATED_PROJ_DATA is not None:
diff a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ INTERNAL_PROJ_DIR = os.path.join(CURRENT_FILE_PATH, "pyproj", BASE_INTERNAL_PROJ
def check_proj_version(proj_dir):
"""checks that the PROJ library meets the minimum version"""
- proj = os.path.join(proj_dir, "bin", "proj")
+ proj = "@proj@/bin/proj"
proj_ver_bytes = subprocess.check_output(proj, stderr=subprocess.STDOUT)
proj_ver_bytes = (proj_ver_bytes.decode("ascii").split()[1]).strip(",")
proj_version = parse_version(proj_ver_bytes)
@@ -33,6 +33,7 @@ def get_proj_dir():
"""
This function finds the base PROJ directory.
"""
+ return "@proj@"
proj_dir = os.environ.get("PROJ_DIR")
if proj_dir is None and os.path.exists(INTERNAL_PROJ_DIR):
proj_dir = INTERNAL_PROJ_DIR
@@ -56,6 +57,7 @@ def get_proj_libdirs(proj_dir):
"""
This function finds the library directories
"""
+ return ["@proj@/lib"]
proj_libdir = os.environ.get("PROJ_LIBDIR")
libdirs = []
if proj_libdir is None:
@@ -77,6 +79,7 @@ def get_proj_incdirs(proj_dir):
"""
This function finds the include directories
"""
+ return ["@proj@/include"]
proj_incdir = os.environ.get("PROJ_INCDIR")
incdirs = []
if proj_incdir is None: