actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import pythonmodules
  9. WorkDir="setuptools-%s" % get.srcVERSION()
  10. shelltools.export("SETUPTOOLS_SCM_PRETEND_VERSION","75.8.2")
  11. #def setup():
  12. #shelltools.makedirs("%s/setuptools-54.2.0/build/scripts-3.8" % get.workDIR())
  13. def build():
  14. # shelltools.system("export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0")
  15. pythonmodules.compile(pyVer="3")
  16. def install():
  17. pythonmodules.install(pyVer="3")
  18. pisitools.removeDir("/usr/lib/python3.11/site-packages/setuptools/_vendor")
  19. # pisitools.removeDir("/usr/lib/python3.11/site-packages/pkg_resources/_vendor")
  20. # pisitools.removeDir("/usr/lib/python3.11/site-packages/setuptools/extern")
  21. # pisitools.removeDir("/usr/lib/python3.11/site-packages/pkg_resources/extern")
  22. shelltools.system("find %s -name '*.py' -exec sed \
  23. -e 's:from \w*[.]\+extern ::' -e 's:\w*[.]\+extern[.]::' \
  24. -i {} + || die" % get.installDIR())