actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import pythonmodules
  10. from pisi.actionsapi import get
  11. #WorkDir = "sip-%s" % get.srcVERSION()
  12. def setup():
  13. shelltools.cd("%s" % get.workDIR())
  14. shelltools.cd("sip-%s" % get.srcVERSION())
  15. shelltools.copytree("../sip-%s" % (get.srcVERSION().replace("_", "~")), "../sip-%s-pyqt5" % get.srcVERSION())
  16. pythonmodules.run('configure.py CFLAGS+="%s" CXXFLAGS+="%s"' % (get.CFLAGS(), get.CXXFLAGS()))
  17. shelltools.cd("../sip-%s-pyqt5" % get.srcVERSION())
  18. pythonmodules.run('configure.py CFLAGS+="%s" CXXFLAGS+="%s" --sip-module PyQt5.sip --no-tools' % (get.CFLAGS(), get.CXXFLAGS()))
  19. def build():
  20. autotools.make()
  21. shelltools.cd("../sip-%s-pyqt5" % get.srcVERSION())
  22. autotools.make()
  23. def install():
  24. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  25. shelltools.cd("../sip-%s-pyqt5" % get.srcVERSION())
  26. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  27. pisitools.rename("/usr/bin/sip", "py2sip")