summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2016-02-23 09:07:24 +0000
committerPatrice Clement <monsieurp@gentoo.org>2016-02-23 09:14:38 +0000
commitfd1b8160cae4b9a5aa99dad3c3a34c01cc33ea90 (patch)
tree4c03dc50a92221dc3d7162a0052a653f8f0368fa /dev-python/spyder
parentdev-python/spyder: Make use of variables wherever possible. (diff)
downloadgentoo-fd1b8160cae4b9a5aa99dad3c3a34c01cc33ea90.tar.gz
gentoo-fd1b8160cae4b9a5aa99dad3c3a34c01cc33ea90.tar.bz2
gentoo-fd1b8160cae4b9a5aa99dad3c3a34c01cc33ea90.zip
dev-python/spyder: Following EAPI 6 bump, convert patch to p1 format.
With the EAPI 6, patches must be p1 compliant. So let's make Portage happy and comply with the new rule. Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-python/spyder')
-rw-r--r--dev-python/spyder/files/spyder-2.3.8-build.patch154
-rw-r--r--dev-python/spyder/spyder-2.3.8.ebuild2
2 files changed, 155 insertions, 1 deletions
diff --git a/dev-python/spyder/files/spyder-2.3.8-build.patch b/dev-python/spyder/files/spyder-2.3.8-build.patch
new file mode 100644
index 000000000000..2a4646ab0c08
--- /dev/null
+++ b/dev-python/spyder/files/spyder-2.3.8-build.patch
@@ -0,0 +1,154 @@
+--- a/setup.py
++++ b/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/spyder-2.3.8.ebuild b/dev-python/spyder/spyder-2.3.8.ebuild
index 50b82203fec9..ef9c7d8e5e30 100644
--- a/dev-python/spyder/spyder-2.3.8.ebuild
+++ b/dev-python/spyder/spyder-2.3.8.ebuild
@@ -36,7 +36,7 @@ DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-0.6.0[${PYTHON_USEDEP}] )"
# Courtesy of Arfrever
-PATCHES=( "${FILESDIR}"/${PN}-2.3.1-build.patch )
+PATCHES=( "${FILESDIR}"/${P}-build.patch )
python_compile_all() {
if use doc; then