* [gentoo-commits] dev/dev-zero:master commit in: dev-python/spyder/, dev-python/spyder/files/
@ 2015-11-26 10:35 Tiziano Müller
0 siblings, 0 replies; only message in thread
From: Tiziano Müller @ 2015-11-26 10:35 UTC (permalink / raw
To: gentoo-commits
commit: a8112b5df7c771bf1173912447574b7ae814547f
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 10:35:19 2015 +0000
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 10:35:19 2015 +0000
URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=a8112b5d
dev-python/spyder: add version bump which fixes ipython-4 incomp.
dev-python/spyder/Manifest | 1 +
dev-python/spyder/files/spyder-2.3.1-build.patch | 154 +++++++++++++++++++++++
dev-python/spyder/metadata.xml | 30 +++++
dev-python/spyder/spyder-2.3.7.ebuild | 51 ++++++++
4 files changed, 236 insertions(+)
diff --git a/dev-python/spyder/Manifest b/dev-python/spyder/Manifest
new file mode 100644
index 0000000..d1bf7b5
--- /dev/null
+++ b/dev-python/spyder/Manifest
@@ -0,0 +1 @@
+DIST spyder-2.3.7.zip 3043384 SHA256 1009f01171a4a5b268594128420a8aed38448c684c3b5b84f6c4e874d9db8f7b SHA512 6e118eeb13103e0d0a871effed9c05b0265161a3979930b9aaa9de0e2ee82ec6e4710c8664fec19231ef992fd21629be538fc79d3e0f019a8b2248044a29383b WHIRLPOOL 64cdd7d73eb2ad9a869332e772534e0b0ee8c6a4ab0d8ff6de3525dac521a8c351277d89754633c6db6d737871d7c5abfed5aa3bb8ef70a2017fc85b9627604e
diff --git a/dev-python/spyder/files/spyder-2.3.1-build.patch b/dev-python/spyder/files/spyder-2.3.1-build.patch
new file mode 100644
index 0000000..4300c30
--- /dev/null
+++ b/dev-python/spyder/files/spyder-2.3.1-build.patch
@@ -0,0 +1,154 @@
+--- setup.py
++++ setup.py
+@@ -21,8 +21,6 @@
+ import shutil
+
+ from distutils.core import setup
+-from distutils.command.build import build
+-from distutils.command.install_data import install_data
+
+ # Check for Python 3
+ PY3 = sys.version_info[0] == 3
+@@ -66,12 +64,7 @@
+ def get_data_files():
+ """Return data_files in a platform dependent manner"""
+ if sys.platform.startswith('linux'):
+- if PY3:
+- data_files = [('share/applications', ['scripts/spyder3.desktop']),
+- ('share/pixmaps', ['img_src/spyder3.png'])]
+- else:
+- data_files = [('share/applications', ['scripts/spyder.desktop']),
+- ('share/pixmaps', ['img_src/spyder.png'])]
++ data_files = [('share/pixmaps', ['img_src/spyder.png'])]
+ elif os.name == 'nt':
+ data_files = [('scripts', ['img_src/spyder.ico',
+ 'img_src/spyder_light.ico'])]
+@@ -80,97 +73,6 @@
+ return data_files
+
+
+-class MyInstallData(install_data):
+- def run(self):
+- install_data.run(self)
+- if sys.platform.startswith('linux'):
+- try:
+- subprocess.call(['update-desktop-database'])
+- except:
+- print("ERROR: unable to update desktop database",
+- file=sys.stderr)
+-CMDCLASS = {'install_data': MyInstallData}
+-
+-
+-# Sphinx build (documentation)
+-def get_html_help_exe():
+- """Return HTML Help Workshop executable path (Windows only)"""
+- if os.name == 'nt':
+- hhc_base = r'C:\Program Files%s\HTML Help Workshop\hhc.exe'
+- for hhc_exe in (hhc_base % '', hhc_base % ' (x86)'):
+- if osp.isfile(hhc_exe):
+- return hhc_exe
+- else:
+- return
+-
+-try:
+- from sphinx import setup_command
+-
+- class MyBuild(build):
+- user_options = [('no-doc', None, "Don't build Spyder documentation")] \
+- + build.user_options
+- def __init__(self, *args, **kwargs):
+- build.__init__(self, *args, **kwargs)
+- self.no_doc = False
+- def with_doc(self):
+- setup_dir = os.path.dirname(os.path.abspath(__file__))
+- is_doc_dir = os.path.isdir(os.path.join(setup_dir, 'doc'))
+- install_obj = self.distribution.get_command_obj('install')
+- return (is_doc_dir and not self.no_doc and not install_obj.no_doc)
+- sub_commands = build.sub_commands + [('build_doc', with_doc)]
+- CMDCLASS['build'] = MyBuild
+-
+-
+- class MyInstall(install):
+- user_options = [('no-doc', None, "Don't build Spyder documentation")] \
+- + install.user_options
+- def __init__(self, *args, **kwargs):
+- install.__init__(self, *args, **kwargs)
+- self.no_doc = False
+- CMDCLASS['install'] = MyInstall
+-
+-
+- class MyBuildDoc(setup_command.BuildDoc):
+- def run(self):
+- build = self.get_finalized_command('build')
+- sys.path.insert(0, os.path.abspath(build.build_lib))
+- dirname = self.distribution.get_command_obj('build').build_purelib
+- self.builder_target_dir = osp.join(dirname, 'spyderlib', 'doc')
+-
+- if not osp.exists(self.builder_target_dir):
+- os.mkdir(self.builder_target_dir)
+-
+- hhc_exe = get_html_help_exe()
+- self.builder = "html" if hhc_exe is None else "htmlhelp"
+-
+- try:
+- setup_command.BuildDoc.run(self)
+- except UnicodeDecodeError:
+- print("ERROR: unable to build documentation because Sphinx "\
+- "do not handle source path with non-ASCII characters. "\
+- "Please try to move the source package to another "\
+- "location (path with *only* ASCII characters).",
+- file=sys.stderr)
+- sys.path.pop(0)
+-
+- # Building chm doc, if HTML Help Workshop is installed
+- if hhc_exe is not None:
+- fname = osp.join(self.builder_target_dir, 'Spyderdoc.chm')
+- subprocess.call('"%s" %s' % (hhc_exe, fname), shell=True)
+- if osp.isfile(fname):
+- dest = osp.join(dirname, 'spyderlib')
+- try:
+- shutil.move(fname, dest)
+- except shutil.Error:
+- print("Unable to replace %s" % dest)
+- shutil.rmtree(self.builder_target_dir)
+-
+- CMDCLASS['build_doc'] = MyBuildDoc
+-except ImportError:
+- print('WARNING: unable to build documentation because Sphinx '\
+- 'is not installed', file=sys.stderr)
+-
+-
+ NAME = 'spyder'
+ LIBNAME = 'spyderlib'
+ from spyderlib import __version__, __project_url__
+@@ -204,13 +106,7 @@
+ packages = get_subpackages(LIBNAME)+get_subpackages('spyderplugins')
+ return packages
+
+-# NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows
+-# platforms due to a bug in pip installation process (see Issue 1158)
+-SCRIPTS = ['%s_win_post_install.py' % NAME]
+-if PY3 and sys.platform.startswith('linux'):
+- SCRIPTS.append('spyder3')
+-else:
+- SCRIPTS.append('spyder')
++SCRIPTS = ['spyder']
+ EXTLIST = ['.mo', '.svg', '.png', '.css', '.html', '.js', '.chm', '.ini',
+ '.txt', '.rst']
+ if os.name == 'nt':
+@@ -246,7 +142,7 @@
+ package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST),
+ 'spyderplugins':
+ get_package_data('spyderplugins', EXTLIST)},
+- requires=["rope (>=0.9.2)", "sphinx (>=0.6.0)", "PyQt4 (>=4.4)"],
++ requires=["rope (>=0.9.2)", "PyQt4 (>=4.4)"],
+ scripts=[osp.join('scripts', fname) for fname in SCRIPTS],
+ data_files=get_data_files(),
+ options={"bdist_wininst":
+@@ -267,5 +163,4 @@
+ 'Programming Language :: Python :: 3',
+ 'Development Status :: 5 - Production/Stable',
+ 'Topic :: Scientific/Engineering',
+- 'Topic :: Software Development :: Widget Sets'],
+- cmdclass=CMDCLASS)
++ 'Topic :: Software Development :: Widget Sets'])
diff --git a/dev-python/spyder/metadata.xml b/dev-python/spyder/metadata.xml
new file mode 100644
index 0000000..c4364ce
--- /dev/null
+++ b/dev-python/spyder/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <maintainer>
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <longdescription lang="en">
+ Spyder development environment and its PyQt4-based IDE tools:
+ interactive Python shell, Python code editor, workspace
+ (dict/list/string/array editor), doc viewer, history log,
+ environment variables editor, ...
+</longdescription>
+ <use>
+ <flag name="ipython">Add support for <pkg>dev-python/ipython</pkg></flag>
+ <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag>
+ <flag name="numpy">Add support for <pkg>dev-python/numpy</pkg></flag>
+ <flag name="pep8">Add support for <pkg>dev-python/pep8</pkg></flag>
+ <flag name="pyflakes">Add support for <pkg>dev-python/pyflakes</pkg></flag>
+ <flag name="pylint">Add support for <pkg>dev-python/pylint</pkg></flag>
+ <flag name="rope">Add support for <pkg>dev-python/rope</pkg></flag>
+ <flag name="scipy">Add support for <pkg>sci-libs/scipy</pkg></flag>
+ <flag name="sphinx">Add support for <pkg>dev-python/sphinx</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">spyder</remote-id>
+ <remote-id type="bitbucket">spyder-ide/spyderlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/spyder/spyder-2.3.7.ebuild b/dev-python/spyder/spyder-2.3.7.ebuild
new file mode 100644
index 0000000..ad66801
--- /dev/null
+++ b/dev-python/spyder/spyder-2.3.7.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python IDE with matlab-like features"
+HOMEPAGE="https://code.google.com/p/spyderlib/ https://bitbucket.org/spyder-ide/spyderlib"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ipython matplotlib numpy pep8 +pyflakes pylint +rope scipy sphinx"
+
+# rope requires no version bordering since all are >= miniumum version
+RDEPEND="
+ || ( dev-python/PyQt4[${PYTHON_USEDEP},svg,webkit]
+ dev-python/pyside[${PYTHON_USEDEP},svg,webkit] )
+ ipython? ( dev-python/ipython[qt4,${PYTHON_USEDEP}] )
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
+ pep8? ( dev-python/pep8[${PYTHON_USEDEP}] )
+ pyflakes? ( >=dev-python/pyflakes-0.5[${PYTHON_USEDEP}] )
+ pylint? ( dev-python/pylint[${PYTHON_USEDEP}] )
+ rope? ( $(python_gen_cond_dep 'dev-python/rope[${PYTHON_USEDEP}]' python2_7) )
+ scipy? ( sci-libs/scipy[${PYTHON_USEDEP}] )
+ sphinx? ( >=dev-python/sphinx-0.6.0[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ doc? ( >=dev-python/sphinx-0.6.0[${PYTHON_USEDEP}] )"
+
+# Courtesy of Arfrever
+PATCHES=( "${FILESDIR}"/${PN}-2.3.1-build.patch )
+
+python_compile_all() {
+ if use doc; then
+ sphinx-build doc doc/html || die "Generation of documentation failed"
+ fi
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ doicon spyderlib/images/spyder.svg
+ make_desktop_entry spyder Spyder spyder "Development;IDE"
+ use doc && dodoc -r doc/html/
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-26 10:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 10:35 [gentoo-commits] dev/dev-zero:master commit in: dev-python/spyder/, dev-python/spyder/files/ Tiziano Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox