python-ipython: update to 4.0.1
This commit is contained in:
parent
06f8d090fb
commit
075177fd22
8 changed files with 22 additions and 159 deletions
|
@ -1 +0,0 @@
|
||||||
python-ipython
|
|
|
@ -1 +0,0 @@
|
||||||
python-ipython
|
|
|
@ -1,8 +0,0 @@
|
||||||
This package contains the basic IPython terminal shell.
|
|
||||||
|
|
||||||
For the Qt console install python-ipython-qtconsole.
|
|
||||||
For the HTML notebook install python-ipython-notebook.
|
|
||||||
For the matplotlib integration install python-matplotlib.
|
|
||||||
|
|
||||||
To convert notebooks between various formats install the
|
|
||||||
following dependencies: python-Sphinx, pandoc.
|
|
|
@ -1,32 +0,0 @@
|
||||||
Description: don't fail startup if ipython-notebook is not installed
|
|
||||||
e.g. ipython locate triggers this code but doesn't need the notebook css files
|
|
||||||
--- IPython/core/profiledir.py
|
|
||||||
+++ IPython/core/profiledir.py
|
|
||||||
@@ -173,15 +173,18 @@ class ProfileDir(LoggingConfigurable):
|
|
||||||
self._mkdir(self.static_dir)
|
|
||||||
custom = os.path.join(self.static_dir, 'custom')
|
|
||||||
self._mkdir(custom)
|
|
||||||
- from IPython.html import DEFAULT_STATIC_FILES_PATH
|
|
||||||
- for fname in ('custom.js', 'custom.css'):
|
|
||||||
- src = os.path.join(DEFAULT_STATIC_FILES_PATH, 'custom', fname)
|
|
||||||
- dest = os.path.join(custom, fname)
|
|
||||||
- if not os.path.exists(src):
|
|
||||||
- self.log.warn("Could not copy default file to static dir. Source file %s does not exist.", src)
|
|
||||||
- continue
|
|
||||||
- if not os.path.exists(dest):
|
|
||||||
- shutil.copy(src, dest)
|
|
||||||
+ try:
|
|
||||||
+ from IPython.html import DEFAULT_STATIC_FILES_PATH
|
|
||||||
+ for fname in ('custom.js', 'custom.css'):
|
|
||||||
+ src = os.path.join(DEFAULT_STATIC_FILES_PATH, 'custom', fname)
|
|
||||||
+ dest = os.path.join(custom, fname)
|
|
||||||
+ if not os.path.exists(src):
|
|
||||||
+ self.log.warn("Could not copy default file to static dir. Source file %s does not exist.", src)
|
|
||||||
+ continue
|
|
||||||
+ if not os.path.exists(dest):
|
|
||||||
+ shutil.copy(src, dest)
|
|
||||||
+ except ImportError:
|
|
||||||
+ pass # ipython-notebook not installed
|
|
||||||
|
|
||||||
def check_dirs(self):
|
|
||||||
self.check_security_dir()
|
|
|
@ -1,8 +0,0 @@
|
||||||
This package contains the Python 3.4 variant of IPython terminal shell.
|
|
||||||
|
|
||||||
For the Qt console install python3.4-ipython-qtconsole.
|
|
||||||
For the HTML notebook install python3.4-ipython-notebook.
|
|
||||||
For the matplotlib integration install python3.4-matplotlib.
|
|
||||||
|
|
||||||
To convert notebooks between various formats install the following
|
|
||||||
dependencies: python3.4-Sphinx, pandoc.
|
|
|
@ -1,135 +1,50 @@
|
||||||
# Template file for 'python-ipython'
|
# Template file for 'python-ipython'
|
||||||
pkgname=python-ipython
|
pkgname=python-ipython
|
||||||
version=3.2.3
|
version=4.0.1
|
||||||
revision=1
|
revision=1
|
||||||
noarch=yes
|
noarch=yes
|
||||||
wrksrc="ipython-${version}"
|
wrksrc="ipython-${version}"
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
python_versions="2.7 3.4"
|
python_versions="2.7 3.4"
|
||||||
hostmakedepends="
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
||||||
python-setuptools python3.4-setuptools python-Sphinx python3.4-Sphinx
|
depends="python-decorator python-pexpect python-pickleshare python-parsing
|
||||||
python-Pygments python3.4-Pygments python-tornado python3.4-tornado
|
python-simplegeneric python-traitlets"
|
||||||
python-Jinja2 python3.4-Jinja2 python-pyzmq python3.4-pyzmq python-pexpect
|
|
||||||
python3.4-pexpect"
|
|
||||||
makedepends="${hostmakedepends}"
|
|
||||||
depends="python-decorator python-path python-pexpect python-simplegeneric"
|
|
||||||
pycompile_module="IPython"
|
pycompile_module="IPython"
|
||||||
short_desc="Enhanced interactive Python2 shell"
|
short_desc="Enhanced interactive Python2 shell"
|
||||||
_short_desc="${short_desc/Python2/Python3.4}"
|
|
||||||
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
||||||
homepage="http://ipython.org/"
|
homepage="http://ipython.org/"
|
||||||
license="3-clause-BSD"
|
license="3-clause-BSD"
|
||||||
distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz"
|
||||||
checksum=2e9a467f918c68d2e4d744c7c62407ad2ba2db136c10afcc5bcadc00e983f02b
|
checksum=3bd3b78abc4f43b9ea7fa5353a2a9ba01af8ac4aec5d11e78fa5cbcec105432e
|
||||||
|
replaces="python-ipython-notebook<4.0.6 python-ipython-qtconsole<4.1.1"
|
||||||
|
|
||||||
# explicit order, do not change
|
|
||||||
subpackages="python-ipython-notebook python3.4-ipython-notebook python3.4-ipython"
|
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
|
||||||
subpackages+=" python-ipython-qtconsole python3.4-ipython-qtconsole"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pre_build() {
|
|
||||||
# remove shebangs
|
|
||||||
find IPython -type f -name '*.py' -exec sed -i '/^#!.*python$/d' {} +
|
|
||||||
|
|
||||||
# rename man pages
|
|
||||||
for f in docs/man/*; do
|
|
||||||
cp ${f} ${f/%.1/3.1}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# remove bundled libraries
|
# use decorators of numpy
|
||||||
for f in decorator{,s} path pexpect simplegeneric; do
|
rm -f ${DESTDIR}/usr/lib/python*/site-packages/IPython/external/decorators/_decorators.py
|
||||||
find ${DESTDIR} -type f -name _${f}.py -delete
|
# remove iptest
|
||||||
done
|
rm -f ${DESTDIR}/usr/bin/iptest*
|
||||||
|
# drop '2' suffix from ipython bin script
|
||||||
# remove qtconsole
|
rm -f ${DESTDIR}/usr/bin/ipython
|
||||||
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/IPython/qt
|
mv ${DESTDIR}/usr/bin/ipython{2,}
|
||||||
|
# create versioned ipython3 bin script and man page
|
||||||
# use system mathjax
|
mv ${DESTDIR}/usr/bin/ipython3{,.4}
|
||||||
for pyver in $python_versions; do
|
vman docs/man/ipython.1 ipython3.4.1
|
||||||
ln -sf /usr/share/mathjax \
|
|
||||||
${DESTDIR}/usr/lib/python${pyver}/site-packages/IPython/html/static/mathjax
|
|
||||||
done
|
|
||||||
|
|
||||||
# drop '2' suffix from bin names
|
|
||||||
for f in ${DESTDIR}/usr/bin/*2; do
|
|
||||||
mv ${f} ${f/%2/}
|
|
||||||
done
|
|
||||||
|
|
||||||
# install qtconsole.desktop files
|
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
|
||||||
install -Dm644 "${wrksrc}/examples/IPython Kernel/ipython-qtconsole.desktop" \
|
|
||||||
${DESTDIR}/usr/share/applications/ipython-qtconsole.desktop
|
|
||||||
sed -i 's/ipython/&3/g;s/IPython/&3/g' \
|
|
||||||
"${wrksrc}/examples/IPython Kernel/ipython-qtconsole.desktop"
|
|
||||||
install -Dm644 "${wrksrc}/examples/IPython Kernel/ipython-qtconsole.desktop" \
|
|
||||||
${DESTDIR}/usr/share/applications/ipython3-qtconsole.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# install license
|
# install license
|
||||||
vlicense COPYING.rst LICENSE
|
vlicense COPYING.rst LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
python-ipython-notebook_package() {
|
|
||||||
noarch=yes
|
|
||||||
depends="${sourcepkg}-${version}_${revision} python-pyzmq python-Jinja2
|
|
||||||
python-tornado python-jsonschema python-Pygments python-mistune
|
|
||||||
python-terminado mathjax"
|
|
||||||
short_desc+=" - HTML notebook"
|
|
||||||
pycompile_module="IPython"
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/lib/python2.7/site-packages/IPython/html
|
|
||||||
}
|
|
||||||
}
|
|
||||||
python-ipython-qtconsole_package() {
|
|
||||||
noarch=yes
|
|
||||||
depends="${sourcepkg}-${version}_${revision} python-pyzmq python-Pygments
|
|
||||||
python-PyQt4 desktop-file-utils"
|
|
||||||
short_desc+=" - Qt console"
|
|
||||||
pycompile_module="IPython"
|
|
||||||
pkg_install() {
|
|
||||||
vmkdir usr/lib/python2.7/site-packages/IPython
|
|
||||||
vcopy ${wrksrc}/IPython/qt usr/lib/python2.7/site-packages/IPython
|
|
||||||
vmove usr/share/applications/ipython-qtconsole.desktop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
python3.4-ipython_package() {
|
python3.4-ipython_package() {
|
||||||
noarch=yes
|
noarch=yes
|
||||||
depends="python3.4-decorator python3.4-path python3.4-pexpect
|
replaces="python3.4-ipython-notebook<4.0.6 python3.4-ipython-qtconsole<4.1.1"
|
||||||
python3.4-simplegeneric"
|
depends="python3.4-decorator python3.4-pexpect python3.4-pickleshare
|
||||||
short_desc="${_short_desc}"
|
python3.4-parsing python3.4-simplegeneric python3.4-traitlets"
|
||||||
pycompile_version="3.4"
|
pycompile_version="3.4"
|
||||||
pycompile_module="IPython"
|
pycompile_module="IPython"
|
||||||
|
short_desc="${short_desc/Python2/Python3.4}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/*3
|
vmove usr/bin/ipython3.4
|
||||||
vmove usr/lib/python3.4
|
vmove usr/lib/python3.4
|
||||||
vmove usr/share/man/man1/*3.1
|
vmove usr/share/man/man1/ipython3.4.1
|
||||||
vlicense COPYING.rst LICENSE
|
vlicense COPYING.rst LICENSE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
python3.4-ipython-notebook_package() {
|
|
||||||
noarch=yes
|
|
||||||
depends="python3.4-ipython-${version}_${revision} python3.4-pyzmq
|
|
||||||
python3.4-Jinja2 python3.4-tornado python3.4-jsonschema python3.4-Pygments
|
|
||||||
python3.4-mistune python3.4-terminado mathjax"
|
|
||||||
short_desc="${_short_desc} - HTML notebook"
|
|
||||||
pycompile_version="3.4"
|
|
||||||
pycompile_module="IPython"
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/lib/python3.4/site-packages/IPython/html
|
|
||||||
}
|
|
||||||
}
|
|
||||||
python3.4-ipython-qtconsole_package() {
|
|
||||||
noarch=yes
|
|
||||||
depends="python3.4-ipython-${version}_${revision} python3.4-pyzmq
|
|
||||||
python3.4-Pygments python3.4-PyQt4 desktop-file-utils"
|
|
||||||
short_desc="${_short_desc} - Qt console"
|
|
||||||
pycompile_version="3.4"
|
|
||||||
pycompile_module="IPython"
|
|
||||||
pkg_install() {
|
|
||||||
vmkdir usr/lib/python3.4/site-packages/IPython
|
|
||||||
vcopy ${wrksrc}/IPython/qt usr/lib/python3.4/site-packages/IPython
|
|
||||||
vmove usr/share/applications/ipython3-qtconsole.desktop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
python-ipython
|
|
|
@ -1 +0,0 @@
|
||||||
python-ipython
|
|
Loading…
Add table
Add a link
Reference in a new issue