2021-09-28 08:13:01 +00:00
|
|
|
diff --git a/pyproj/datadir.py b/pyproj/datadir.py
|
|
|
|
index 9ca1d25..4198490 100644
|
|
|
|
--- a/pyproj/datadir.py
|
|
|
|
+++ b/pyproj/datadir.py
|
|
|
|
@@ -70,7 +70,7 @@ def get_data_dir() -> str:
|
|
|
|
global _VALIDATED_PROJ_DATA
|
2020-04-24 23:36:52 +00:00
|
|
|
if _VALIDATED_PROJ_DATA is not None:
|
|
|
|
return _VALIDATED_PROJ_DATA
|
2021-04-13 19:44:15 +00:00
|
|
|
- internal_datadir = Path(__file__).absolute().parent / "proj_dir" / "share" / "proj"
|
|
|
|
+ internal_datadir = Path("@proj@/share/proj")
|
2020-04-24 23:36:52 +00:00
|
|
|
proj_lib_dirs = os.environ.get("PROJ_LIB", "")
|
2021-04-13 19:44:15 +00:00
|
|
|
prefix_datadir = Path(sys.prefix, "share", "proj")
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
diff --git a/setup.py b/setup.py
|
|
|
|
index 6bb0c6c..b3d0321 100644
|
|
|
|
--- a/setup.py
|
|
|
|
+++ b/setup.py
|
|
|
|
@@ -12,7 +12,7 @@ from setuptools import Extension, setup
|
2021-04-13 19:44:15 +00:00
|
|
|
PROJ_MIN_VERSION = parse_version("7.2.0")
|
|
|
|
CURRENT_FILE_PATH = Path(__file__).absolute().parent
|
|
|
|
BASE_INTERNAL_PROJ_DIR = Path("proj_dir")
|
|
|
|
-INTERNAL_PROJ_DIR = CURRENT_FILE_PATH / "pyproj" / BASE_INTERNAL_PROJ_DIR
|
|
|
|
+INTERNAL_PROJ_DIR = Path("@proj@")
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
def get_proj_version(proj_dir: Path) -> str:
|
2021-09-28 08:13:01 +00:00
|
|
|
@@ -155,7 +155,7 @@ def get_extension_modules():
|
2020-04-24 23:36:52 +00:00
|
|
|
# By default we'll try to get options PROJ_DIR or the local version of proj
|
|
|
|
proj_dir = get_proj_dir()
|
|
|
|
library_dirs = get_proj_libdirs(proj_dir)
|
|
|
|
- include_dirs = get_proj_incdirs(proj_dir)
|
2021-04-13 19:44:15 +00:00
|
|
|
+ include_dirs = get_proj_incdirs(Path("@projdev@"))
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
proj_version = get_proj_version(proj_dir)
|
|
|
|
check_proj_version(proj_version)
|
2021-09-28 08:13:01 +00:00
|
|
|
diff --git a/test/test_cli.py b/test/test_cli.py
|
|
|
|
index 7a696de..1b9b777 100644
|
|
|
|
--- a/test/test_cli.py
|
|
|
|
+++ b/test/test_cli.py
|
|
|
|
@@ -14,7 +14,7 @@ from pyproj.sync import _load_grid_geojson
|
2021-04-13 19:44:15 +00:00
|
|
|
from test.conftest import grids_available, proj_env, tmp_chdir
|
|
|
|
|
|
|
|
PYPROJ_CLI_ENDPONTS = pytest.mark.parametrize(
|
|
|
|
- "input_command", [["pyproj"], [sys.executable, "-m", "pyproj"]]
|
|
|
|
+ "input_command", [[sys.executable, "-m", "pyproj"]]
|
|
|
|
)
|
|
|
|
|
|
|
|
|