Pkgfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Description: Python interpreter, version 3.
  2. # URL: https://www.python.org/
  3. # Maintainer: Abdullah Khan, ak at theak dot me
  4. # Depends on: bzip2 expat gdbm libffi libtirpc mpdecimal sqlite3 xz
  5. name=python3
  6. version=3.7.2
  7. release=1
  8. source=(https://www.python.org/ftp/python/3.7.2/Python-$version.tar.xz)
  9. build() {
  10. cd Python-$version
  11. rm -r Modules/expat
  12. rm -r Modules/_ctypes/{darwin,libffi}*
  13. rm -r Modules/_decimal/libmpdec
  14. ./configure --prefix=/usr \
  15. --enable-shared \
  16. --enable-ipv6 \
  17. --enable-loadable-sqlite-extensions \
  18. --with-computed-gotos \
  19. --with-threads \
  20. --with-system-expat \
  21. --with-system-ffi \
  22. --with-system-libmpdec \
  23. --without-ensurepip
  24. make
  25. make -j1 DESTDIR=$PKG altinstall maninstall
  26. ln -s python${version%.*} $PKG/usr/bin/python3
  27. ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
  28. ln -s idle${version%.*} $PKG/usr/bin/idle3
  29. ln -s pydoc${version%.*} $PKG/usr/bin/pydoc3
  30. ln -s python${version%.*} $PKG/usr/lib/$name
  31. rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
  32. rm $PKG/usr/lib/python${version%.*}/distutils/README
  33. rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
  34. rm $PKG/usr/lib/python${version%.*}/idlelib/{README.txt,TODO.txt,idle_test/README.txt}
  35. rm $PKG/usr/lib/python${version%.*}/lib2to3/tests/data/README
  36. rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
  37. rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
  38. rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
  39. }