python-ipython: update to 3.0.0
This commit is contained in:
parent
1f94bf82ef
commit
c8677f8103
|
@ -1,8 +1,8 @@
|
|||
This package contains the basic ipython terminal shell.
|
||||
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-Jinja2, python-Pygments, python-Sphinx, pandoc.
|
||||
dependencies: python-ipython-notebook, 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,25 +0,0 @@
|
|||
--- IPython/html/notebookapp.py
|
||||
+++ IPython/html/notebookapp.py
|
||||
@@ -218,6 +218,11 @@ class NotebookWebApplication(web.Applica
|
||||
pattern = url_path_join(settings['base_url'], handler[0])
|
||||
new_handler = tuple([pattern] + list(handler[1:]))
|
||||
new_handlers.append(new_handler)
|
||||
+
|
||||
+ if os.path.exists("/usr/share/mathjax/MathJax.js"):
|
||||
+ new_handlers.append((r"/mathjax/(.*)", web.StaticFileHandler,
|
||||
+ {"path": "/usr/share/mathjax"}))
|
||||
+
|
||||
# add 404 on the end, which will catch everything that falls through
|
||||
new_handlers.append((r'(.*)', Template404))
|
||||
return new_handlers
|
||||
@@ -514,6 +519,10 @@ class NotebookApp(BaseIPythonApplication
|
||||
url = url_path_join(url_prefix, u"mathjax/MathJax.js")
|
||||
self.log.info("Serving local MathJax from %s at %s", mathjax, url)
|
||||
return url
|
||||
+
|
||||
+ if os.path.exists("/usr/share/mathjax/MathJax.js"):
|
||||
+ self.log.info("Using system MathJax")
|
||||
+ return u"/mathjax/MathJax.js"
|
||||
|
||||
# no local mathjax, serve from CDN
|
||||
url = u"https://cdn.mathjax.org/mathjax/latest/MathJax.js"
|
|
@ -1,9 +1,8 @@
|
|||
This package contains the Python 3 variant of ipython terminal shell.
|
||||
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-Jinja2, python3.4-Pygments, python3.4-Sphinx,
|
||||
pandoc.
|
||||
dependencies: python3.4-ipython-notebook, python3.4-Sphinx, pandoc.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'python-ipython'
|
||||
pkgname=python-ipython
|
||||
version=2.4.1
|
||||
revision=2
|
||||
version=3.0.0
|
||||
revision=1
|
||||
noarch=yes
|
||||
wrksrc="ipython-${version}"
|
||||
build_style=python-module
|
||||
|
@ -12,8 +12,7 @@ hostmakedepends="
|
|||
python-Jinja2 python3.4-Jinja2 python-pyzmq python3.4-pyzmq python-pexpect
|
||||
python3.4-pexpect"
|
||||
makedepends="${hostmakedepends}"
|
||||
depends="python-decorator python-jsonpointer python-jsonschema python-path
|
||||
python-pexpect python-simplegeneric"
|
||||
depends="python-decorator python-path python-pexpect python-simplegeneric"
|
||||
pycompile_module="IPython"
|
||||
short_desc="Enhanced interactive Python2 shell"
|
||||
_short_desc="${short_desc/Python2/Python3.4}"
|
||||
|
@ -21,7 +20,7 @@ maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|||
homepage="http://ipython.org/"
|
||||
license="3-clause-BSD"
|
||||
distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz"
|
||||
checksum=6d350b5c2d3e925b0ff6167658812d720b891e476238d924504e2f7f483e9217
|
||||
checksum=86070141110101b6b55e6dc31a40461c437d391a5337a6e5e349357dc18bfbb4
|
||||
|
||||
# explicit order, do not change
|
||||
subpackages="python-ipython-notebook python3.4-ipython-notebook python3.4-ipython"
|
||||
|
@ -40,13 +39,19 @@ pre_build() {
|
|||
}
|
||||
post_install() {
|
||||
# remove bundled libraries
|
||||
for f in decorator{,s} json{pointer,schema} path pexpect simplegeneric; do
|
||||
for f in decorator{,s} path pexpect simplegeneric; do
|
||||
find ${DESTDIR} -type f -name _${f}.py -delete
|
||||
done
|
||||
|
||||
# remove qtconsole
|
||||
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/IPython/qt
|
||||
|
||||
# use system mathjax
|
||||
for pyver in $python_versions; do
|
||||
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/}
|
||||
|
@ -56,7 +61,8 @@ post_install() {
|
|||
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"
|
||||
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
|
||||
|
@ -67,8 +73,9 @@ post_install() {
|
|||
|
||||
python-ipython-notebook_package() {
|
||||
noarch=yes
|
||||
depends="${sourcepkg}>=${version}_${revision} python-pyzmq python-Jinja2
|
||||
python-tornado mathjax"
|
||||
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() {
|
||||
|
@ -77,7 +84,7 @@ python-ipython-notebook_package() {
|
|||
}
|
||||
python-ipython-qtconsole_package() {
|
||||
noarch=yes
|
||||
depends="${sourcepkg}>=${version}_${revision} python-pyzmq python-Pygments
|
||||
depends="${sourcepkg}-${version}_${revision} python-pyzmq python-Pygments
|
||||
python-PyQt4 desktop-file-utils"
|
||||
short_desc+=" - Qt console"
|
||||
pycompile_module="IPython"
|
||||
|
@ -89,8 +96,8 @@ python-ipython-qtconsole_package() {
|
|||
}
|
||||
python3.4-ipython_package() {
|
||||
noarch=yes
|
||||
depends="python3.4-decorator python3.4-jsonpointer python3.4-jsonschema
|
||||
python3.4-path python3.4-pexpect python3.4-simplegeneric"
|
||||
depends="python3.4-decorator python3.4-path python3.4-pexpect
|
||||
python3.4-simplegeneric"
|
||||
short_desc="${_short_desc}"
|
||||
pycompile_version="3.4"
|
||||
pycompile_module="IPython"
|
||||
|
@ -98,13 +105,14 @@ python3.4-ipython_package() {
|
|||
vmove usr/bin/*3
|
||||
vmove usr/lib/python3.4
|
||||
vmove usr/share/man/man1/*3.1
|
||||
vlicense ${wrksrc}/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 mathjax"
|
||||
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"
|
||||
|
@ -114,7 +122,7 @@ python3.4-ipython-notebook_package() {
|
|||
}
|
||||
python3.4-ipython-qtconsole_package() {
|
||||
noarch=yes
|
||||
depends="python3.4-ipython>=${version}_${revision} python3.4-pyzmq
|
||||
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"
|
||||
|
|
Loading…
Reference in New Issue