mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-27 12:02:11 +08:00
136 lines
5.6 KiB
Bash
136 lines
5.6 KiB
Bash
# Contributor : Arch Linux https://www.archlinux.org/packages/community/any/ipython/
|
||
|
||
pkgbase=ipython
|
||
pkgname=('ipython3' 'ipython2')
|
||
pkgver=4.1.1
|
||
pkgrel=1
|
||
pkgdesc="An enhanced Interactive Python shell."
|
||
arch=('any')
|
||
url="http://ipython.org"
|
||
license=('BSD')
|
||
makedepends=('python3-setuptools' 'python2-setuptools')
|
||
optdepends=("python3-nose: for IPython's test suite")
|
||
|
||
# some of these will update rapidly, others never
|
||
# so _vars will be phased in as new updates are released
|
||
_ipykv=4.2.2
|
||
_traitv=4.1.0
|
||
|
||
source=("https://pypi.python.org/packages/source/i/ipython/$pkgbase-$pkgver.tar.gz"
|
||
"https://pypi.python.org/packages/source/i/ipykernel/ipykernel-$_ipykv.tar.gz"
|
||
"https://pypi.python.org/packages/source/t/traitlets/traitlets-$_traitv.tar.gz"
|
||
"https://pypi.python.org/packages/source/i/ipython_genutils/ipython_genutils-0.1.0.tar.gz"
|
||
"https://pypi.python.org/packages/source/p/pickleshare/pickleshare-0.5.tar.gz"
|
||
"https://pypi.python.org/packages/source/s/simplegeneric/simplegeneric-0.8.1.zip"
|
||
"ipython.png")
|
||
sha256sums=('1cb340dfdf6ec306b9ded72071742c87fa5247929db7ab704e17defe1975e38f'
|
||
'a876da43e01acec2c305abdd8e6aa55f052bab1196171ccf1cb9a6aa230298b0'
|
||
'440e38dfa5d2a26c086d4b427cfb7aed17d0a2dca78bce90c33354da2592af5b'
|
||
'3a0624a251a26463c9dfa0ffa635ec51c4265380980d9a50d65611c3c2bd82a6'
|
||
'c0be5745035d437dbf55a96f60b7712345b12423f7d0951bd7d8dc2141ca9286'
|
||
'dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173'
|
||
'ae11c25d6c269c3938fe32fce5ec21118f24dd8cd8360ef59e21df10928b4ac6')
|
||
|
||
# With 4.0 many previously bundled external libraries are no longer bundled
|
||
# Since there are so many and they are so small, they get re-bundled here
|
||
# Break them out if any non-ipython package ends up needing these
|
||
|
||
# traitlets (depends on python-decorator)
|
||
# ipython_genutils
|
||
# "Pretend this doesn’t exist. Nobody should use it."
|
||
# "Vestigial IPython utilities: DO NOT USE"
|
||
# (still required for now though, but drop at first chance)
|
||
# pickleshare (depends on path.py)
|
||
# simplegeneric (so old that it only comes in .zip and still refers to the cheeseshop)
|
||
|
||
# confirm that an update does not break sage?
|
||
|
||
prepare() {
|
||
cd "$srcdir"
|
||
cp -r ipython-$pkgver ipython2-$pkgver
|
||
cp -r ipykernel-$_ipykv python2-ipykernel-$_ipykv
|
||
cp -r ipython_genutils-0.1.0 ipython2_genutils-0.1.0
|
||
cp -r pickleshare-0.5 python2-pickleshare-0.5
|
||
cp -r traitlets-$_traitv python2-traitlets-$_traitv
|
||
cp -r simplegeneric-0.8.1 python2-simplegeneric-0.8.1
|
||
}
|
||
|
||
package_ipython3() {
|
||
depends=('python3' 'python3-decorator' 'python3-pexpect' 'sqlite3' 'python3-setuptools' 'python3-path')
|
||
# see https://github.com/ipython/ipython/issues/2057
|
||
#export LC_ALL=en_US.UTF-8
|
||
cd "$srcdir/ipython-$pkgver"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
# TEMPORARY!
|
||
cd "$srcdir/ipython_genutils-0.1.0"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/pickleshare-0.5"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/traitlets-$_traitv"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/simplegeneric-0.8.1"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/ipykernel-$_ipykv"
|
||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/ipython-$pkgver"
|
||
install -Dm644 docs/source/about/license_and_copyright.rst "$pkgdir/usr/share/licenses/ipython/LICENSE"
|
||
|
||
cd "$srcdir/ipython-$pkgver/examples/IPython Kernel/"
|
||
# FS#45120
|
||
sed -i 's/gnome-netstatus-idle/ipython/' *.desktop
|
||
sed -i s!"IPython"!"IPython3"! *.desktop
|
||
sed -i s!"Name[en_US]=ipython"!"Name[en_US]=ipython3"! *.desktop
|
||
sed -i s!"Name=ipython"!"Name=ipython3"! *.desktop
|
||
sed -i s!"Development;Utility;"!"Development;"! *.desktop
|
||
install -Dm644 ipython.desktop "$pkgdir/usr/share/applications/ipython.desktop"
|
||
}
|
||
|
||
package_ipython2() {
|
||
pkgdesc="An enhanced Interactive Python2 shell."
|
||
depends=('python2' 'python2-decorator' 'python2-pexpect' 'sqlite3' 'python2-setuptools' 'python2-path')
|
||
optdepends=("python2-nose: for IPython's test suite")
|
||
|
||
cd "$srcdir/ipython2-$pkgver"
|
||
|
||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
# TEMPORARY!
|
||
cd "$srcdir/ipython2_genutils-0.1.0"
|
||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/python2-pickleshare-0.5"
|
||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/python2-traitlets-$_traitv"
|
||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/python2-simplegeneric-0.8.1"
|
||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/python2-ipykernel-$_ipykv"
|
||
#python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
|
||
|
||
cd "$srcdir/ipython2-$pkgver"
|
||
install -Dm644 docs/source/about/license_and_copyright.rst "$pkgdir/usr/share/licenses/ipython2/LICENSE"
|
||
|
||
# hack to get around ipython collision
|
||
cd "$pkgdir/usr/share/man/man1/"
|
||
for i in *; do
|
||
mv $i ${i/%.1/2.1}
|
||
done
|
||
find "$pkgdir/usr/bin/" -type f -regex '.*[^2]$' -delete
|
||
|
||
cd "$srcdir/ipython2-$pkgver/examples/IPython Kernel/"
|
||
sed -i 's/ython/ython2/g' *.desktop
|
||
sed -i 's/gnome-netstatus-idle/ipython2/' *.desktop
|
||
sed -i s!"Icon=ipython2"!"Icon=ipython"! *.desktop
|
||
sed -i s!"Development;Utility;"!"Development;"! *.desktop
|
||
install -Dm644 ipython.desktop "$pkgdir/usr/share/applications/ipython2.desktop"
|
||
install -Dm644 "$srcdir/ipython.png" "$pkgdir/usr/share/pixmaps/ipython.png"
|
||
} |