gh-94751: Install, import and run the test C++ extension (MVP) (GH-94754)

This is a quick-and-dirty way to run the C++ tests.
It can definitely be improved in the future, but it should fail when things go wrong.

- Run test functions on import (yes, this can definitely be improved)
- Fudge setuptools metadata (name & version) to make the extension installable
- Install and import the extension in test_cppext
This commit is contained in:
Petr Viktorin 2022-07-12 17:06:05 +02:00 committed by GitHub
parent cfafd3adf8
commit ec5db539b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 17 deletions

View file

@ -46,7 +46,7 @@ def main():
sources=[SOURCE],
language='c++',
extra_compile_args=cppflags)
setup(name=name, ext_modules=[cpp_ext])
setup(name='internal' + name, version='0.0', ext_modules=[cpp_ext])
if __name__ == "__main__":