1 |
commit: a8112b5df7c771bf1173912447574b7ae814547f |
2 |
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 26 10:35:19 2015 +0000 |
4 |
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 26 10:35:19 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=a8112b5d |
7 |
|
8 |
dev-python/spyder: add version bump which fixes ipython-4 incomp. |
9 |
|
10 |
dev-python/spyder/Manifest | 1 + |
11 |
dev-python/spyder/files/spyder-2.3.1-build.patch | 154 +++++++++++++++++++++++ |
12 |
dev-python/spyder/metadata.xml | 30 +++++ |
13 |
dev-python/spyder/spyder-2.3.7.ebuild | 51 ++++++++ |
14 |
4 files changed, 236 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/spyder/Manifest b/dev-python/spyder/Manifest |
17 |
new file mode 100644 |
18 |
index 0000000..d1bf7b5 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/spyder/Manifest |
21 |
@@ -0,0 +1 @@ |
22 |
+DIST spyder-2.3.7.zip 3043384 SHA256 1009f01171a4a5b268594128420a8aed38448c684c3b5b84f6c4e874d9db8f7b SHA512 6e118eeb13103e0d0a871effed9c05b0265161a3979930b9aaa9de0e2ee82ec6e4710c8664fec19231ef992fd21629be538fc79d3e0f019a8b2248044a29383b WHIRLPOOL 64cdd7d73eb2ad9a869332e772534e0b0ee8c6a4ab0d8ff6de3525dac521a8c351277d89754633c6db6d737871d7c5abfed5aa3bb8ef70a2017fc85b9627604e |
23 |
|
24 |
diff --git a/dev-python/spyder/files/spyder-2.3.1-build.patch b/dev-python/spyder/files/spyder-2.3.1-build.patch |
25 |
new file mode 100644 |
26 |
index 0000000..4300c30 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/spyder/files/spyder-2.3.1-build.patch |
29 |
@@ -0,0 +1,154 @@ |
30 |
+--- setup.py |
31 |
++++ setup.py |
32 |
+@@ -21,8 +21,6 @@ |
33 |
+ import shutil |
34 |
+ |
35 |
+ from distutils.core import setup |
36 |
+-from distutils.command.build import build |
37 |
+-from distutils.command.install_data import install_data |
38 |
+ |
39 |
+ # Check for Python 3 |
40 |
+ PY3 = sys.version_info[0] == 3 |
41 |
+@@ -66,12 +64,7 @@ |
42 |
+ def get_data_files(): |
43 |
+ """Return data_files in a platform dependent manner""" |
44 |
+ if sys.platform.startswith('linux'): |
45 |
+- if PY3: |
46 |
+- data_files = [('share/applications', ['scripts/spyder3.desktop']), |
47 |
+- ('share/pixmaps', ['img_src/spyder3.png'])] |
48 |
+- else: |
49 |
+- data_files = [('share/applications', ['scripts/spyder.desktop']), |
50 |
+- ('share/pixmaps', ['img_src/spyder.png'])] |
51 |
++ data_files = [('share/pixmaps', ['img_src/spyder.png'])] |
52 |
+ elif os.name == 'nt': |
53 |
+ data_files = [('scripts', ['img_src/spyder.ico', |
54 |
+ 'img_src/spyder_light.ico'])] |
55 |
+@@ -80,97 +73,6 @@ |
56 |
+ return data_files |
57 |
+ |
58 |
+ |
59 |
+-class MyInstallData(install_data): |
60 |
+- def run(self): |
61 |
+- install_data.run(self) |
62 |
+- if sys.platform.startswith('linux'): |
63 |
+- try: |
64 |
+- subprocess.call(['update-desktop-database']) |
65 |
+- except: |
66 |
+- print("ERROR: unable to update desktop database", |
67 |
+- file=sys.stderr) |
68 |
+-CMDCLASS = {'install_data': MyInstallData} |
69 |
+- |
70 |
+- |
71 |
+-# Sphinx build (documentation) |
72 |
+-def get_html_help_exe(): |
73 |
+- """Return HTML Help Workshop executable path (Windows only)""" |
74 |
+- if os.name == 'nt': |
75 |
+- hhc_base = r'C:\Program Files%s\HTML Help Workshop\hhc.exe' |
76 |
+- for hhc_exe in (hhc_base % '', hhc_base % ' (x86)'): |
77 |
+- if osp.isfile(hhc_exe): |
78 |
+- return hhc_exe |
79 |
+- else: |
80 |
+- return |
81 |
+- |
82 |
+-try: |
83 |
+- from sphinx import setup_command |
84 |
+- |
85 |
+- class MyBuild(build): |
86 |
+- user_options = [('no-doc', None, "Don't build Spyder documentation")] \ |
87 |
+- + build.user_options |
88 |
+- def __init__(self, *args, **kwargs): |
89 |
+- build.__init__(self, *args, **kwargs) |
90 |
+- self.no_doc = False |
91 |
+- def with_doc(self): |
92 |
+- setup_dir = os.path.dirname(os.path.abspath(__file__)) |
93 |
+- is_doc_dir = os.path.isdir(os.path.join(setup_dir, 'doc')) |
94 |
+- install_obj = self.distribution.get_command_obj('install') |
95 |
+- return (is_doc_dir and not self.no_doc and not install_obj.no_doc) |
96 |
+- sub_commands = build.sub_commands + [('build_doc', with_doc)] |
97 |
+- CMDCLASS['build'] = MyBuild |
98 |
+- |
99 |
+- |
100 |
+- class MyInstall(install): |
101 |
+- user_options = [('no-doc', None, "Don't build Spyder documentation")] \ |
102 |
+- + install.user_options |
103 |
+- def __init__(self, *args, **kwargs): |
104 |
+- install.__init__(self, *args, **kwargs) |
105 |
+- self.no_doc = False |
106 |
+- CMDCLASS['install'] = MyInstall |
107 |
+- |
108 |
+- |
109 |
+- class MyBuildDoc(setup_command.BuildDoc): |
110 |
+- def run(self): |
111 |
+- build = self.get_finalized_command('build') |
112 |
+- sys.path.insert(0, os.path.abspath(build.build_lib)) |
113 |
+- dirname = self.distribution.get_command_obj('build').build_purelib |
114 |
+- self.builder_target_dir = osp.join(dirname, 'spyderlib', 'doc') |
115 |
+- |
116 |
+- if not osp.exists(self.builder_target_dir): |
117 |
+- os.mkdir(self.builder_target_dir) |
118 |
+- |
119 |
+- hhc_exe = get_html_help_exe() |
120 |
+- self.builder = "html" if hhc_exe is None else "htmlhelp" |
121 |
+- |
122 |
+- try: |
123 |
+- setup_command.BuildDoc.run(self) |
124 |
+- except UnicodeDecodeError: |
125 |
+- print("ERROR: unable to build documentation because Sphinx "\ |
126 |
+- "do not handle source path with non-ASCII characters. "\ |
127 |
+- "Please try to move the source package to another "\ |
128 |
+- "location (path with *only* ASCII characters).", |
129 |
+- file=sys.stderr) |
130 |
+- sys.path.pop(0) |
131 |
+- |
132 |
+- # Building chm doc, if HTML Help Workshop is installed |
133 |
+- if hhc_exe is not None: |
134 |
+- fname = osp.join(self.builder_target_dir, 'Spyderdoc.chm') |
135 |
+- subprocess.call('"%s" %s' % (hhc_exe, fname), shell=True) |
136 |
+- if osp.isfile(fname): |
137 |
+- dest = osp.join(dirname, 'spyderlib') |
138 |
+- try: |
139 |
+- shutil.move(fname, dest) |
140 |
+- except shutil.Error: |
141 |
+- print("Unable to replace %s" % dest) |
142 |
+- shutil.rmtree(self.builder_target_dir) |
143 |
+- |
144 |
+- CMDCLASS['build_doc'] = MyBuildDoc |
145 |
+-except ImportError: |
146 |
+- print('WARNING: unable to build documentation because Sphinx '\ |
147 |
+- 'is not installed', file=sys.stderr) |
148 |
+- |
149 |
+- |
150 |
+ NAME = 'spyder' |
151 |
+ LIBNAME = 'spyderlib' |
152 |
+ from spyderlib import __version__, __project_url__ |
153 |
+@@ -204,13 +106,7 @@ |
154 |
+ packages = get_subpackages(LIBNAME)+get_subpackages('spyderplugins') |
155 |
+ return packages |
156 |
+ |
157 |
+-# NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows |
158 |
+-# platforms due to a bug in pip installation process (see Issue 1158) |
159 |
+-SCRIPTS = ['%s_win_post_install.py' % NAME] |
160 |
+-if PY3 and sys.platform.startswith('linux'): |
161 |
+- SCRIPTS.append('spyder3') |
162 |
+-else: |
163 |
+- SCRIPTS.append('spyder') |
164 |
++SCRIPTS = ['spyder'] |
165 |
+ EXTLIST = ['.mo', '.svg', '.png', '.css', '.html', '.js', '.chm', '.ini', |
166 |
+ '.txt', '.rst'] |
167 |
+ if os.name == 'nt': |
168 |
+@@ -246,7 +142,7 @@ |
169 |
+ package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST), |
170 |
+ 'spyderplugins': |
171 |
+ get_package_data('spyderplugins', EXTLIST)}, |
172 |
+- requires=["rope (>=0.9.2)", "sphinx (>=0.6.0)", "PyQt4 (>=4.4)"], |
173 |
++ requires=["rope (>=0.9.2)", "PyQt4 (>=4.4)"], |
174 |
+ scripts=[osp.join('scripts', fname) for fname in SCRIPTS], |
175 |
+ data_files=get_data_files(), |
176 |
+ options={"bdist_wininst": |
177 |
+@@ -267,5 +163,4 @@ |
178 |
+ 'Programming Language :: Python :: 3', |
179 |
+ 'Development Status :: 5 - Production/Stable', |
180 |
+ 'Topic :: Scientific/Engineering', |
181 |
+- 'Topic :: Software Development :: Widget Sets'], |
182 |
+- cmdclass=CMDCLASS) |
183 |
++ 'Topic :: Software Development :: Widget Sets']) |
184 |
|
185 |
diff --git a/dev-python/spyder/metadata.xml b/dev-python/spyder/metadata.xml |
186 |
new file mode 100644 |
187 |
index 0000000..c4364ce |
188 |
--- /dev/null |
189 |
+++ b/dev-python/spyder/metadata.xml |
190 |
@@ -0,0 +1,30 @@ |
191 |
+<?xml version="1.0" encoding="UTF-8"?> |
192 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
193 |
+<pkgmetadata> |
194 |
+ <herd>python</herd> |
195 |
+ <maintainer> |
196 |
+ <email>grozin@g.o</email> |
197 |
+ <name>Andrey Grozin</name> |
198 |
+ </maintainer> |
199 |
+ <longdescription lang="en"> |
200 |
+ Spyder development environment and its PyQt4-based IDE tools: |
201 |
+ interactive Python shell, Python code editor, workspace |
202 |
+ (dict/list/string/array editor), doc viewer, history log, |
203 |
+ environment variables editor, ... |
204 |
+</longdescription> |
205 |
+ <use> |
206 |
+ <flag name="ipython">Add support for <pkg>dev-python/ipython</pkg></flag> |
207 |
+ <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag> |
208 |
+ <flag name="numpy">Add support for <pkg>dev-python/numpy</pkg></flag> |
209 |
+ <flag name="pep8">Add support for <pkg>dev-python/pep8</pkg></flag> |
210 |
+ <flag name="pyflakes">Add support for <pkg>dev-python/pyflakes</pkg></flag> |
211 |
+ <flag name="pylint">Add support for <pkg>dev-python/pylint</pkg></flag> |
212 |
+ <flag name="rope">Add support for <pkg>dev-python/rope</pkg></flag> |
213 |
+ <flag name="scipy">Add support for <pkg>sci-libs/scipy</pkg></flag> |
214 |
+ <flag name="sphinx">Add support for <pkg>dev-python/sphinx</pkg></flag> |
215 |
+ </use> |
216 |
+ <upstream> |
217 |
+ <remote-id type="pypi">spyder</remote-id> |
218 |
+ <remote-id type="bitbucket">spyder-ide/spyderlib</remote-id> |
219 |
+ </upstream> |
220 |
+</pkgmetadata> |
221 |
|
222 |
diff --git a/dev-python/spyder/spyder-2.3.7.ebuild b/dev-python/spyder/spyder-2.3.7.ebuild |
223 |
new file mode 100644 |
224 |
index 0000000..ad66801 |
225 |
--- /dev/null |
226 |
+++ b/dev-python/spyder/spyder-2.3.7.ebuild |
227 |
@@ -0,0 +1,51 @@ |
228 |
+# Copyright 1999-2015 Gentoo Foundation |
229 |
+# Distributed under the terms of the GNU General Public License v2 |
230 |
+# $Id$ |
231 |
+ |
232 |
+EAPI=5 |
233 |
+ |
234 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4} ) |
235 |
+ |
236 |
+inherit distutils-r1 |
237 |
+ |
238 |
+DESCRIPTION="Python IDE with matlab-like features" |
239 |
+HOMEPAGE="https://code.google.com/p/spyderlib/ https://bitbucket.org/spyder-ide/spyderlib" |
240 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip" |
241 |
+ |
242 |
+LICENSE="MIT" |
243 |
+SLOT="0" |
244 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
245 |
+IUSE="doc ipython matplotlib numpy pep8 +pyflakes pylint +rope scipy sphinx" |
246 |
+ |
247 |
+# rope requires no version bordering since all are >= miniumum version |
248 |
+RDEPEND=" |
249 |
+ || ( dev-python/PyQt4[${PYTHON_USEDEP},svg,webkit] |
250 |
+ dev-python/pyside[${PYTHON_USEDEP},svg,webkit] ) |
251 |
+ ipython? ( dev-python/ipython[qt4,${PYTHON_USEDEP}] ) |
252 |
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] ) |
253 |
+ numpy? ( dev-python/numpy[${PYTHON_USEDEP}] ) |
254 |
+ pep8? ( dev-python/pep8[${PYTHON_USEDEP}] ) |
255 |
+ pyflakes? ( >=dev-python/pyflakes-0.5[${PYTHON_USEDEP}] ) |
256 |
+ pylint? ( dev-python/pylint[${PYTHON_USEDEP}] ) |
257 |
+ rope? ( $(python_gen_cond_dep 'dev-python/rope[${PYTHON_USEDEP}]' python2_7) ) |
258 |
+ scipy? ( sci-libs/scipy[${PYTHON_USEDEP}] ) |
259 |
+ sphinx? ( >=dev-python/sphinx-0.6.0[${PYTHON_USEDEP}] )" |
260 |
+DEPEND="${RDEPEND} |
261 |
+ app-arch/unzip |
262 |
+ doc? ( >=dev-python/sphinx-0.6.0[${PYTHON_USEDEP}] )" |
263 |
+ |
264 |
+# Courtesy of Arfrever |
265 |
+PATCHES=( "${FILESDIR}"/${PN}-2.3.1-build.patch ) |
266 |
+ |
267 |
+python_compile_all() { |
268 |
+ if use doc; then |
269 |
+ sphinx-build doc doc/html || die "Generation of documentation failed" |
270 |
+ fi |
271 |
+} |
272 |
+ |
273 |
+python_install_all() { |
274 |
+ distutils-r1_python_install_all |
275 |
+ doicon spyderlib/images/spyder.svg |
276 |
+ make_desktop_entry spyder Spyder spyder "Development;IDE" |
277 |
+ use doc && dodoc -r doc/html/ |
278 |
+} |