python3 revolution
This commit is contained in:
1 parent
de4e838a9e
commit
c8acb70aa8
4 files changed
+103
-35
No files matched your search
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ "$1" != "" ] ; then
|
||||||
|
version="$1"
|
||||||
|
if [ ! -f /usr/bin/python$version ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -L /usr/bin/python3 ] ; then
|
||||||
|
rm -f /usr/bin/pydoc3
|
||||||
|
rm -f /usr/bin/python3
|
||||||
|
rm -f /usr/bin/python
|
||||||
|
rm -f /usr/bin/idle3
|
||||||
|
rm -f /usr/bin/python3-config
|
||||||
|
rm -f /usr/bin/2to3
|
||||||
|
rm -f /usr/bin/pip3
|
||||||
|
rm -f /usr/bin/pip
|
||||||
|
fi
|
||||||
|
ln -s pydoc$version /usr/bin/pydoc3
|
||||||
|
ln -s python$version /usr/bin/python3
|
||||||
|
ln -s python$version /usr/bin/python
|
||||||
|
ln -s idle$version /usr/bin/idle3
|
||||||
|
ln -s python$version-config /usr/bin/python3-config
|
||||||
|
ln -s 2to3-$version /usr/bin/2to3
|
||||||
|
ln -s pip$version /usr/bin/pip3
|
||||||
|
ln -s pip$version /usr/bin/pip
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
+14
-35
@@ -1,43 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
name='python'
|
name='python'
|
||||||
release='1'
|
release='1'
|
||||||
version='3.10.8'
|
version='3.10'
|
||||||
url='https://www.python.org/downloads/'
|
url='https://gitlab.com/sulix'
|
||||||
description='Next generation of the python high-level scripting language'
|
description='Python meta package'
|
||||||
email='parduscix@yandex.ru'
|
email='aliriza.keskin@pardus.org.tr'
|
||||||
maintainer='sulincix'
|
maintainer='aliriza'
|
||||||
license=('custom')
|
license=('GPLv3')
|
||||||
source=("https://www.python.org/ftp/python/$version/Python-$version.tar.xz")
|
source=('pydefault')
|
||||||
depends=('bzip2' 'gdbm' 'libnsl' 'libxcrypt' 'openssl' 'zlib' 'sqlite')
|
depends=(python3.10)
|
||||||
makedepends=( )
|
makedepends=()
|
||||||
md5sums=('e92356b012ed4d0e09675131d39b1bde')
|
md5sums=('SKIP')
|
||||||
uses=(expat ffi)
|
uses=()
|
||||||
ffi_depends=('libffi')
|
|
||||||
expat_depends=('expat')
|
|
||||||
arch=('x86_64')
|
|
||||||
group=(dev.lang)
|
group=(dev.lang)
|
||||||
|
arch=('x86_64')
|
||||||
export CFLAGS="-O2 -s"
|
|
||||||
export CXXFLAGS="-O2 -s"
|
|
||||||
|
|
||||||
|
|
||||||
cd Python-$version
|
|
||||||
|
|
||||||
setup(){
|
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
|
||||||
--libdir=/usr/lib64 \
|
|
||||||
--enable-shared \
|
|
||||||
$(use_opt expat --with-system-expat "") \
|
|
||||||
$(use_opt ffi --with-system-ffi "") \
|
|
||||||
--enable-optimizations
|
|
||||||
}
|
|
||||||
|
|
||||||
build(){
|
|
||||||
make -j`nproc`
|
|
||||||
}
|
|
||||||
|
|
||||||
package(){
|
package(){
|
||||||
make install -j`nproc`
|
mkdir -p ${DESTDIR}/usr/bin/
|
||||||
|
install pydefault ${DESTDIR}/usr/bin/
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
--- a/Lib/site.py 2019-09-06 23:59:43.080736298 +0300
|
||||||
|
+++ b/Lib/site.py 2019-09-07 00:01:05.134165490 +0300
|
||||||
|
@@ -337,7 +337,8 @@
|
||||||
|
libdirs = [sys.platlibdir]
|
||||||
|
if sys.platlibdir != "lib":
|
||||||
|
libdirs.append("lib")
|
||||||
|
+ sitepackages.insert(0, os.path.join(prefix, "share", "python3"))
|
||||||
|
+ sitepackages.insert(0, os.path.join(prefix, "lib", "python3"))
|
||||||
|
-
|
||||||
|
if os.sep == '/':
|
||||||
|
for libdir in libdirs:
|
||||||
|
path = os.path.join(prefix, libdir,
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
name='python3.10'
|
||||||
|
release='1'
|
||||||
|
version='3.10.8'
|
||||||
|
url='https://www.python.org/downloads/'
|
||||||
|
description='Next generation of the python high-level scripting language'
|
||||||
|
email='parduscix@yandex.ru'
|
||||||
|
maintainer='sulincix'
|
||||||
|
license=('custom')
|
||||||
|
source=("https://www.python.org/ftp/python/$version/Python-$version.tar.xz"
|
||||||
|
'sulix.patch')
|
||||||
|
depends=('bzip2' 'gdbm' 'libnsl' 'libxcrypt' 'openssl' 'zlib' 'sqlite')
|
||||||
|
makedepends=( )
|
||||||
|
md5sums=('e92356b012ed4d0e09675131d39b1bde'
|
||||||
|
'SKIP')
|
||||||
|
uses=(expat ffi)
|
||||||
|
ffi_depends=('libffi')
|
||||||
|
expat_depends=('expat')
|
||||||
|
arch=('x86_64')
|
||||||
|
group=(dev.lang python)
|
||||||
|
|
||||||
|
export CFLAGS="-O2 -s"
|
||||||
|
export CXXFLAGS="-O2 -s"
|
||||||
|
|
||||||
|
|
||||||
|
cd Python-$version
|
||||||
|
|
||||||
|
setup(){
|
||||||
|
patch -Np1 -i "../sulix.patch"
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--libdir=/usr/lib64 \
|
||||||
|
--enable-shared \
|
||||||
|
$(use_opt expat --with-system-expat "") \
|
||||||
|
$(use_opt ffi --with-system-ffi "") \
|
||||||
|
--enable-optimizations
|
||||||
|
}
|
||||||
|
|
||||||
|
build(){
|
||||||
|
make -j`nproc`
|
||||||
|
}
|
||||||
|
|
||||||
|
package(){
|
||||||
|
make install -j`nproc`
|
||||||
|
# this symlinks provided by main python metapackage
|
||||||
|
for bin in pydoc3 idle3 python3 python3-config pip3 2to3; do
|
||||||
|
rm -f ${DESTDIR}/usr/bin/$bin
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user