actions.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/copyleft/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. def setup():
  10. #shelltools.system("echo -e '\033[0;36mBuilding Bzip2\033[0m' ")
  11. #shelltools.makedirs("%s/temp/lib" %get.workDIR())
  12. #shelltools.cd("bzip2-1.0.8")
  13. #autotools.make('CC=%s AR=%s RANLIB=%s CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC" libbz2.a' % (get.CC(), get.AR(), get.RANLIB(), get.CFLAGS()))
  14. #shelltools.system("cp libbz2.a %s/temp/lib/libbz2.a" % get.workDIR())
  15. #shelltools.cd("..")
  16. pisitools.flags.add("-fwrapv")
  17. pisitools.dosed("Lib/cgi.py","^#.* /usr/local/bin/python","#!/usr/bin/python")
  18. shelltools.unlinkDir("Modules/expat")
  19. #shelltools.unlinkDir("Modules/zlib")
  20. shelltools.unlinkDir("Modules/_ctypes/darwin")
  21. #shelltools.unlinkDir("Modules/_ctypes/libffi")
  22. #shelltools.unlinkDir("Modules/_ctypes/libffi_msvc")
  23. shelltools.unlinkDir("Modules/_ctypes/libffi_osx")
  24. # shelltools.unlinkDir("Modules/_decimal/libmpdec")
  25. #shelltools.export("CFLAGS", "-I%s/temp/include -O3" %get.workDIR())
  26. #shelltools.export("LDFLAGS", "-L%s/temp/lib -lbz2 -lpthread -ldl" %get.workDIR())
  27. # fix unused direct dependency analysis
  28. autotools.rawConfigure("LDSHARED='x86_64-pc-linux-gnu-gcc -Wl,-O1,--as-needed -shared -lpthread'\
  29. --prefix=/usr \
  30. --enable-shared \
  31. --with-computed-gotos \
  32. --enable-ipv6 \
  33. --with-system-expat \
  34. --with-dbmliborder=gdbm:ndbm \
  35. --with-system-ffi \
  36. --enable-loadable-sqlite-extensions \
  37. --with-tzpath=/usr/share/zoneinfo \
  38. --without-ensurepip")
  39. # --with-system-libmpdec \
  40. def build():
  41. autotools.make()
  42. def install():
  43. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  44. pisitools.remove("/usr/bin/2to3")
  45. pisitools.dodoc("LICENSE", "README.*")
  46. pisitools.removeDir("/usr/lib/python3.11/idlelib")
  47. pisitools.removeDir("/usr/lib/python3.11/tkinter")
  48. pisitools.removeDir("/usr/lib/python3.11/turtledemo")
  49. pisitools.remove("/usr/bin/idle3*")
  50. # pisitools.remove("/usr/lib/libpython3.11.a")