MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / testCompiler

Function testCompiler

checkdeps.py:160–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158 PACKAGE_MANAGER[detectOS.result], COMPILING[detectOS.result])
159
160def testCompiler():
161 if not HAVE_SETUPTOOLS:
162 # silent, we can't test without setuptools
163 return True
164
165 bitmsghash = Extension(
166 'bitmsghash',
167 sources=['src/bitmsghash/bitmsghash.cpp'],
168 libraries=['pthread', 'crypto'],
169 )
170
171 dist = Distribution()
172 dist.ext_modules = [bitmsghash]
173 cmd = build_ext(dist)
174 cmd.initialize_options()
175 cmd.finalize_options()
176 cmd.force = True
177 try:
178 cmd.run()
179 except CompileError:
180 return False
181 else:
182 fullPath = os.path.join(cmd.build_lib, cmd.get_ext_filename("bitmsghash"))
183 return os.path.isfile(fullPath)
184
185detectOS.result = None
186prereqs = detectPrereqs()

Callers 1

checkdeps.pyFile · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected