• python: setup.py: how NOT to install C extensions used only by tests

    From Bartosz Golaszewski@21:1/5 to All on Wed Nov 30 21:23:41 2022
    I have a module that has a tests/ directory which contains a C
    extension that's only used by test cases. I don't want to install it.
    I'm building it as a setuptools.Extension() added to setup() using the ext_modules argument. The test directory is not added to setup's
    packages argument. Even though none of the python sources from the
    tests/ directory gets installed when running setup.py install, the
    extension binary (and nothing else) is installed into
    site-packages/tests/. How can I prohibit setuptools from doing it?

    Best Regards,
    Bartosz Golaszewski

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)