keeping the tests out of the wheel

24 views
Skip to first unread message

Gerhard Schmidt

unread,
Oct 26, 2021, 7:56:21 AM10/26/21
to pylons-discuss
Hi,

I'm using pyramid for some web application. I .whl files to install the
application inside a container.

It is working perfectly. But setup.py bdist_wheel always add the
unittests to the wheel. Unittests reside in the tests folder in the same
folder as the application folder. So the tests get added in the root
folder of the wheel and when extracted. They are places in the
site_packages folder.

How can I prevent the tests to be added.

I tried

packages=find_packages(exclude=('tests',)),

They still are added

i tried

packages=['<packagename>']

The are not included. But some other folders like locale are missing now.

i tried why Manifest.in. No success there either.

Can someone give me some pointers, what I'm missing.

regards
Estartu

Jonathan Vanasco

unread,
Oct 26, 2021, 4:15:57 PM10/26/21
to pylons-discuss
About a year ago, I moved all my projects to the pattern that Pyramid uses itself...

* /src/PROJECT
* /tests
* /MANIFEST.in
* /pyproject.toml
* /setup.cfg
* /setup.py
* /tox.ini

That has eliminated 99% of the packaging issues I've encountered in the past.

IIRC, that became the standardized repo design for Python projects a few years ago, due to constant issues in package/file discovery.
Reply all
Reply to author
Forward
0 new messages