python: add alternatives
This commit is contained in:
parent
ffff9d749d
commit
bba8325dd0
5 changed files with 26 additions and 18 deletions
|
@ -1,9 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=IDLE
|
|
||||||
Comment=IDE for Python2
|
|
||||||
Exec=idle
|
|
||||||
Icon=idle
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Development;
|
|
||||||
StartupNotify=true
|
|
9
srcpkgs/python-tkinter/files/idle2.7.desktop
Normal file
9
srcpkgs/python-tkinter/files/idle2.7.desktop
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=IDLE (using Python2.7)
|
||||||
|
Comment=IDE for Python (using Python2.7)
|
||||||
|
Exec=idle2.7
|
||||||
|
Icon=idle2.7
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Development;
|
||||||
|
StartupNotify=true
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
pkgname=python-tkinter
|
pkgname=python-tkinter
|
||||||
version=2.7.11
|
version=2.7.11
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="Python-${version}"
|
wrksrc="Python-${version}"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
makedepends="
|
makedepends="
|
||||||
|
@ -65,7 +65,7 @@ do_install() {
|
||||||
else
|
else
|
||||||
_libdir=lib
|
_libdir=lib
|
||||||
fi
|
fi
|
||||||
mv ${wrksrc}/${pkgname}-${version}-install/usr/bin/idle ${DESTDIR}/usr/bin
|
mv ${wrksrc}/${pkgname}-${version}-install/usr/bin/idle ${DESTDIR}/usr/bin/idle2.7
|
||||||
mv ${wrksrc}/${pkgname}-${version}-install/usr/lib/python2.7/idlelib \
|
mv ${wrksrc}/${pkgname}-${version}-install/usr/lib/python2.7/idlelib \
|
||||||
${DESTDIR}/usr/lib/python2.7/
|
${DESTDIR}/usr/lib/python2.7/
|
||||||
mv ${wrksrc}/${pkgname}-${version}-install/usr/lib/python2.7/lib-tk \
|
mv ${wrksrc}/${pkgname}-${version}-install/usr/lib/python2.7/lib-tk \
|
||||||
|
@ -80,9 +80,9 @@ idle-python_package() {
|
||||||
pycompile_module="idlelib"
|
pycompile_module="idlelib"
|
||||||
short_desc+=" - IDE for Python2 using Tkinter"
|
short_desc+=" - IDE for Python2 using Tkinter"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/idle
|
vmove usr/bin/idle${version%.*}
|
||||||
vmove usr/lib/python2.7/idlelib
|
vmove usr/lib/python${version%.*}/idlelib
|
||||||
vinstall ${FILESDIR}/idle.xpm 644 usr/share/pixmaps
|
vinstall ${FILESDIR}/idle${version%.*}.xpm 644 usr/share/pixmaps
|
||||||
vinstall ${FILESDIR}/idle.desktop 644 usr/share/applications
|
vinstall ${FILESDIR}/idle${version%.*}.desktop 644 usr/share/applications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
pkgname=python
|
pkgname=python
|
||||||
version=2.7.11
|
version=2.7.11
|
||||||
revision=7
|
revision=8
|
||||||
wrksrc="Python-${version}"
|
wrksrc="Python-${version}"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
makedepends="
|
makedepends="
|
||||||
|
@ -19,6 +19,14 @@ license="PSF"
|
||||||
distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.xz"
|
distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.xz"
|
||||||
checksum=962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46
|
checksum=962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46
|
||||||
|
|
||||||
|
alternatives="
|
||||||
|
python:idle:/usr/bin/idle2.7
|
||||||
|
python:2to3:/usr/bin/2to3-2.7
|
||||||
|
python:pydoc:/usr/bin/pydoc2.7
|
||||||
|
python:python:/usr/bin/python2.7
|
||||||
|
python:python2:/usr/bin/python2.7
|
||||||
|
python:python.1:/usr/share/man/man1/python2.7.1"
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
# Ensure that internal copies of expat, libffi and zlib are not used.
|
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||||
rm -r Modules/expat
|
rm -r Modules/expat
|
||||||
|
@ -56,8 +64,6 @@ do_build() {
|
||||||
do_install() {
|
do_install() {
|
||||||
export PATH="$PATH:$wrksrc/hostpython"
|
export PATH="$PATH:$wrksrc/hostpython"
|
||||||
make DESTDIR=${DESTDIR} altinstall
|
make DESTDIR=${DESTDIR} altinstall
|
||||||
ln -sf python2.7 ${DESTDIR}/usr/bin/python2
|
|
||||||
ln -sf python2.7 ${DESTDIR}/usr/bin/python
|
|
||||||
ln -sf python2.7-config ${DESTDIR}/usr/bin/python-config
|
ln -sf python2.7-config ${DESTDIR}/usr/bin/python-config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +71,8 @@ post_install() {
|
||||||
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
|
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
|
||||||
install -Dm644 LICENSE ${DESTDIR}/usr/share/licenses/python/LICENSE
|
install -Dm644 LICENSE ${DESTDIR}/usr/share/licenses/python/LICENSE
|
||||||
rm -f ${DESTDIR}/usr/bin/smtpd.py
|
rm -f ${DESTDIR}/usr/bin/smtpd.py
|
||||||
|
mv ${DESTDIR}/usr/bin/2to3{,-2.7}
|
||||||
|
mv ${DESTDIR}/usr/bin/pydoc{,2.7}
|
||||||
# Remove files that belong to python-tkinter and idle-python
|
# Remove files that belong to python-tkinter and idle-python
|
||||||
rm ${DESTDIR}/usr/bin/idle
|
rm ${DESTDIR}/usr/bin/idle
|
||||||
rm -r ${DESTDIR}/usr/lib/python2.7/idlelib
|
rm -r ${DESTDIR}/usr/lib/python2.7/idlelib
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue