django-cms / djangocms-bootstrap4

django CMS Bootstrap 4 is a plugin bundle for django CMS providing several components from the popular Bootstrap 4 framework.
https://www.django-cms.org/
Other
82 stars 58 forks source link

sdist tests #116

Open jayvdb opened 3 years ago

jayvdb commented 3 years ago

Hi, I am packaging Divio Django CMS packages for openSUSE, and I always want to run the tests in my builds to verify that the package is working, and breaks when dependencies become incompatible.

The tests in this repo are included in the sdist, which is great, but they can not be used. setup.py includes

test_suite='tests.settings.run'

However tests/settings/ are not included in the sdist.

The packaging is happening at https://build.opensuse.org/package/show/home:jayvdb:django/python-djangocms-bootstrap4

The collection of other Divio packages can be found at https://build.opensuse.org/project/show/home:jayvdb:django

I encountered similar problems with

And lots of packages don't include or declare their tests, such as djangocms-icon.

Also, all setup.py use license='BSD'. It would be nice if they used "BSD-3-Clause", the https://spdx.org identifier for the specific license being used.

FinalAngel commented 3 years ago

@jayvdb would removing the exclude=['tests'] from packages=find_packages(exclude=['tests']), in the setup.py file help?

jayvdb commented 3 years ago

No, that tell setuptools to include tests as part of the installed library, which is wrong. MANIFEST.in is the typical solution. There are alternatives, if using tools other than just setuptools. e.g. dephell automatically adds tests to the sdist.

FinalAngel commented 3 years ago

@jayvdb I'm happy for a PR suggestion that then can be applied to the other addons as well :)