[gentoo-commits] repo/gentoo:master commit in: dev-python/pyproj/, dev-python/pyproj/files/

2022-10-25 Thread Sam James
commit: 22d015b931ec7580286f6f7bdf0e4beefaa29a48
Author: Sam James  gentoo  org>
AuthorDate: Tue Oct 25 20:11:44 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct 25 20:12:11 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d015b9

dev-python/pyproj: backport test fix for proj 9.1

Closes: https://bugs.gentoo.org/876562
Signed-off-by: Sam James  gentoo.org>

 .../pyproj/files/pyproj-3.4.0-proj-9.1.patch   | 54 ++
 dev-python/pyproj/pyproj-3.4.0.ebuild  |  4 ++
 2 files changed, 58 insertions(+)

diff --git a/dev-python/pyproj/files/pyproj-3.4.0-proj-9.1.patch 
b/dev-python/pyproj/files/pyproj-3.4.0-proj-9.1.patch
new file mode 100644
index ..a2be9f58850b
--- /dev/null
+++ b/dev-python/pyproj/files/pyproj-3.4.0-proj-9.1.patch
@@ -0,0 +1,54 @@
+https://github.com/pyproj4/pyproj/commit/831209477286f55b6c3ac777e1df3e947cfb12be
+https://github.com/pyproj4/pyproj/commit/2c0abe3d8d2c1632751f093baf421b93f65783a8
+
+From 831209477286f55b6c3ac777e1df3e947cfb12be Mon Sep 17 00:00:00 2001
+From: "Alan D. Snow" 
+Date: Sat, 17 Sep 2022 11:23:10 -0500
+Subject: [PATCH] TST: update test_get_transform_grid_list__contains expectd
+ output (#1147)
+
+--- a/test/test_sync.py
 b/test/test_sync.py
+@@ -82,7 +82,7 @@ def test_get_transform_grid_list__contains():
+ source_ids = set()
+ for grid in grids:
+ source_ids.add(grid["properties"]["source_id"])
+-assert sorted(source_ids) == ["no_kv", "nz_linz"]
++assert sorted(source_ids) == ["nz_linz"]
+ 
+ 
+ @pytest.mark.network
+
+From 2c0abe3d8d2c1632751f093baf421b93f65783a8 Mon Sep 17 00:00:00 2001
+From: "Alan D. Snow" 
+Date: Sat, 17 Sep 2022 12:06:32 -0500
+Subject: [PATCH] TST: adjust test_transformer_group__get_transform_crs for
+ nl_nsgi_nlgeo2018 and PROJ 9.1 (#1148)
+
+--- a/test/test_transformer.py
 b/test/test_transformer.py
+@@ -695,12 +695,19 @@ def get_transformer_group():
+ @pytest.mark.grid
+ def test_transformer_group__get_transform_crs():
+ tg = TransformerGroup("epsg:4258", "epsg:7415")
+-if not grids_available("nl_nsgi_rdtrans2018.tif"):
+-assert len(tg.transformers) == 1
+-elif PROJ_GTE_91:
++if grids_available(
++"nl_nsgi_nlgeo2018.tif", "nl_nsgi_rdtrans2018.tif", check_all=True
++):
++if PROJ_GTE_91:
++assert len(tg.transformers) == 2
++else:
++assert len(tg.transformers) == 6
++elif not PROJ_GTE_91 and grids_available("nl_nsgi_rdtrans2018.tif"):
+ assert len(tg.transformers) == 2
++elif not PROJ_GTE_91 and grids_available("nl_nsgi_nlgeo2018.tif"):
++assert len(tg.transformers) == 4
+ else:
+-assert len(tg.transformers) == 6
++assert len(tg.transformers) == 1
+ 
+ 
+ def test_transformer__area_of_interest():
+

diff --git a/dev-python/pyproj/pyproj-3.4.0.ebuild 
b/dev-python/pyproj/pyproj-3.4.0.ebuild
index aa7eb95785a6..70379b19b4dd 100644
--- a/dev-python/pyproj/pyproj-3.4.0.ebuild
+++ b/dev-python/pyproj/pyproj-3.4.0.ebuild
@@ -39,6 +39,10 @@ BDEPEND="
)
 "
 
+PATCHES=(
+   "${FILESDIR}"/${P}-proj-9.1.patch
+)
+
 distutils_enable_sphinx docs \
dev-python/furo
 distutils_enable_tests pytest



[gentoo-commits] repo/gentoo:master commit in: dev-python/pyproj/, dev-python/pyproj/files/

2021-04-26 Thread Michał Górny
commit: 2bd565f99a9b48c428fad438c5026062c3142141
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Apr 26 19:46:16 2021 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Apr 26 19:46:16 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bd565f9

dev-python/pyproj: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/pyproj/Manifest |  1 -
 .../pyproj/files/pyproj-2.6.1_p1-tests.patch   | 58 --
 dev-python/pyproj/pyproj-2.6.1_p1.ebuild   | 52 ---
 3 files changed, 111 deletions(-)

diff --git a/dev-python/pyproj/Manifest b/dev-python/pyproj/Manifest
index 46dcef39f4d..37f1b315049 100644
--- a/dev-python/pyproj/Manifest
+++ b/dev-python/pyproj/Manifest
@@ -1,2 +1 @@
-DIST pyproj-2.6.1.post1.tar.gz 545482 BLAKE2B 
ba87cbbe93dad357c1fc4f333c7d3f02b632e6f2a00821b3875e73965f36fd7ea958f24705c125c3ae43dc8edac1b53a20578c46bc55bcbf335a9457d193d493
 SHA512 
43a885dbbf4ba54839c3b697d2582700e2b30172ef34acf6297b5e4ddba9b3148aeab83b3a515f1ce975898828c77ad457b6f6460e91083189f66a2fde6d77b7
 DIST pyproj-3.0.1.tar.gz 168962 BLAKE2B 
3271d604148c122f4dfdd68c4237e1911f30da7cc858128d644b6b6807c3e49450e0b42c385d37bbe1cfa5ab80d635e7f620d41bf5089af6b49a542eb9b3fcd0
 SHA512 
f5ae0ede1deaa93757cb98cc680d6e47a19b9f5c0ce5e357c2ecfe96f764ff59ec7285c606162da38573123d21f12f1df82354f1d2205149970af2d7d63c2689

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
deleted file mode 100644
index 69eb97ea2e0..000
--- a/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 5856cdacef62746594e17f69cb802a202d3fdfaa Mon Sep 17 00:00:00 2001
-From: "Alan D. Snow" 
-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.6.1_p1.ebuild 
b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
deleted file mode 100644
index 059a009b741..000
--- a/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-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/_p/.post}.tar.gz"
-
-S="${WORKDIR}/${P/_p/.post}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 x86 ~amd64-linux"
-IUSE="doc"
-
-RDEPEND=">=sci-libs/proj-6.2.0:="
-DEPEND="${RDEPEND}
-   dev-python/cython[${PYTHON_USEDEP}]"
-BDEPEND="
-   test? (
-   dev-python/mock[${PYTHON_USEDEP}]
-   dev-python/numpy[${PYTHON_USEDEP}]
-   sci-libs/shapely[${PYTHON_USEDEP}]
-   )"
-
-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

[gentoo-commits] repo/gentoo:master commit in: dev-python/pyproj/, dev-python/pyproj/files/

2020-10-23 Thread Andreas Sturmlechner
commit: b4a9b0066dec41a195498410c1c907d15de441e7
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Oct 23 22:36:32 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Fri Oct 23 23:26:56 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a9b006

dev-python/pyproj: 2.6.1_p1 version bump, python3_9, tests pass

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 dev-python/pyproj/Manifest |  1 +
 .../pyproj/files/pyproj-2.6.1_p1-tests.patch   | 58 ++
 dev-python/pyproj/pyproj-2.6.1_p1.ebuild   | 52 +++
 3 files changed, 111 insertions(+)

diff --git a/dev-python/pyproj/Manifest b/dev-python/pyproj/Manifest
index 294e1a01904..9ef79528f4d 100644
--- a/dev-python/pyproj/Manifest
+++ b/dev-python/pyproj/Manifest
@@ -1 +1,2 @@
 DIST pyproj-2.4.2.tar.gz 463252 BLAKE2B 
aa80ee3052f42f0d49d02b1dfa3d1790e02fe6aa4092319ff8e827b0a341cff2cb4779891f74919c2b14781d841b3662154882b5f218a22b55ad79397f3eb4a7
 SHA512 
20f0a742ea5699a6d7a621e93157512478de69ba740bb7b0df46b6d5668f6db93b07e1fc0bf4d089362275ea8edddf3100a972a533ed8b6a0bc56a04a20d4ef9
+DIST pyproj-2.6.1.post1.tar.gz 545482 BLAKE2B 
ba87cbbe93dad357c1fc4f333c7d3f02b632e6f2a00821b3875e73965f36fd7ea958f24705c125c3ae43dc8edac1b53a20578c46bc55bcbf335a9457d193d493
 SHA512 
43a885dbbf4ba54839c3b697d2582700e2b30172ef34acf6297b5e4ddba9b3148aeab83b3a515f1ce975898828c77ad457b6f6460e91083189f66a2fde6d77b7

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 000..69eb97ea2e0
--- /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" 
+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.6.1_p1.ebuild 
b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
new file mode 100644
index 000..457c8d466c4
--- /dev/null
+++ b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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/_p/.post}.tar.gz"
+
+S="${WORKDIR}/${P/_p/.post}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="doc"
+
+RDEPEND=">=sci-libs/proj-6.2.0:="
+DEPEND="${RDEPEND}
+   dev-python/cython[${PYTHON_USEDEP}]"
+BDEPEND="
+   test? (
+   dev-python/mock[${PYTHON_USEDEP}]
+   dev-python/numpy[${PYTHON_USEDEP}]
+   sci-libs/shapely[${PYTHON_USEDEP}]
+   )"
+
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme

[gentoo-commits] repo/gentoo:master commit in: dev-python/pyproj/, dev-python/pyproj/files/

2019-12-08 Thread Andreas Sturmlechner
commit: a61a89529216483779dc0ea1b2fe99469921d8d6
Author: Chris Mayo  gmail  com>
AuthorDate: Sun Dec  8 15:16:07 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Dec  8 18:42:09 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a61a8952

dev-python/pyproj: bump to 2.4.2

Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Chris Mayo  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/13924
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 dev-python/pyproj/Manifest |  1 +
 .../pyproj/files/pyproj-2.4.2-conftest.patch   | 31 
 dev-python/pyproj/pyproj-2.4.2.ebuild  | 42 ++
 3 files changed, 74 insertions(+)

diff --git a/dev-python/pyproj/Manifest b/dev-python/pyproj/Manifest
index 02a19abffc9..9576fff47ba 100644
--- a/dev-python/pyproj/Manifest
+++ b/dev-python/pyproj/Manifest
@@ -1,2 +1,3 @@
 DIST pyproj-1.9.5.1.tar.gz 4424543 BLAKE2B 
cdf954ec0fe794f354b246fcd5afeac01b796f84cc2456efce3e289fcfb12074d7352c9fa7e9d74356199135dfa9814c07da9379f85771dbb7130b8b9b7ecc34
 SHA512 
b0e0f85be01a3399cb41c4bf29d1a63ecb519fd45d6092a3558060d93c715afafd12f7532c8665839225ad7243e739a117677f6747bf34a0ccbde5e75c85f324
 DIST pyproj-2.4.1.tar.gz 462332 BLAKE2B 
bd5f8f34bd1e4f928cbbba8736ede96425f1823171b1e4da0ecd6ccf9f105d4f5d4c9f953f353382412883c70803421b4d9a5175aba5cabcb689fafb19484a89
 SHA512 
c8bc987991b8136951f038f504cb6ffa5f69663b9ba447b586ab29d30e91b05661c46726132ac2cbfd756d92842606b1d5a5167b84c66878688e5ac4e5259353
+DIST pyproj-2.4.2.tar.gz 463252 BLAKE2B 
aa80ee3052f42f0d49d02b1dfa3d1790e02fe6aa4092319ff8e827b0a341cff2cb4779891f74919c2b14781d841b3662154882b5f218a22b55ad79397f3eb4a7
 SHA512 
20f0a742ea5699a6d7a621e93157512478de69ba740bb7b0df46b6d5668f6db93b07e1fc0bf4d089362275ea8edddf3100a972a533ed8b6a0bc56a04a20d4ef9

diff --git a/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch 
b/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch
new file mode 100644
index 000..36946527b2b
--- /dev/null
+++ b/dev-python/pyproj/files/pyproj-2.4.2-conftest.patch
@@ -0,0 +1,31 @@
+--- 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/pyproj-2.4.2.ebuild 
b/dev-python/pyproj/pyproj-2.4.2.ebuild
new file mode 100644
index 000..5e1362ac22f
--- /dev/null
+++ b/dev-python/pyproj/pyproj-2.4.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Python < 3.6 requires https://pypi.org/project/aenum/
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Python interface to the PROJ library"
+HOMEPAGE="https://github.com/jswhit/pyproj;
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="doc"
+
+RDEPEND=">=sci-libs/proj-6.2.0"
+DEPEND="${RDEPEND}
+   dev-python/cython[${PYTHON_USEDEP}]"
+BDEPEND="
+   test? (
+   dev-python/mock[${PYTHON_USEDEP}]
+   dev-python/numpy[${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() {
+   distutils-r1_python_prepare_all
+   append-cflags -fno-strict-aliasing
+}
+
+python_test() {
+   PROJ_LIB="${EPREFIX}/usr/share/proj" pytest -ra || die
+}