summaryrefslogtreecommitdiff
path: root/dev-python/pyproj
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/pyproj
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/pyproj')
-rw-r--r--dev-python/pyproj/Manifest6
-rw-r--r--dev-python/pyproj/files/pyproj-2.4.2-conftest.patch31
-rw-r--r--dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch58
-rw-r--r--dev-python/pyproj/pyproj-2.6.1_p1.ebuild (renamed from dev-python/pyproj/pyproj-2.4.2-r1.ebuild)29
4 files changed, 83 insertions, 41 deletions
diff --git a/dev-python/pyproj/Manifest b/dev-python/pyproj/Manifest
index e3e03425e6fa..e170f9da069a 100644
--- a/dev-python/pyproj/Manifest
+++ b/dev-python/pyproj/Manifest
@@ -1,4 +1,4 @@
-AUX pyproj-2.4.2-conftest.patch 803 BLAKE2B 60806213e22edaf3457046e46303c95544085d9a870692677a8ef06506a48c7f7f380f4932a5b33f1465a8a0298e15a02033ce9cd690d631bfef9687a60c06b5 SHA512 2d5222ae3a91f61994b9590b08ed513c73be0dbb39b612c1eef4ca4766bef4981b4db23be0fb1ced2a88c3de7b400f8ba5086d4fb8837ed2a43a6cb6c04899f3
-DIST pyproj-2.4.2.tar.gz 463252 BLAKE2B aa80ee3052f42f0d49d02b1dfa3d1790e02fe6aa4092319ff8e827b0a341cff2cb4779891f74919c2b14781d841b3662154882b5f218a22b55ad79397f3eb4a7 SHA512 20f0a742ea5699a6d7a621e93157512478de69ba740bb7b0df46b6d5668f6db93b07e1fc0bf4d089362275ea8edddf3100a972a533ed8b6a0bc56a04a20d4ef9
-EBUILD pyproj-2.4.2-r1.ebuild 878 BLAKE2B f464c48456fb227234c1162232afecc59ba1d8ce6bd6c2ad8f980f2c4eaa85eaa456f6f68721543ed7cb9697e3cb4f27ab27926a2f2c6fedd230722c1e2784af SHA512 58d21f6c4173e659384109426510daf8319351836663a193d6b6d6751fd11f7610cb565a7e90023be778ecf4e058a41c6250e554f50d73b8188f0535b5db219e
+AUX pyproj-2.6.1_p1-tests.patch 2132 BLAKE2B 6d516cddb5b5bab0778a68d12025726e37871f49d34d7136905ecc17120d8436d5ef8f5304f1ea5ed35d25468a0116b72db01f0c3c627e9c4338ec57b58e22b2 SHA512 3678c9ae5c0793d0c33f64ebf473dc051e49437db1cad35b21ec11861ef19c1164987eaf8fe11e7883ebd28d5a81e073550bba380c5282cee6e44fd54cb9b2ee
+DIST pyproj-2.6.1.post1.tar.gz 545482 BLAKE2B ba87cbbe93dad357c1fc4f333c7d3f02b632e6f2a00821b3875e73965f36fd7ea958f24705c125c3ae43dc8edac1b53a20578c46bc55bcbf335a9457d193d493 SHA512 43a885dbbf4ba54839c3b697d2582700e2b30172ef34acf6297b5e4ddba9b3148aeab83b3a515f1ce975898828c77ad457b6f6460e91083189f66a2fde6d77b7
+EBUILD pyproj-2.6.1_p1.ebuild 1252 BLAKE2B 7592e15a884fc7da5d2e49908f7aaec16b2e649a1346b86ebaf905cabcb7187120491ee2f70fff0a0574783516398972a8b0e5f148a74ba8f1d535e93e5de3cc SHA512 231cdc338240645051c972740a7424d145a51732d9556051004bc429685a7a5d8444642e320d510f7c406c0e4b5529db6ab31073b6a0aa5fb2ea750ad663b80d
MISC metadata.xml 414 BLAKE2B 37b554706874ecf474f6fde6c09e4d7e466f2a22527e2851d3766518d0044dbbd2211f291851564541394a4d8f7d37f8216ae1c50cab8f662d3335d58c1ea142 SHA512 c117112962969a1cee0a9c3c7ec86942bfca1ef3eb9859b079ebdac743b691a954d7dc55ec729e141336c253abff8e0c7fcf1625279990cb87da87d732efe881
diff --git a/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch b/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch
deleted file mode 100644
index 36946527b2b2..000000000000
--- a/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/test/conftest.py
-+++ b/test/conftest.py
-@@ -0,0 +1,28 @@
-+import os
-+import shutil
-+import tempfile
-+
-+import pytest
-+
-+import pyproj
-+
-+
-+@pytest.fixture(scope="session")
-+def aoi_data_directory():
-+ """
-+ This is to ensure that the ntv2_0.gsb file is actually
-+ missing for the AOI tests.
-+ """
-+ data_dir = pyproj.datadir.get_data_dir()
-+ with tempfile.TemporaryDirectory() as tmpdir:
-+ tmp_data_dir = os.path.join(tmpdir, "proj")
-+ shutil.copytree(data_dir, tmp_data_dir)
-+ try:
-+ os.remove(os.path.join(str(tmp_data_dir), "ntv2_0.gsb"))
-+ except OSError:
-+ pass
-+ try:
-+ pyproj.datadir.set_data_dir(str(tmp_data_dir))
-+ yield
-+ finally:
-+ pyproj.datadir.set_data_dir(data_dir)
diff --git a/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch b/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch
new file mode 100644
index 000000000000..69eb97ea2e04
--- /dev/null
+++ b/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch
@@ -0,0 +1,58 @@
+From 5856cdacef62746594e17f69cb802a202d3fdfaa Mon Sep 17 00:00:00 2001
+From: "Alan D. Snow" <alansnow21@gmail.com>
+Date: Fri, 29 May 2020 07:41:44 -0500
+Subject: TST: Update tests with scope & remarks (#649)
+
+---
+ test/crs/test_crs.py | 16 +++++-----------
+ test/test_transformer.py | 10 +++++-----
+ 2 files changed, 10 insertions(+), 16 deletions(-)
+
+--- a/test/crs/test_crs.py
++++ b/test/crs/test_crs.py
+@@ -1261,17 +1261,11 @@ def test_operations():
+
+
+ def test_operations__scope_remarks():
+-
+- transformer = TransformerGroup(28356, 7856).transformers[0]
+- coord_op = CoordinateOperation.from_string(transformer.to_wkt())
+- assert coord_op.operations == transformer.operations
+- # scope does not transfer for some reason
+- # assert [op.scope for op in transformer.operations] == [
+- # op.scope for op in coord_op.operations
+- # ]
+- assert [op.remarks for op in transformer.operations] == [
+- op.remarks for op in coord_op.operations
+- ]
++ operation = TransformerGroup(28356, 7856).transformers[0].operations[1]
++ coord_op = CoordinateOperation.from_string(operation.to_wkt())
++ assert coord_op == operation
++ assert coord_op.remarks == operation.remarks
++ assert coord_op.scope == operation.scope
+
+
+ def test_crs_equals():
+--- a/test/test_transformer.py
++++ b/test/test_transformer.py
+@@ -536,15 +536,15 @@ def test_transformer__operations__scope_
+ transformer = TransformerGroup(28356, 7856).transformers[0]
+ assert transformer.scope is None
+ assert [op.scope for op in transformer.operations] == [
+- None,
++ "Large and medium scale topographic mapping and engineering survey.",
+ "Conformal transformation of GDA94 coordinates that have been derived through "
+ "GNSS CORS.",
+- None,
++ "Large and medium scale topographic mapping and engineering survey.",
+ ]
+- assert [str(op.remarks)[:5] for op in transformer.operations] == [
+- "None",
++ assert [str(op.remarks)[:5].strip() for op in transformer.operations] == [
++ "Grid",
+ "Scale",
+- "None",
++ "Grid",
+ ]
+
+
diff --git a/dev-python/pyproj/pyproj-2.4.2-r1.ebuild b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
index 2a90bfb128a2..059a009b7417 100644
--- a/dev-python/pyproj/pyproj-2.4.2-r1.ebuild
+++ b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
@@ -3,14 +3,14 @@
EAPI=7
-# Python < 3.6 requires https://pypi.org/project/aenum/
-PYTHON_COMPAT=( python3_{6,7,8} )
-
+PYTHON_COMPAT=( python3_{7,8,9} )
inherit distutils-r1
DESCRIPTION="Python interface to the PROJ library"
HOMEPAGE="https://github.com/pyproj4/pyproj"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P/_p/.post}.tar.gz"
+
+S="${WORKDIR}/${P/_p/.post}"
LICENSE="MIT"
SLOT="0"
@@ -24,14 +24,29 @@ BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
- sci-libs/Shapely[${PYTHON_USEDEP}]
+ sci-libs/shapely[${PYTHON_USEDEP}]
)"
-PATCHES=( "${FILESDIR}"/${P}-conftest.patch )
-
distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
distutils_enable_tests pytest
+python_prepare_all() {
+ if has_version ">=sci-libs/proj-7.1"; then
+ eapply "${FILESDIR}"/${P}-tests.patch
+ fi
+ distutils-r1_python_prepare_all
+}
+
+distutils-r1_src_test() {
+ # workaround circular import error
+ # https://github.com/pyproj4/pyproj/issues/647
+ mkdir ../mytest || die
+ cp -r test ../mytest || die
+ cd ../mytest || die
+ _distutils-r1_run_foreach_impl python_test
+ _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
+}
+
python_test() {
PROJ_LIB="${EPREFIX}/usr/share/proj" pytest -ra || die
}