forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: 602242 Package-Manager: portage-2.3.3
- Loading branch information
Andrey Grozin
committed
Dec 12, 2016
1 parent
0014e03
commit e2f8910
Showing
3 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
diff -r -U3 spyder-3.0.2.orig/setup.py spyder-3.0.2/setup.py | ||
--- spyder-3.0.2.orig/setup.py 2016-10-25 07:05:22.000000000 +0700 | ||
+++ spyder-3.0.2/setup.py 2016-12-12 19:44:13.840412632 +0700 | ||
@@ -77,12 +77,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_reset.ico'])] | ||
@@ -105,111 +100,9 @@ | ||
|
||
|
||
#============================================================================== | ||
-# Make Linux detect Spyder desktop file | ||
-#============================================================================== | ||
-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, 'spyder', '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, 'spyder') | ||
- 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) | ||
- | ||
- | ||
-#============================================================================== | ||
# Main scripts | ||
#============================================================================== | ||
-# 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'] | ||
|
||
|
||
#============================================================================== | ||
@@ -259,8 +152,7 @@ | ||
'Programming Language :: Python :: 3', | ||
'Development Status :: 5 - Production/Stable', | ||
'Topic :: Scientific/Engineering', | ||
- 'Topic :: Software Development :: Widget Sets'], | ||
- cmdclass=CMDCLASS) | ||
+ 'Topic :: Software Development :: Widget Sets']) | ||
|
||
|
||
#============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) | ||
|
||
inherit eutils distutils-r1 | ||
|
||
DESCRIPTION="Python IDE with matlab-like features" | ||
HOMEPAGE="https://github.com/spyder-ide/spyder/ https://pypi.python.org/pypi/spyder/ http://pythonhosted.org/spyder/" | ||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="doc hdf5" | ||
|
||
RDEPEND=" | ||
|| ( dev-python/PyQt5[${PYTHON_USEDEP},svg,webkit] | ||
dev-python/PyQt4[${PYTHON_USEDEP},svg,webkit] | ||
dev-python/pyside[${PYTHON_USEDEP},svg,webkit] ) | ||
dev-python/QtPy[${PYTHON_USEDEP},svg,webkit] | ||
dev-python/qtconsole[${PYTHON_USEDEP}] | ||
$(python_gen_cond_dep 'dev-python/rope[${PYTHON_USEDEP}]' python2_7) | ||
$(python_gen_cond_dep 'dev-python/rope_py3k[${PYTHON_USEDEP}]' python3_4 python3_5) | ||
dev-python/jedi[${PYTHON_USEDEP}] | ||
dev-python/pyflakes[${PYTHON_USEDEP}] | ||
dev-python/sphinx[${PYTHON_USEDEP}] | ||
dev-python/pygments[${PYTHON_USEDEP}] | ||
dev-python/pylint[${PYTHON_USEDEP}] | ||
dev-python/pep8[${PYTHON_USEDEP}] | ||
dev-python/psutil[${PYTHON_USEDEP}] | ||
dev-python/nbconvert[${PYTHON_USEDEP}] | ||
dev-python/qtawesome[${PYTHON_USEDEP}] | ||
dev-python/pickleshare[${PYTHON_USEDEP}] | ||
dev-python/pyzmq[${PYTHON_USEDEP}] | ||
dev-python/chardet[${PYTHON_USEDEP}] | ||
hdf5? ( dev-python/h5py[${PYTHON_USEDEP}] )" | ||
DEPEND="${RDEPEND} | ||
app-arch/unzip" | ||
|
||
# Courtesy of Arfrever | ||
PATCHES=( "${FILESDIR}"/${P}-build.patch ) | ||
|
||
python_compile_all() { | ||
if use doc; then | ||
sphinx-build doc doc/html || die "Generation of documentation failed" | ||
fi | ||
} | ||
|
||
python_install_all() { | ||
use doc && local HTML_DOCS=( doc/html/. ) | ||
distutils-r1_python_install_all | ||
doicon spyder/images/spyder.svg | ||
make_desktop_entry spyder Spyder spyder "Development;IDE" | ||
} |