MCPcopy Create free account
hub / github.com/cztomczak/cefpython / compile_time_constants

Function compile_time_constants

tools/cython_setup.py:465–475  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

463
464
465def compile_time_constants():
466 print("[cython_setup.py] Generate compile_time_constants.pxi")
467 with open(os.path.join(SRC_DIR, "compile_time_constants.pxi"), "wb") as fo:
468 contents = "# This file was generated by setup.py\n"
469 # A way around Python 3.2 bug: UNAME_SYSNAME is not set
470 contents += 'DEF UNAME_SYSNAME = "%s"\n' % platform.uname()[0]
471 contents += 'DEF PY_MAJOR_VERSION = %s\n' % sys.version_info.major
472 contents += 'cdef extern from "limits.h":\n'
473 contents += ' cdef int INT_MIN\n'
474 contents += ' cdef int INT_MAX\n'
475 fo.write(contents.encode("utf-8"))
476
477
478if __name__ == "__main__":

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected