#18685 closed Bug (duplicate)
Managements commands in multiple submodules in the same virtual package don't work
Reported by: | cberner | Owned by: | cberner |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
If you have commands in two packages, mypackage.A and mypackage.B which are installed from separate egg-link files (develop mode of setuptools), only the commands in the first package will be available at the django command line.
I've attached an example which shows the problem. To try it out, do the following:
1) run "python setup.py develop" in project-A/ and project-B/
2) run "python manage.py command_A" and "python manage.py command_B" in project-C/
Expected: both commands work
Actual: only command_A works
Attachments (1)
Change History (8)
by , 12 years ago
Attachment: | django-commands-develop.tar.gz added |
---|
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Component: | Uncategorized → Core (Management commands) |
---|---|
Has patch: | set |
Needs tests: | set |
Type: | Uncategorized → Bug |
Version: | 1.4 → master |
FWIW the patch can be found here.
comment:4 by , 12 years ago
Needs tests: | unset |
---|
Added a regression test. Let me know if there's anything else that's needed!
comment:5 by , 12 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
I've verified the attached bug demonstration - the fix looks good as pkgutil is more informed about package imports
however testing this is hard - I did some experiments with creating a test local site-packages-like folder with the .egg-link files with relative paths, but didn't work on my first try.
Current tests not working as implemented
link to patch above is stale as it was to a single commit - pull request is here https://github.com/django/django/pull/240/files
comment:6 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Duplicate of #18603 which has a more complete patch.
comment:7 by , 12 years ago
This is a duplicate of #14087.
for namespace package, you can try my patch: https://github.com/django/django/pull/178
Fixed this in my Github fork: git@…:cberner/django.git commit: be5eb957c2dfeea2ce64888359791d3554ce6607