Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyproj/, dev-python/pyproj/files/
Date: Fri, 23 Oct 2020 23:27:16
Message-Id: 1603495616.b4a9b0066dec41a195498410c1c907d15de441e7.asturm@gentoo
1 commit: b4a9b0066dec41a195498410c1c907d15de441e7
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 23 22:36:32 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 23 23:26:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a9b006
7
8 dev-python/pyproj: 2.6.1_p1 version bump, python3_9, tests pass
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.2
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 dev-python/pyproj/Manifest | 1 +
14 .../pyproj/files/pyproj-2.6.1_p1-tests.patch | 58 ++++++++++++++++++++++
15 dev-python/pyproj/pyproj-2.6.1_p1.ebuild | 52 +++++++++++++++++++
16 3 files changed, 111 insertions(+)
17
18 diff --git a/dev-python/pyproj/Manifest b/dev-python/pyproj/Manifest
19 index 294e1a01904..9ef79528f4d 100644
20 --- a/dev-python/pyproj/Manifest
21 +++ b/dev-python/pyproj/Manifest
22 @@ -1 +1,2 @@
23 DIST pyproj-2.4.2.tar.gz 463252 BLAKE2B aa80ee3052f42f0d49d02b1dfa3d1790e02fe6aa4092319ff8e827b0a341cff2cb4779891f74919c2b14781d841b3662154882b5f218a22b55ad79397f3eb4a7 SHA512 20f0a742ea5699a6d7a621e93157512478de69ba740bb7b0df46b6d5668f6db93b07e1fc0bf4d089362275ea8edddf3100a972a533ed8b6a0bc56a04a20d4ef9
24 +DIST pyproj-2.6.1.post1.tar.gz 545482 BLAKE2B ba87cbbe93dad357c1fc4f333c7d3f02b632e6f2a00821b3875e73965f36fd7ea958f24705c125c3ae43dc8edac1b53a20578c46bc55bcbf335a9457d193d493 SHA512 43a885dbbf4ba54839c3b697d2582700e2b30172ef34acf6297b5e4ddba9b3148aeab83b3a515f1ce975898828c77ad457b6f6460e91083189f66a2fde6d77b7
25
26 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
27 new file mode 100644
28 index 00000000000..69eb97ea2e0
29 --- /dev/null
30 +++ b/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch
31 @@ -0,0 +1,58 @@
32 +From 5856cdacef62746594e17f69cb802a202d3fdfaa Mon Sep 17 00:00:00 2001
33 +From: "Alan D. Snow" <alansnow21@×××××.com>
34 +Date: Fri, 29 May 2020 07:41:44 -0500
35 +Subject: TST: Update tests with scope & remarks (#649)
36 +
37 +---
38 + test/crs/test_crs.py | 16 +++++-----------
39 + test/test_transformer.py | 10 +++++-----
40 + 2 files changed, 10 insertions(+), 16 deletions(-)
41 +
42 +--- a/test/crs/test_crs.py
43 ++++ b/test/crs/test_crs.py
44 +@@ -1261,17 +1261,11 @@ def test_operations():
45 +
46 +
47 + def test_operations__scope_remarks():
48 +-
49 +- transformer = TransformerGroup(28356, 7856).transformers[0]
50 +- coord_op = CoordinateOperation.from_string(transformer.to_wkt())
51 +- assert coord_op.operations == transformer.operations
52 +- # scope does not transfer for some reason
53 +- # assert [op.scope for op in transformer.operations] == [
54 +- # op.scope for op in coord_op.operations
55 +- # ]
56 +- assert [op.remarks for op in transformer.operations] == [
57 +- op.remarks for op in coord_op.operations
58 +- ]
59 ++ operation = TransformerGroup(28356, 7856).transformers[0].operations[1]
60 ++ coord_op = CoordinateOperation.from_string(operation.to_wkt())
61 ++ assert coord_op == operation
62 ++ assert coord_op.remarks == operation.remarks
63 ++ assert coord_op.scope == operation.scope
64 +
65 +
66 + def test_crs_equals():
67 +--- a/test/test_transformer.py
68 ++++ b/test/test_transformer.py
69 +@@ -536,15 +536,15 @@ def test_transformer__operations__scope_
70 + transformer = TransformerGroup(28356, 7856).transformers[0]
71 + assert transformer.scope is None
72 + assert [op.scope for op in transformer.operations] == [
73 +- None,
74 ++ "Large and medium scale topographic mapping and engineering survey.",
75 + "Conformal transformation of GDA94 coordinates that have been derived through "
76 + "GNSS CORS.",
77 +- None,
78 ++ "Large and medium scale topographic mapping and engineering survey.",
79 + ]
80 +- assert [str(op.remarks)[:5] for op in transformer.operations] == [
81 +- "None",
82 ++ assert [str(op.remarks)[:5].strip() for op in transformer.operations] == [
83 ++ "Grid",
84 + "Scale",
85 +- "None",
86 ++ "Grid",
87 + ]
88 +
89 +
90
91 diff --git a/dev-python/pyproj/pyproj-2.6.1_p1.ebuild b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
92 new file mode 100644
93 index 00000000000..457c8d466c4
94 --- /dev/null
95 +++ b/dev-python/pyproj/pyproj-2.6.1_p1.ebuild
96 @@ -0,0 +1,52 @@
97 +# Copyright 1999-2020 Gentoo Authors
98 +# Distributed under the terms of the GNU General Public License v2
99 +
100 +EAPI=7
101 +
102 +PYTHON_COMPAT=( python3_{7,8,9} )
103 +inherit distutils-r1
104 +
105 +DESCRIPTION="Python interface to the PROJ library"
106 +HOMEPAGE="https://github.com/pyproj4/pyproj"
107 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P/_p/.post}.tar.gz"
108 +
109 +S="${WORKDIR}/${P/_p/.post}"
110 +
111 +LICENSE="MIT"
112 +SLOT="0"
113 +KEYWORDS="~amd64 ~x86 ~amd64-linux"
114 +IUSE="doc"
115 +
116 +RDEPEND=">=sci-libs/proj-6.2.0:="
117 +DEPEND="${RDEPEND}
118 + dev-python/cython[${PYTHON_USEDEP}]"
119 +BDEPEND="
120 + test? (
121 + dev-python/mock[${PYTHON_USEDEP}]
122 + dev-python/numpy[${PYTHON_USEDEP}]
123 + sci-libs/shapely[${PYTHON_USEDEP}]
124 + )"
125 +
126 +distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
127 +distutils_enable_tests pytest
128 +
129 +python_prepare_all() {
130 + if has_version ">=sci-libs/proj-7.1"; then
131 + eapply "${FILESDIR}"/${P}-tests.patch
132 + fi
133 + distutils-r1_python_prepare_all
134 +}
135 +
136 +distutils-r1_src_test() {
137 + # workaround circular import error
138 + # https://github.com/pyproj4/pyproj/issues/647
139 + mkdir ../mytest || die
140 + cp -r test ../mytest || die
141 + cd ../mytest || die
142 + _distutils-r1_run_foreach_impl python_test
143 + _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
144 +}
145 +
146 +python_test() {
147 + PROJ_LIB="${EPREFIX}/usr/share/proj" pytest -ra || die
148 +}