daphne icon indicating copy to clipboard operation
daphne copied to clipboard

Fix package missing management folder(#508)

Open 1One0 opened this issue 10 months ago • 6 comments

In setup.cfg

packages = find: was changed to

packages =
    daphne    
    twisted.plugins

When manually list packages, should enumerate all the packages

packages =
    daphne
    daphne.management
    twisted.plugins

1One0 avatar Apr 11 '24 07:04 1One0

Thanks for this @1One0

commands is a package too no?

I was wondering if we could fix the find: by setting package_dirs 🤔 (Looking at the daphne-4.1.x-py3-none-any.whl/daphne-4.1.x.dist-info/top_level.txt in the wheel is what differs from 4.0)

carltongibson avatar Apr 11 '24 09:04 carltongibson

Screenshot 2024-04-11 at 11 32 32

Built wheel missing the commands package. We could add that as well, but I'd rather fix the find:.

carltongibson avatar Apr 11 '24 09:04 carltongibson

What about add a extra daphne.management.commands?

Or move the dir /daphne/twisted/plugin to /twisted/plugin then can easily use:

package_dir =
packages =find:

The problem is hard to change top-level with setup.cfg, it will be easier when use setup.py.

1One0 avatar Apr 11 '24 09:04 1One0

Another take on this in #510.

If you checkout the branch you can python -m build and then inspect the wheel to see both the twisted plugin and the Daphne subpackages picked up.

carltongibson avatar Apr 11 '24 10:04 carltongibson

oh i see, and this problem is exist earlier, it happend when changefind: I will try to find a way to fix that...

1One0 avatar Apr 11 '24 10:04 1One0

@1One0 I think #510 is correct no? Can you test to confirm?

carltongibson avatar Apr 11 '24 10:04 carltongibson