MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / main

Function main

scripts/gh_release.py:100–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98
99
100def main():
101
102 log( '### main():')
103 log(f'{platform.platform()=}')
104 log(f'{platform.python_version()=}')
105 log(f'{platform.architecture()=}')
106 log(f'{platform.machine()=}')
107 log(f'{platform.processor()=}')
108 log(f'{platform.release()=}')
109 log(f'{platform.system()=}')
110 log(f'{platform.version()=}')
111 log(f'{platform.uname()=}')
112 log(f'{sys.executable=}')
113 log(f'{sys.maxsize=}')
114 log(f'sys.argv ({len(sys.argv)}):')
115 for i, arg in enumerate(sys.argv):
116 log(f' {i}: {arg!r}')
117 log(f'os.environ ({len(os.environ)}):')
118 for k in sorted( os.environ.keys()):
119 v = os.environ[ k]
120 log( f' {k}: {v!r}')
121
122 if test_py.github_workflow_unimportant():
123 return
124
125 valgrind = False
126 if len( sys.argv) == 1:
127 args = iter( ['build'])
128 else:
129 args = iter( sys.argv[1:])
130 while 1:
131 try:
132 arg = next(args)
133 except StopIteration:
134 break
135 if arg == 'build':
136 build(valgrind=valgrind)
137 elif arg == 'build-devel':
138 if platform.system() == 'Linux':
139 p = 'linux'
140 elif platform.system() == 'Windows':
141 p = 'windows'
142 elif platform.system() == 'Darwin':
143 p = 'macos'
144 else:
145 assert 0, f'Unrecognised {platform.system()=}'
146 build(platform_=p)
147 elif arg == 'pip_install':
148 prefix = next(args)
149 d = os.path.dirname(prefix)
150 log( f'{prefix=}')
151 log( f'{d=}')
152 for leaf in os.listdir(d):
153 log( f' {d}/{leaf}')
154 pattern = f'{prefix}-*{platform_tag()}.whl'
155 paths = glob.glob( pattern)
156 log( f'{pattern=} {paths=}')
157 # Follow pipcl.py and look at AUDITWHEEL_PLAT. This allows us to

Callers 1

gh_release.pyFile · 0.70

Calls 8

platform_tagFunction · 0.85
venvFunction · 0.85
buildFunction · 0.70
runFunction · 0.70
testFunction · 0.70
logFunction · 0.50
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…