1 |
commit: ecb0dc0854f860d87e7ebd237d3c83ef8f815444 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 30 13:48:47 2014 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 30 13:48:47 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ecb0dc08 |
7 |
|
8 |
sci-chemistry/pymol: Make it really multi py ABI ready; use internal apbs plugin |
9 |
|
10 |
Package-Manager: portage-2.2.14 |
11 |
|
12 |
--- |
13 |
sci-chemistry/pymol/ChangeLog | 4 + |
14 |
sci-chemistry/pymol/files/pymol-9999-tk8.6.patch | 163 +++++++++++++++++++++++ |
15 |
sci-chemistry/pymol/pymol-9999.ebuild | 21 ++- |
16 |
3 files changed, 183 insertions(+), 5 deletions(-) |
17 |
|
18 |
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog |
19 |
index 67954f0..15af521 100644 |
20 |
--- a/sci-chemistry/pymol/ChangeLog |
21 |
+++ b/sci-chemistry/pymol/ChangeLog |
22 |
@@ -2,6 +2,10 @@ |
23 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
24 |
# $Header: $ |
25 |
|
26 |
+ 30 Oct 2014; Justin Lecher <jlec@g.o> pymol-9999.ebuild, |
27 |
+ +files/pymol-9999-tk8.6.patch: |
28 |
+ Make it really multi py ABI ready; use internal apbs plugin |
29 |
+ |
30 |
27 Oct 2014; Justin Lecher <jlec@g.o> pymol-9999.ebuild: |
31 |
Add missing PYTHON_USEDEP |
32 |
|
33 |
|
34 |
diff --git a/sci-chemistry/pymol/files/pymol-9999-tk8.6.patch b/sci-chemistry/pymol/files/pymol-9999-tk8.6.patch |
35 |
new file mode 100644 |
36 |
index 0000000..c4fa209 |
37 |
--- /dev/null |
38 |
+++ b/sci-chemistry/pymol/files/pymol-9999-tk8.6.patch |
39 |
@@ -0,0 +1,163 @@ |
40 |
+ pymol/modules/pmg_tk/startup/apbs_tools.py | 36 +++++++++++++++--------------- |
41 |
+ 1 file changed, 18 insertions(+), 18 deletions(-) |
42 |
+ |
43 |
+diff --git a/pymol/modules/pmg_tk/startup/apbs_tools.py b/pymol/modules/pmg_tk/startup/apbs_tools.py |
44 |
+index 9b76070..ad82df3 100644 |
45 |
+--- a/pymol/modules/pmg_tk/startup/apbs_tools.py |
46 |
++++ b/pymol/modules/pmg_tk/startup/apbs_tools.py |
47 |
+@@ -612,7 +612,7 @@ class APBSTools2: |
48 |
+ # Set up the Main page |
49 |
+ page = self.notebook.add('Main') |
50 |
+ group = Pmw.Group(page,tag_text='Main options') |
51 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
52 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
53 |
+ self.selection = Pmw.EntryField(group.interior(), |
54 |
+ labelpos='w', |
55 |
+ label_text='Selection to use: ', |
56 |
+@@ -658,7 +658,7 @@ class APBSTools2: |
57 |
+ page = self.notebook.add('Configuration') |
58 |
+ |
59 |
+ group = Pmw.Group(page,tag_text='Dielectric Constants') |
60 |
+- group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) |
61 |
++ group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
62 |
+ group.grid(column=0, row=0) |
63 |
+ self.interior_dielectric = Pmw.EntryField(group.interior(),labelpos='w', |
64 |
+ label_text = 'Protein Dielectric:', |
65 |
+@@ -677,7 +677,7 @@ class APBSTools2: |
66 |
+ #entry.pack(side='left',fill='both',expand=1,padx=4) # side-by-side |
67 |
+ entry.pack(fill='x',expand=1,padx=4,pady=1) # vertical |
68 |
+ group = Pmw.Group(page,tag_text='Other') |
69 |
+- group.pack(fill='both',expand=1, padx=4, pady=5) |
70 |
++ group.grid(padx=4, pady=5, sticky=(N, S, E, W)) |
71 |
+ group.grid(column=1, row=1,columnspan=4) |
72 |
+ self.max_mem_allowed = Pmw.EntryField(group.interior(),labelpos='w', |
73 |
+ label_text = 'Maximum Memory Allowed (MB):', |
74 |
+@@ -735,7 +735,7 @@ class APBSTools2: |
75 |
+ |
76 |
+ |
77 |
+ group = Pmw.Group(page,tag_text='Ions') |
78 |
+- group.pack(fill='both',expand=1, padx=4, pady=5) |
79 |
++ group.grid(padx=4, pady=5, sticky=(N, S, E, W)) |
80 |
+ group.grid(column=0, row=1, ) |
81 |
+ self.ion_plus_one_conc = Pmw.EntryField(group.interior(), |
82 |
+ labelpos='w', |
83 |
+@@ -794,7 +794,7 @@ class APBSTools2: |
84 |
+ entry.pack(fill='x',expand=1,padx=4) |
85 |
+ |
86 |
+ group = Pmw.Group(page,tag_text = 'Coarse Mesh Length') |
87 |
+- group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) |
88 |
++ group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
89 |
+ group.grid(column = 1, row = 0) |
90 |
+ for coord in 'x y z'.split(): |
91 |
+ setattr(self,'grid_coarse_%s'%coord,Pmw.EntryField(group.interior(), |
92 |
+@@ -809,7 +809,7 @@ class APBSTools2: |
93 |
+ |
94 |
+ |
95 |
+ group = Pmw.Group(page,tag_text = 'Fine Mesh Length') |
96 |
+- group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) |
97 |
++ group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
98 |
+ group.grid(column = 2, row = 0) |
99 |
+ for coord in 'x y z'.split(): |
100 |
+ setattr(self,'grid_fine_%s'%coord,Pmw.EntryField(group.interior(), |
101 |
+@@ -824,7 +824,7 @@ class APBSTools2: |
102 |
+ |
103 |
+ |
104 |
+ group = Pmw.Group(page,tag_text = 'Grid Center') |
105 |
+- group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) |
106 |
++ group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
107 |
+ group.grid(column = 3, row = 0) |
108 |
+ for coord in 'x y z'.split(): |
109 |
+ setattr(self,'grid_center_%s'%coord,Pmw.EntryField(group.interior(), |
110 |
+@@ -838,7 +838,7 @@ class APBSTools2: |
111 |
+ getattr(self,'grid_center_%s'%coord).pack(fill='x', expand=1, padx=4, pady=1) |
112 |
+ |
113 |
+ group = Pmw.Group(page,tag_text = 'Grid Points') |
114 |
+- group.pack(fill = 'both', expand = 1, padx = 4, pady = 5) |
115 |
++ group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
116 |
+ group.grid(column = 4, row = 0) |
117 |
+ for coord in 'x y z'.split(): |
118 |
+ setattr(self,'grid_points_%s'%coord,Pmw.EntryField(group.interior(), |
119 |
+@@ -856,7 +856,7 @@ class APBSTools2: |
120 |
+ page.grid_columnconfigure(5,weight=1) |
121 |
+ page = self.notebook.add('Program Locations') |
122 |
+ group = Pmw.Group(page,tag_text='Locations') |
123 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
124 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
125 |
+ def quickFileValidation(s): |
126 |
+ if s == '': return Pmw.PARTIAL |
127 |
+ elif os.path.isfile(s): return Pmw.OK |
128 |
+@@ -955,7 +955,7 @@ protein residues and AMBER charges. If wish that behavior, simply delete the "p |
129 |
+ |
130 |
+ page = self.notebook.add('Temp File Locations') |
131 |
+ group = Pmw.Group(page,tag_text='Locations') |
132 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
133 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
134 |
+ self.pymol_generated_pqr_filename = Pmw.EntryField(group.interior(), |
135 |
+ labelpos = 'w', |
136 |
+ label_pyclass = FileDialogButtonClassFactory.get(self.setPymolGeneratedPqrFilename), |
137 |
+@@ -1003,17 +1003,17 @@ by setting the environment variable TEMP. |
138 |
+ page = self.notebook.add('Visualization (1)') |
139 |
+ group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=1) |
140 |
+ self.visualization_group_1 = group |
141 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
142 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
143 |
+ |
144 |
+ page = self.notebook.add('Visualization (2)') |
145 |
+ group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=2) |
146 |
+ self.visualization_group_2 = group |
147 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
148 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
149 |
+ |
150 |
+ # Create a couple of other empty pages |
151 |
+ page = self.notebook.add('About') |
152 |
+ group = Pmw.Group(page, tag_text='About PyMOL APBS Tools') |
153 |
+- group.pack(fill = 'both', expand = 1, padx = 10, pady = 5) |
154 |
++ group.grid(padx = 10, pady = 5, sticky=(N, S, E, W)) |
155 |
+ text = """This plugin integrates PyMOL (http://PyMOL.org/) with APBS (http://www.poissonboltzmann.org/apbs/). |
156 |
+ |
157 |
+ Documentation may be found at |
158 |
+@@ -2271,7 +2271,7 @@ class VisualizationGroup(Pmw.Group): |
159 |
+ self.update_buttonbox = Pmw.ButtonBox(self.mm_group.interior(), padx=0) |
160 |
+ self.update_buttonbox.pack(side=LEFT) |
161 |
+ self.update_buttonbox.add('Update',command=self.refresh) |
162 |
+- self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) |
163 |
++ self.mm_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
164 |
+ |
165 |
+ self.ms_group = Pmw.Group(self.interior(),tag_text='Molecular Surface') |
166 |
+ self.ms_buttonbox = Pmw.ButtonBox(self.ms_group.interior(), padx=0) |
167 |
+@@ -2322,7 +2322,7 @@ class VisualizationGroup(Pmw.Group): |
168 |
+ bars = (self.mol_surf_low,self.mol_surf_middle,self.mol_surf_high) |
169 |
+ Pmw.alignlabels(bars) |
170 |
+ for bar in bars: bar.pack(side=LEFT) |
171 |
+- self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) |
172 |
++ self.ms_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
173 |
+ |
174 |
+ self.fl_group = Pmw.Group(self.interior(),tag_text='Field Lines') |
175 |
+ self.fl_buttonbox = Pmw.ButtonBox(self.fl_group.interior(), padx=0) |
176 |
+@@ -2337,7 +2337,7 @@ class VisualizationGroup(Pmw.Group): |
177 |
+ text = """Follows same coloring as surface.""", |
178 |
+ ) |
179 |
+ label.pack() |
180 |
+- self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP) |
181 |
++ self.fl_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
182 |
+ |
183 |
+ self.pi_group = Pmw.Group(self.interior(),tag_text='Positive Isosurface') |
184 |
+ self.pi_buttonbox = Pmw.ButtonBox(self.pi_group.interior(), padx=0) |
185 |
+@@ -2356,7 +2356,7 @@ class VisualizationGroup(Pmw.Group): |
186 |
+ entryfield_validate = {'validator' : 'real', 'min':0} |
187 |
+ ) |
188 |
+ self.pos_surf_val.pack(side=LEFT) |
189 |
+- self.pi_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) |
190 |
++ self.pi_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
191 |
+ |
192 |
+ self.ni_group = Pmw.Group(self.interior(),tag_text='Negative Isosurface') |
193 |
+ self.ni_buttonbox = Pmw.ButtonBox(self.ni_group.interior(), padx=0) |
194 |
+@@ -2375,7 +2375,7 @@ class VisualizationGroup(Pmw.Group): |
195 |
+ entryfield_validate = {'validator' : 'real', 'max':0} |
196 |
+ ) |
197 |
+ self.neg_surf_val.pack(side=LEFT) |
198 |
+- self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT) |
199 |
++ self.ni_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W)) |
200 |
+ |
201 |
+ |
202 |
+ |
203 |
|
204 |
diff --git a/sci-chemistry/pymol/pymol-9999.ebuild b/sci-chemistry/pymol/pymol-9999.ebuild |
205 |
index cd57153..957afd0 100644 |
206 |
--- a/sci-chemistry/pymol/pymol-9999.ebuild |
207 |
+++ b/sci-chemistry/pymol/pymol-9999.ebuild |
208 |
@@ -32,11 +32,13 @@ DEPEND=" |
209 |
apbs? ( |
210 |
sci-chemistry/apbs[${PYTHON_USEDEP}] |
211 |
sci-chemistry/pdb2pqr[${PYTHON_USEDEP}] |
212 |
- sci-chemistry/pymol-apbs-plugin[${PYTHON_USEDEP}] |
213 |
+ !sci-chemistry/pymol-apbs-plugin[${PYTHON_USEDEP}] |
214 |
) |
215 |
web? ( !dev-python/webpy[${PYTHON_USEDEP}] )" |
216 |
RDEPEND="${DEPEND}" |
217 |
|
218 |
+PATCHES=( "${FILESDIR}"/${P}-tk8.6.patch ) |
219 |
+ |
220 |
src_unpack() { |
221 |
unpack ${A} |
222 |
subversion_src_unpack |
223 |
@@ -49,8 +51,6 @@ python_prepare_all() { |
224 |
-e "/import/s:argparse:argparseX:g" \ |
225 |
-i setup.py || die |
226 |
|
227 |
- rm ./modules/pmg_tk/startup/apbs_tools.py || die |
228 |
- |
229 |
sed \ |
230 |
-e "s:/opt/local:${EPREFIX}/usr:g" \ |
231 |
-e '/ext_comp_args/s:\[.*\]:[]:g' \ |
232 |
@@ -66,17 +66,28 @@ src_prepare() { |
233 |
|
234 |
python_install() { |
235 |
distutils-r1_python_install --pymol-path="${EPREFIX}/usr/share/pymol" |
236 |
+ |
237 |
+ sed \ |
238 |
+ -e '1d' \ |
239 |
+ -e "/APBS_BINARY_LOCATION/s:None:\"${EPREFIX}/usr/bin/apbs\":g" \ |
240 |
+ -e "/APBS_PSIZE_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/src/\":g" \ |
241 |
+ -e "/APBS_PDB2PQR_LOCATION/s:None:\"$(python_get_sitedir)/pdb2pqr/\":g" \ |
242 |
+ -i "${D}/$(python_get_sitedir)"/pmg_tk/startup/apbs_tools.py || die |
243 |
} |
244 |
|
245 |
python_install_all() { |
246 |
distutils-r1_python_install_all |
247 |
|
248 |
- python_export python2_7 EPYTHON |
249 |
+ sed \ |
250 |
+ -e '1i#!/usr/bin/env python' \ |
251 |
+ "${D}/$(python_get_sitedir)"/pymol/__init__.py > "${T}"/${PN} || die |
252 |
+ |
253 |
+ python_foreach_impl python_doscript "${T}"/${PN} |
254 |
|
255 |
# These environment variables should not go in the wrapper script, or else |
256 |
# it will be impossible to use the PyMOL libraries from Python. |
257 |
cat >> "${T}"/20pymol <<- EOF |
258 |
- PYMOL_PATH="$(python_get_sitedir)/${PN}" |
259 |
+ PYMOL_PATH="${EPREFIX}/usr/share/pymol" |
260 |
PYMOL_DATA="${EPREFIX}/usr/share/pymol/data" |
261 |
PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts" |
262 |
EOF |