ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pyproj / 001.proj.patch
blobf62b70915dc56f2467357a405463b94e635f5da5
1 diff --git a/pyproj/datadir.py b/pyproj/datadir.py
2 index 9ca1d25..4198490 100644
3 --- a/pyproj/datadir.py
4 +++ b/pyproj/datadir.py
5 @@ -70,7 +70,7 @@ def get_data_dir() -> str:
6 global _VALIDATED_PROJ_DATA
7 if _VALIDATED_PROJ_DATA is not None:
8 return _VALIDATED_PROJ_DATA
9 - internal_datadir = Path(__file__).absolute().parent / "proj_dir" / "share" / "proj"
10 + internal_datadir = Path("@proj@/share/proj")
11 proj_lib_dirs = os.environ.get("PROJ_LIB", "")
12 prefix_datadir = Path(sys.prefix, "share", "proj")
14 diff --git a/setup.py b/setup.py
15 index 6bb0c6c..b3d0321 100644
16 --- a/setup.py
17 +++ b/setup.py
18 @@ -12,7 +12,7 @@ from setuptools import Extension, setup
19 PROJ_MIN_VERSION = parse_version("7.2.0")
20 CURRENT_FILE_PATH = Path(__file__).absolute().parent
21 BASE_INTERNAL_PROJ_DIR = Path("proj_dir")
22 -INTERNAL_PROJ_DIR = CURRENT_FILE_PATH / "pyproj" / BASE_INTERNAL_PROJ_DIR
23 +INTERNAL_PROJ_DIR = Path("@proj@")
26 def get_proj_version(proj_dir: Path) -> str:
27 @@ -155,7 +155,7 @@ def get_extension_modules():
28 # By default we'll try to get options PROJ_DIR or the local version of proj
29 proj_dir = get_proj_dir()
30 library_dirs = get_proj_libdirs(proj_dir)
31 - include_dirs = get_proj_incdirs(proj_dir)
32 + include_dirs = get_proj_incdirs(Path("@projdev@"))
34 proj_version = get_proj_version(proj_dir)
35 check_proj_version(proj_version)
36 diff --git a/test/test_cli.py b/test/test_cli.py
37 index 7a696de..1b9b777 100644
38 --- a/test/test_cli.py
39 +++ b/test/test_cli.py
40 @@ -14,7 +14,7 @@ from pyproj.sync import _load_grid_geojson
41 from test.conftest import grids_available, proj_env, tmp_chdir
43 PYPROJ_CLI_ENDPONTS = pytest.mark.parametrize(
44 - "input_command", [["pyproj"], [sys.executable, "-m", "pyproj"]]
45 + "input_command", [[sys.executable, "-m", "pyproj"]]