actions.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 pythonmodules
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. WorkDir = "numpy-%s" % get.srcVERSION()
  11. NUMPY_FCONFIG = "config_fc --fcompiler=gnu95"
  12. shelltools.export("ATLAS", "None")
  13. shelltools.export("PTATLAS", "None")
  14. shelltools.export("LDSHARED", "x86_64-pc-linux-gnu-gcc -Wl,-O1,--as-needed -shared -lpthread")
  15. def build():
  16. # suppress compiler warnings
  17. pisitools.cflags.add("-Wno-unused-but-set-variable -Wno-builtin-declaration-mismatch \
  18. -Wno-unused-value -Wno-unused-variable -Wno-unknown-pragmas \
  19. -Wno-strict-prototypes -Wno-implicit-int -Wno-return-type \
  20. -Wno-unused-function")
  21. pythonmodules.compile(NUMPY_FCONFIG)
  22. def install():
  23. # suppress compiler warnings
  24. pisitools.cflags.add("-Wno-builtin-declaration-mismatch")
  25. pythonmodules.install(NUMPY_FCONFIG)
  26. pisitools.rename("/usr/bin/f2py", "f2py-py2")
  27. pisitools.dodoc("LICENSE*")
  28. for dirs in ["doc"]:
  29. pisitools.insinto("%s/%s" % (get.docDIR(), get.srcNAME()), dirs)