emencia / django-blog-lotus

A weblog application with Django.
https://django-blog-lotus.readthedocs.io/
MIT License
5 stars 1 forks source link

Management commands are not shipped in package #48

Closed sveetch closed 1 year ago

sveetch commented 1 year ago

Describe the bug Installed Lotus into a project then tried to use command "lotus_demo" to add some demo data and Django failed to find it:

Unknown command: 'lotus_demo'
Type 'manage.py help' for usage.

Environment Describe your environment:

To Reproduce

  1. Install lotus into a project
  2. Once properly installed, try to use command "lotus_demo"
  3. Django fails to find this command although Lotus is working and correctly installed;

Expected behavior I would expect to be able to use the command.

When digging to find a reason, i found that the management directory is unexpectedly missing from build package. I installed Lotus 0.5.0 and lookup into the package from the same version as it is available from Pypi.

That's weird since this command exist since before the 0.5.0.

sveetch commented 1 year ago

May try to debug with 'setup.py sdist', also the command would need to be ping tested to avoid this kind of issue.

sveetch commented 1 year ago

This is fixed in 0.5.1-pre.7

It was missing because the management/ directory missed __init__.py files, although Django does not require it, it is needed for setuptool to collect the directory without to force it from MANIFEST.in. I prefer to use this more natural technique instead of forcing rules from package MANIFEST.in.

sveetch commented 1 year ago

Sadly this command can not be easily tested since it does not have any required argument or a dry-run mode, so if we execute it, this will run creations of many objects and take some minutes to finish.