python: rename to python2, convert to metapackage
metapackage points at 2.7 for now, but will change at a later date closes #38229
This commit is contained in:
parent
355a485cb1
commit
8542e24758
|
@ -0,0 +1 @@
|
||||||
|
python2-tkinter
|
|
@ -1 +0,0 @@
|
||||||
../../python/files/cross.patch
|
|
|
@ -1 +0,0 @@
|
||||||
../python/update
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
This package will install python3 soon. If you wish to keep Python 2,
|
||||||
|
mark python2 as manually installed with xbps-pkgdb(1).
|
|
@ -1,114 +1,16 @@
|
||||||
# Template file for 'python'
|
# Template file for 'python'
|
||||||
#
|
|
||||||
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python-tkinter".
|
|
||||||
#
|
|
||||||
pkgname=python
|
pkgname=python
|
||||||
version=2.7.18.9
|
version=2.7.9999
|
||||||
revision=2
|
revision=1
|
||||||
_commit=76f11e17a26f8cc28f8336303b26cb503710fa7d
|
build_style=meta
|
||||||
pycompile_dirs="usr/lib/python2.7"
|
depends="python${version%%.*}"
|
||||||
hostmakedepends="pkg-config"
|
short_desc="Python programming language (metapackage)"
|
||||||
makedepends="libffi-devel readline-devel gdbm-devel openssl-devel expat-devel
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
sqlite-devel bzip2-devel zlib-devel"
|
license="Public Domain"
|
||||||
depends="ca-certificates"
|
|
||||||
short_desc="Interpreted, interactive, object-oriented programming language"
|
|
||||||
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
||||||
license="Python-2.0"
|
|
||||||
homepage="https://www.python.org"
|
homepage="https://www.python.org"
|
||||||
distfiles="https://github.com/ActiveState/cpython/archive/${_commit}.tar.gz"
|
|
||||||
checksum=1297e71396f5b58404157d9c6ebf5ac49dddcbad098ecda9d72570f5c7d207e4
|
|
||||||
|
|
||||||
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:python.1:/usr/share/man/man1/python2.7.1"
|
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
|
||||||
makedepends+=" libxcrypt-devel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pre_configure() {
|
|
||||||
# Ensure that internal copies of expat and libffi are not used.
|
|
||||||
rm -r Modules/expat
|
|
||||||
rm -r Modules/_ctypes/libffi*
|
|
||||||
# Enable loading sqlite extensions.
|
|
||||||
vsed -i '/SQLITE_OMIT_LOAD_EXTENSION/d' setup.py
|
|
||||||
}
|
|
||||||
|
|
||||||
do_configure() {
|
|
||||||
local _args
|
|
||||||
unset GCC CC CXX CPP LD AR AS RANLIB
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
|
||||||
mkdir -p host-build
|
|
||||||
cd host-build
|
|
||||||
env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH ../configure
|
|
||||||
env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH make ${makejobs} python
|
|
||||||
mkdir -p ../hostpython
|
|
||||||
mv python ../hostpython
|
|
||||||
cd ..
|
|
||||||
patch -Np0 -i ${FILESDIR}/cross.patch
|
|
||||||
_args="--build=${XBPS_MACHINE%%-musl}"
|
|
||||||
fi
|
|
||||||
./configure ${configure_args} ${_args} \
|
|
||||||
--enable-shared --enable-ipv6 --with-threads --enable-unicode=ucs4 \
|
|
||||||
--with-computed-gotos --with-wctype-functions --with-dbmliborder=gdbm:ndbm \
|
|
||||||
--with-system-expat --with-system-ffi --without-ensurepip
|
|
||||||
}
|
|
||||||
|
|
||||||
do_build() {
|
|
||||||
export PATH="$PATH:$wrksrc/hostpython"
|
|
||||||
export AS_DEPENDENCIES_DIR="${XBPS_CROSS_BASE}/"
|
|
||||||
make ${makejobs}
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
export PATH="$PATH:$wrksrc/hostpython"
|
|
||||||
make DESTDIR=${DESTDIR} altinstall
|
|
||||||
ln -sf pydoc2.7 ${DESTDIR}/usr/bin/pydoc2
|
|
||||||
ln -sf python2.7 ${DESTDIR}/usr/bin/python2
|
|
||||||
ln -sf python2.7-config ${DESTDIR}/usr/bin/python-config
|
|
||||||
ln -sf python2.7-config ${DESTDIR}/usr/bin/python2-config
|
|
||||||
ln -sf python2.7.1 ${DESTDIR}/usr/share/man/man1/python2.1
|
|
||||||
ln -sf python-2.7.pc ${DESTDIR}/usr/lib/pkgconfig/python2.pc
|
|
||||||
}
|
|
||||||
|
|
||||||
post_install() {
|
|
||||||
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
|
|
||||||
vlicense LICENSE
|
|
||||||
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
|
|
||||||
rm ${DESTDIR}/usr/bin/idle
|
|
||||||
rm -r ${DESTDIR}/usr/lib/python2.7/idlelib
|
|
||||||
rm -r ${DESTDIR}/usr/lib/python2.7/lib-tk
|
|
||||||
# Remove test module and tests that fail to be byte-compiled.
|
|
||||||
rm -r ${DESTDIR}/usr/lib/python2.7/test
|
|
||||||
rm -r ${DESTDIR}/usr/lib/python2.7/lib2to3/tests
|
|
||||||
# Remove references to the install(1) wrapper.
|
|
||||||
vsed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \
|
|
||||||
${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
|
|
||||||
${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
|
||||||
# Remove references to cross toolchain.
|
|
||||||
vsed -i "s/$XBPS_CROSS_TRIPLET-//g" \
|
|
||||||
${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
|
|
||||||
${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
python-devel_package() {
|
python-devel_package() {
|
||||||
depends="${sourcepkg}>=${version}_${revision}"
|
depends="python${version%%.*}-devel"
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
pkg_install() {
|
build_style=meta
|
||||||
vmove usr/bin/python*-config
|
|
||||||
vmove usr/lib/pkgconfig
|
|
||||||
vmove usr/include
|
|
||||||
vmove usr/lib/python2.7/config/libpython2.7.a
|
|
||||||
mkdir -p ${DESTDIR}/usr/include/python2.7
|
|
||||||
mv ${PKGDESTDIR}/usr/include/python2.7/pyconfig.h \
|
|
||||||
${DESTDIR}/usr/include/python2.7
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
python2
|
|
@ -0,0 +1 @@
|
||||||
|
../../python2/files/cross.patch
|
|
@ -1,12 +1,12 @@
|
||||||
# Template file for 'python-tkinter'
|
# Template file for 'python2-tkinter'
|
||||||
#
|
#
|
||||||
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python"; IT IS SPLITTED TO AVOID
|
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python2"; IT IS SPLITTED TO AVOID
|
||||||
# A CYCLIC DEPENDENCY: python -> tk -> libX11 -> libxcb -> xcb-proto -> python
|
# A CYCLIC DEPENDENCY: python2 -> tk -> libX11 -> libxcb -> xcb-proto -> python2
|
||||||
#
|
#
|
||||||
|
|
||||||
_desc="Interpreted, interactive, object-oriented programming language"
|
_desc="Interpreted, interactive, object-oriented programming language"
|
||||||
|
|
||||||
pkgname=python-tkinter
|
pkgname=python2-tkinter
|
||||||
version=2.7.18.9
|
version=2.7.18.9
|
||||||
revision=2
|
revision=2
|
||||||
_commit=76f11e17a26f8cc28f8336303b26cb503710fa7d
|
_commit=76f11e17a26f8cc28f8336303b26cb503710fa7d
|
||||||
|
@ -88,3 +88,9 @@ idle-python_package() {
|
||||||
vinstall ${FILESDIR}/idle2.desktop 644 usr/share/applications
|
vinstall ${FILESDIR}/idle2.desktop 644 usr/share/applications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
python-tkinter_package() {
|
||||||
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
short_desc+=" (transitional dummy package)"
|
||||||
|
build_style=meta
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
../python2/update
|
|
@ -0,0 +1,116 @@
|
||||||
|
# Template file for 'python2'
|
||||||
|
#
|
||||||
|
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/python2-tkinter".
|
||||||
|
#
|
||||||
|
pkgname=python2
|
||||||
|
version=2.7.18.9
|
||||||
|
revision=2
|
||||||
|
_commit=76f11e17a26f8cc28f8336303b26cb503710fa7d
|
||||||
|
pycompile_dirs="usr/lib/python2.7"
|
||||||
|
hostmakedepends="pkg-config"
|
||||||
|
makedepends="libffi-devel readline-devel gdbm-devel openssl-devel expat-devel
|
||||||
|
sqlite-devel bzip2-devel zlib-devel"
|
||||||
|
depends="ca-certificates"
|
||||||
|
short_desc="Interpreted, interactive, object-oriented programming language"
|
||||||
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
||||||
|
license="Python-2.0"
|
||||||
|
homepage="https://www.python.org"
|
||||||
|
distfiles="https://github.com/ActiveState/cpython/archive/${_commit}.tar.gz"
|
||||||
|
checksum=1297e71396f5b58404157d9c6ebf5ac49dddcbad098ecda9d72570f5c7d207e4
|
||||||
|
|
||||||
|
short_desc+=" (limited install; not for regular use)"
|
||||||
|
|
||||||
|
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:python.1:/usr/share/man/man1/python2.7.1"
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
||||||
|
makedepends+=" libxcrypt-devel"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
# Ensure that internal copies of expat and libffi are not used.
|
||||||
|
rm -r Modules/expat
|
||||||
|
rm -r Modules/_ctypes/libffi*
|
||||||
|
# Enable loading sqlite extensions.
|
||||||
|
vsed -i '/SQLITE_OMIT_LOAD_EXTENSION/d' setup.py
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
local _args
|
||||||
|
unset GCC CC CXX CPP LD AR AS RANLIB
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
mkdir -p host-build
|
||||||
|
cd host-build
|
||||||
|
env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH ../configure
|
||||||
|
env -i PATH=$PATH XBPS_ARCH=$XBPS_ARCH make ${makejobs} python
|
||||||
|
mkdir -p ../hostpython
|
||||||
|
mv python ../hostpython
|
||||||
|
cd ..
|
||||||
|
patch -Np0 -i ${FILESDIR}/cross.patch
|
||||||
|
_args="--build=${XBPS_MACHINE%%-musl}"
|
||||||
|
fi
|
||||||
|
./configure ${configure_args} ${_args} \
|
||||||
|
--enable-shared --enable-ipv6 --with-threads --enable-unicode=ucs4 \
|
||||||
|
--with-computed-gotos --with-wctype-functions --with-dbmliborder=gdbm:ndbm \
|
||||||
|
--with-system-expat --with-system-ffi --without-ensurepip
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
export PATH="$PATH:$wrksrc/hostpython"
|
||||||
|
export AS_DEPENDENCIES_DIR="${XBPS_CROSS_BASE}/"
|
||||||
|
make ${makejobs}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
export PATH="$PATH:$wrksrc/hostpython"
|
||||||
|
make DESTDIR=${DESTDIR} altinstall
|
||||||
|
ln -sf pydoc2.7 ${DESTDIR}/usr/bin/pydoc2
|
||||||
|
ln -sf python2.7 ${DESTDIR}/usr/bin/python2
|
||||||
|
ln -sf python2.7-config ${DESTDIR}/usr/bin/python-config
|
||||||
|
ln -sf python2.7-config ${DESTDIR}/usr/bin/python2-config
|
||||||
|
ln -sf python2.7.1 ${DESTDIR}/usr/share/man/man1/python2.1
|
||||||
|
ln -sf python-2.7.pc ${DESTDIR}/usr/lib/pkgconfig/python2.pc
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
|
||||||
|
vlicense LICENSE
|
||||||
|
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
|
||||||
|
rm ${DESTDIR}/usr/bin/idle
|
||||||
|
rm -r ${DESTDIR}/usr/lib/python2.7/idlelib
|
||||||
|
rm -r ${DESTDIR}/usr/lib/python2.7/lib-tk
|
||||||
|
# Remove test module and tests that fail to be byte-compiled.
|
||||||
|
rm -r ${DESTDIR}/usr/lib/python2.7/test
|
||||||
|
rm -r ${DESTDIR}/usr/lib/python2.7/lib2to3/tests
|
||||||
|
# Remove references to the install(1) wrapper.
|
||||||
|
vsed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \
|
||||||
|
${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
|
||||||
|
${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
# Remove references to cross toolchain.
|
||||||
|
vsed -i "s/$XBPS_CROSS_TRIPLET-//g" \
|
||||||
|
${DESTDIR}/usr/lib/python${version%.*.*}/_sysconfigdata.py \
|
||||||
|
${DESTDIR}/usr/lib/python${version%.*.*}/config/Makefile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
python2-devel_package() {
|
||||||
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
short_desc+=" - development files"
|
||||||
|
pkg_install() {
|
||||||
|
vmove usr/bin/python*-config
|
||||||
|
vmove usr/lib/pkgconfig
|
||||||
|
vmove usr/include
|
||||||
|
vmove usr/lib/python2.7/config/libpython2.7.a
|
||||||
|
mkdir -p ${DESTDIR}/usr/include/python2.7
|
||||||
|
mv ${PKGDESTDIR}/usr/include/python2.7/pyconfig.h \
|
||||||
|
${DESTDIR}/usr/include/python2.7
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue