summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/python3-ipython.in18
-rw-r--r--rules/python3-ipython.make71
2 files changed, 89 insertions, 0 deletions
diff --git a/rules/python3-ipython.in b/rules/python3-ipython.in
new file mode 100644
index 000000000..a3709a811
--- /dev/null
+++ b/rules/python3-ipython.in
@@ -0,0 +1,18 @@
+## SECTION=python3
+
+config PYTHON3_IPYTHON
+ tristate
+ select PYTHON3
+ select PYTHON3_READLINE if RUNTIME
+ select PYTHON3_DISTUTILS if RUNTIME
+ select PYTHON3_IPYTHON_GENUTILS if RUNTIME
+ select PYTHON3_TRAITLETS if RUNTIME
+ select PYTHON3_DECORATOR if RUNTIME
+ select PYTHON3_PATH_PY if RUNTIME
+ select PYTHON3_PEXPECT if RUNTIME
+ select PYTHON3_PICKLESHARE if RUNTIME
+ select PYTHON3_PTYPROCESS if RUNTIME
+ select PYTHON3_SIMPLEGENERIC if RUNTIME
+ prompt "ipython"
+ help
+ IPython: Productive Interactive Computing
diff --git a/rules/python3-ipython.make b/rules/python3-ipython.make
new file mode 100644
index 000000000..da3aafce3
--- /dev/null
+++ b/rules/python3-ipython.make
@@ -0,0 +1,71 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Florian Scherf <f.scherf@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_IPYTHON) += python3-ipython
+
+#
+# Paths and names
+#
+PYTHON3_IPYTHON_VERSION := 4.1.1
+PYTHON3_IPYTHON_MD5 := 3da622447b3b7ca7d41c868c80bb8b0e
+PYTHON3_IPYTHON := ipython-$(PYTHON3_IPYTHON_VERSION)
+PYTHON3_IPYTHON_SUFFIX := tar.gz
+PYTHON3_IPYTHON_URL := https://pypi.python.org/packages/source/i/ipython/$(PYTHON3_IPYTHON).$(PYTHON3_IPYTHON_SUFFIX)\#md5=3da622447b3b7ca7d41c868c80bb8b0e
+PYTHON3_IPYTHON_SOURCE := $(SRCDIR)/$(PYTHON3_IPYTHON).$(PYTHON3_IPYTHON_SUFFIX)
+PYTHON3_IPYTHON_DIR := $(BUILDDIR)/$(PYTHON3_IPYTHON)
+PYTHON3_IPYTHON_LICENSE := BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_IPYTHON_CONF_TOOL := python3
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-ipython.install:
+ @$(call targetinfo)
+ @$(call world/install, PYTHON3_IPYTHON)
+ @sed -i 's;#!/.*;#!/usr/bin/python$(PYTHON3_MAJORMINOR);' \
+ $(PYTHON3_IPYTHON_PKGDIR)/usr/bin/*
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-ipython.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python3-ipython)
+ @$(call install_fixup, python3-ipython, PRIORITY, optional)
+ @$(call install_fixup, python3-ipython, SECTION, base)
+ @$(call install_fixup, python3-ipython, AUTHOR, "Florian Scherf <f.scherf@pengutronix.de>")
+ @$(call install_fixup, python3-ipython, DESCRIPTION, missing)
+
+# # We have to install the source code to avoid python3 error: "OSError: could not get source code"
+ @for file in `find $(PYTHON3_IPYTHON_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/IPython \
+ ! -type d ! -name "*.pyc" -printf "%P\n"`; do \
+ $(call install_copy, python3-ipython, 0, 0, 0644, -, \
+ /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/IPython/$$file); \
+ done
+
+ @$(call install_copy, python3-ipython, 0, 0, 0755, -, /usr/bin/ipython3)
+
+ @$(call install_finish, python3-ipython)
+
+ @$(call touch)
+
+# vim: syntax=make