A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
952 B

  1. from __future__ import print_function
  2. import os
  3. from subprocess import call, STDOUT
  4. ENVIRONMENTS = ["26", "27", "32", "33", "34"]
  5. def run(pyver, cmds):
  6. cmd = [r"C:\Python%s\Python.exe" % pyver, "setup.py"] + cmds
  7. print(" ".join(cmd), end=" ")
  8. with open("%s%s.log" % (cmds[0], pyver), "w") as logfile:
  9. retval = call(cmd, stdout=logfile, stderr=STDOUT, cwd="..")
  10. if not retval:
  11. print("[OK]")
  12. else:
  13. print("[FAILED (%i)]" % retval)
  14. return retval
  15. def main():
  16. path = os.path.split(__file__)[0]
  17. if path:
  18. os.chdir(path)
  19. print("Building Windows wheels for Python %s:" % ", ".join(ENVIRONMENTS))
  20. for pyver in ENVIRONMENTS:
  21. print()
  22. try:
  23. os.unlink("mwparserfromhell/parser/_tokenizer.pyd")
  24. except OSError:
  25. pass
  26. if run(pyver, ["test"]) == 0:
  27. run(pyver, ["bdist_wheel", "upload"])
  28. if __name__ == "__main__":
  29. main()