summaryrefslogtreecommitdiff
path: root/python3/Pkgfile
blob: f72ff2b7ce358ff89ea3a12f562a0c5807cc4dc9 (plain)
    1 # Description: Python interpreter, version 3.
    2 # URL: https://www.python.org/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: bzip2 expat gdbm libffi libtirpc mpdecimal sqlite3 xz
    5 
    6 name=python3
    7 version=3.7.8
    8 release=1
    9 source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
   10 
   11 build() {
   12     cd Python-$version
   13 
   14     # Ensure that we are using the system copy of various libraries
   15     rm -r Modules/expat
   16     rm -r Modules/_ctypes/{darwin,libffi}*
   17     rm -r Modules/_decimal/libmpdec
   18 
   19     # Remove tests
   20     rm -r Lib/{test,{ctypes,sqlite3,tkinter,unittest}/test}
   21     rm -r Lib/{{distutils,lib2to3}/tests,idlelib/idle_test}
   22 
   23     ./configure --prefix=/usr \
   24 		--enable-shared \
   25 		--enable-ipv6 \
   26 		--enable-loadable-sqlite-extensions \
   27 		--with-computed-gotos \
   28 		--with-threads \
   29 		--with-system-expat \
   30 		--with-system-ffi \
   31 		--with-system-libmpdec \
   32 		--without-ensurepip
   33 
   34     make
   35     make -j1 DESTDIR=$PKG altinstall maninstall
   36 
   37     ln -s 2to3-${version%.*}         $PKG/usr/bin/2to3
   38     ln -s python${version%.*}        $PKG/usr/bin/python3
   39     ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
   40     ln -s python${version%.*}m-config $PKG/usr/bin/python${version%.*}-config
   41     ln -s idle${version%.*}          $PKG/usr/bin/idle3
   42     ln -s pydoc${version%.*}         $PKG/usr/bin/pydoc3
   43     ln -s python${version%.*}        $PKG/usr/lib/$name
   44     ln -s python-${version%.*}.pc    $PKG/usr/lib/pkgconfig/python3.pc
   45     ln -s python${version%.*}m       $PKG/usr/include/python${version%.*}
   46 
   47     rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
   48     rm $PKG/usr/lib/python${version%.*}/distutils/README
   49     rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
   50     rm $PKG/usr/lib/python${version%.*}/idlelib/{README,TODO,CREDITS,HISTORY}.txt
   51     rm $PKG/usr/lib/python${version%.*}/idlelib/Icons/README.txt
   52     rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
   53 }

Generated by cgit