1 |
commit: 36e7361b0799a35518fbab4d5ba778f9a4ebf951 |
2 |
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 3 17:02:09 2023 +0000 |
4 |
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 3 17:03:59 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36e7361b |
7 |
|
8 |
sci-visualization/pythonprop: add 0.30.1 |
9 |
|
10 |
Fix remote-id, drop notworking color scheme |
11 |
|
12 |
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org> |
13 |
|
14 |
sci-visualization/pythonprop/Manifest | 1 + |
15 |
.../files/pythonprop-drop-portland.patch | 87 ++++++++++++++++++++++ |
16 |
sci-visualization/pythonprop/metadata.xml | 2 +- |
17 |
.../pythonprop/pythonprop-0.30.1.ebuild | 55 ++++++++++++++ |
18 |
4 files changed, 144 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/sci-visualization/pythonprop/Manifest b/sci-visualization/pythonprop/Manifest |
21 |
index 8f7709d8717c..71b0cf318210 100644 |
22 |
--- a/sci-visualization/pythonprop/Manifest |
23 |
+++ b/sci-visualization/pythonprop/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
+DIST pythonprop-0.30.1.tar.gz 1141620 BLAKE2B 54554d1a50976aa0516e70ef6cabf8c8c8fe41dc15980d0d06defca2dbf722baa4e98dddb974ea0d6da18e3d634661c980685b89411e8de4cf1cded452bb60a1 SHA512 582442e95732c78b580eceaf8b9d4922a23e5b3c5652738b110a40e1b94f91196755fad6e00370328130acc608121961d4e449199610137a757b086b53184b43 |
26 |
DIST pythonprop-0.30.tar.gz 1141872 BLAKE2B 0703358221825bbeffb47cd5ff97a8de4c22ed9922347b96e359c7fbeffd6bae681a81d4938c03f4199ce583821d6e1006ce2e12aa718f50b5de69f2c0476a38 SHA512 421cade49a241d0dd38afa92e2c1874e2e6a0837ac7aeb9f4a294a2cec23e80e446e88a4de202de445cde73b9d816f4d6e487536be8c02017f1754c116fba310 |
27 |
|
28 |
diff --git a/sci-visualization/pythonprop/files/pythonprop-drop-portland.patch b/sci-visualization/pythonprop/files/pythonprop-drop-portland.patch |
29 |
new file mode 100644 |
30 |
index 000000000000..5a6736b4624b |
31 |
--- /dev/null |
32 |
+++ b/sci-visualization/pythonprop/files/pythonprop-drop-portland.patch |
33 |
@@ -0,0 +1,87 @@ |
34 |
+# Drop 'portland' colormap creation. It is done more than once and actual |
35 |
+# matplotlib do not like redefinitions. |
36 |
+diff --git a/src/pythonprop/voaAreaPlot.py b/src/pythonprop/voaAreaPlot.py |
37 |
+index a0bd789..a3bdd48 100644 |
38 |
+--- a/src/pythonprop/voaAreaPlot.py |
39 |
++++ b/src/pythonprop/voaAreaPlot.py |
40 |
+@@ -94,7 +94,7 @@ class VOAAreaPlot: |
41 |
+ vg_files = [1], |
42 |
+ data_type = 1, |
43 |
+ time_zone = 0, |
44 |
+- color_map = 'portland', |
45 |
++ color_map = 'jet', |
46 |
+ face_colour = "white", |
47 |
+ filled_contours = False, |
48 |
+ plot_contours = False, |
49 |
+@@ -145,8 +145,6 @@ class VOAAreaPlot: |
50 |
+ # print "-180 < Latitude < 180.0, -90 < Longitude < 90" |
51 |
+ # sys.exit(1) |
52 |
+ |
53 |
+- portland = ListedColormap(["#0C3383", "#0b599b","#0a7fb4","#57a18f","#bec255","#f2c438","#f2a638","#ef8235","#e4502a","#d91e1e"]) |
54 |
+- plt.register_cmap(name='portland', cmap=portland) |
55 |
+ colMap = color_map |
56 |
+ |
57 |
+ projection = ccrs.PlateCarree() |
58 |
+@@ -498,8 +496,8 @@ def main(in_file, datadir=None): |
59 |
+ dest = "color_map", |
60 |
+ default = 'jet', |
61 |
+ choices = [ 'autumn', 'bone', 'cool', 'copper', 'gray', \ |
62 |
+- 'hot', 'hsv', 'jet', 'pink', 'spring','summer', 'winter', 'portland' ], |
63 |
+- help=_("COLOURMAP - may be one of 'autumn', 'bone', 'cool', 'copper', 'gray', 'hot', 'hsv', 'jet', 'pink', 'spring', 'summer', 'winter' or 'portland'. Default = 'jet'")) |
64 |
++ 'hot', 'hsv', 'jet', 'pink', 'spring','summer', 'winter' ], |
65 |
++ help=_("COLOURMAP - may be one of 'autumn', 'bone', 'cool', 'copper', 'gray', 'hot', 'hsv', 'jet', 'pink', 'spring', 'summer' or 'winter'. Default = 'jet'")) |
66 |
+ """ |
67 |
+ parser.add_argument("-n", "--interest", |
68 |
+ dest = "poi_file", |
69 |
+diff --git a/src/pythonprop/voaAreaPlotgui.py b/src/pythonprop/voaAreaPlotgui.py |
70 |
+index c001397..9f75acc 100644 |
71 |
+--- a/src/pythonprop/voaAreaPlotgui.py |
72 |
++++ b/src/pythonprop/voaAreaPlotgui.py |
73 |
+@@ -84,8 +84,7 @@ class VOAAreaPlotGUI: |
74 |
+ 'pink': _('pink'), |
75 |
+ 'spring': _('spring'), |
76 |
+ 'summer': _('summer'), |
77 |
+- 'winter': _('winter'), |
78 |
+- 'portland': _('portland')} |
79 |
++ 'winter': _('winter')} |
80 |
+ |
81 |
+ def __init__(self, |
82 |
+ data_source_filename, |
83 |
+diff --git a/src/pythonprop/voaP2PPlot.py b/src/pythonprop/voaP2PPlot.py |
84 |
+index faf87e6..61fe9b9 100644 |
85 |
+--- a/src/pythonprop/voaP2PPlot.py |
86 |
++++ b/src/pythonprop/voaP2PPlot.py |
87 |
+@@ -136,8 +136,6 @@ class VOAP2PPlot: |
88 |
+ |
89 |
+ self.image_defs = self.IMG_TYPE_DICT[self.data_type] |
90 |
+ self.user_bands = user_bands |
91 |
+- portland = ListedColormap(["#0C3383", "#0b599b","#0a7fb4","#57a18f","#bec255","#f2c438","#f2a638","#ef8235","#e4502a","#d91e1e"]) |
92 |
+- matplotlib.cm.register_cmap(name='portland', cmap=portland) |
93 |
+ |
94 |
+ if plot_groups[0]=='a': |
95 |
+ num_grp = self.df.get_number_of_groups() |
96 |
+@@ -375,8 +373,8 @@ def main(data_file, datadir=None): |
97 |
+ dest="color_map", |
98 |
+ default='jet', |
99 |
+ choices = [ 'autumn', 'bone', 'cool', 'copper', 'gray', \ |
100 |
+- 'hot', 'hsv', 'jet', 'pink', 'spring','summer', 'winter', 'portland' ], |
101 |
+- help=_("COLOURMAP - may be one of 'autumn', 'bone', 'cool', 'copper', 'gray', 'hot', 'hsv', 'jet', 'pink', 'spring', 'summer', 'winter' or 'portland'. Default = 'jet'")) |
102 |
++ 'hot', 'hsv', 'jet', 'pink', 'spring','summer', 'winter' ], |
103 |
++ help=_("COLOURMAP - may be one of 'autumn', 'bone', 'cool', 'copper', 'gray', 'hot', 'hsv', 'jet', 'pink', 'spring', 'summer' or 'winter'. Default = 'jet'")) |
104 |
+ |
105 |
+ parser.add_argument("-o", "--outfile", |
106 |
+ dest="save_file", |
107 |
+diff --git a/src/pythonprop/voaP2PPlotgui.py b/src/pythonprop/voaP2PPlotgui.py |
108 |
+index e1c120b..0aca557 100644 |
109 |
+--- a/src/pythonprop/voaP2PPlotgui.py |
110 |
++++ b/src/pythonprop/voaP2PPlotgui.py |
111 |
+@@ -83,8 +83,7 @@ class VOAP2PPlotGUI: |
112 |
+ 'pink': _('pink'), |
113 |
+ 'spring': _('spring'), |
114 |
+ 'summer': _('summer'), |
115 |
+- 'winter': _('winter'), |
116 |
+- 'portland': _('portland')} |
117 |
++ 'winter': _('winter')} |
118 |
+ |
119 |
+ |
120 |
+ def __init__(self, data_source_filename, parent = None, datadir=""): |
121 |
|
122 |
diff --git a/sci-visualization/pythonprop/metadata.xml b/sci-visualization/pythonprop/metadata.xml |
123 |
index 27c9a899306a..fbf434b3fa36 100644 |
124 |
--- a/sci-visualization/pythonprop/metadata.xml |
125 |
+++ b/sci-visualization/pythonprop/metadata.xml |
126 |
@@ -10,6 +10,6 @@ |
127 |
<name>Gentoo Electronics Project</name> |
128 |
</maintainer> |
129 |
<upstream> |
130 |
- <remote-id type="sourceforge">pythonprop</remote-id> |
131 |
+ <remote-id type="github">jawatson/pythonprop</remote-id> |
132 |
</upstream> |
133 |
</pkgmetadata> |
134 |
|
135 |
diff --git a/sci-visualization/pythonprop/pythonprop-0.30.1.ebuild b/sci-visualization/pythonprop/pythonprop-0.30.1.ebuild |
136 |
new file mode 100644 |
137 |
index 000000000000..55899af5d1bf |
138 |
--- /dev/null |
139 |
+++ b/sci-visualization/pythonprop/pythonprop-0.30.1.ebuild |
140 |
@@ -0,0 +1,55 @@ |
141 |
+# Copyright 1999-2023 Gentoo Authors |
142 |
+# Distributed under the terms of the GNU General Public License v2 |
143 |
+ |
144 |
+EAPI=7 |
145 |
+ |
146 |
+PYTHON_COMPAT=( python3_{8..10} ) |
147 |
+ |
148 |
+inherit autotools python-single-r1 |
149 |
+ |
150 |
+DESCRIPTION="Scripts to prepare and plot VOACAP propagation predictions" |
151 |
+HOMEPAGE="https://www.qsl.net/h/hz1jw/pythonprop" |
152 |
+SRC_URI="https://github.com/jawatson/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
153 |
+ |
154 |
+LICENSE="GPL-3" |
155 |
+SLOT="0" |
156 |
+KEYWORDS="~amd64 ~x86" |
157 |
+IUSE="" |
158 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
159 |
+ |
160 |
+RDEPEND=" |
161 |
+ ${PYTHON_DEPS} |
162 |
+ $(python_gen_cond_dep ' |
163 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
164 |
+ dev-python/matplotlib[${PYTHON_USEDEP}] |
165 |
+ dev-python/scipy[${PYTHON_USEDEP}] |
166 |
+ ') |
167 |
+ dev-python/cairocffi |
168 |
+ sci-libs/cartopy[${PYTHON_SINGLE_USEDEP}] |
169 |
+ sci-electronics/voacapl |
170 |
+" |
171 |
+DEPEND="${RDEPEND} |
172 |
+ app-text/yelp-tools |
173 |
+ app-text/rarian |
174 |
+" |
175 |
+ |
176 |
+PATCHES=( "${FILESDIR}/${PN}-drop-portland.patch" ) |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ eapply_user |
180 |
+ |
181 |
+ eapply ${PATCHES[@]} |
182 |
+ |
183 |
+ # drop building *.pdf files |
184 |
+ sed -i -e "s#docs/user/help##g" Makefile.am || die |
185 |
+ # do not call update_destop_database here |
186 |
+ sed -ie "s/UPDATE_DESKTOP = /UPDATE_DESKTOP = # /g" data/Makefile.am || die |
187 |
+ # fix Desktop Entry |
188 |
+ sed -ie "s/HamRadio/HamRadio;/g" data/voacapgui.desktop.in || die |
189 |
+ eautoreconf |
190 |
+} |
191 |
+ |
192 |
+src_install() { |
193 |
+ default |
194 |
+ python_optimize |
195 |
+} |