Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

11 views
Skip to first unread message

Bartosz Golaszewski

unread,
Nov 30, 2022, 3:24:16 PM11/30/22
to
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
0 new messages