Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

django-commands-develop.tar.gz (5.1 KB ) - added by cberner 12 years ago.

Download all attachments as: .zip

Change History (8)

by cberner, 12 years ago

comment:1 by cberner, 12 years ago

Owner: changed from nobody to cberner
Status: newassigned

comment:2 by cberner, 12 years ago

Fixed this in my Github fork: git@…:cberner/django.git commit: be5eb957c2dfeea2ce64888359791d3554ce6607

comment:3 by Simon Charette, 12 years ago

Component: UncategorizedCore (Management commands)
Has patch: set
Needs tests: set
Type: UncategorizedBug
Version: 1.4master

FWIW the patch can be found here.

comment:4 by cberner, 12 years ago

Needs tests: unset

Added a regression test. Let me know if there's anything else that's needed!

Version 0, edited 12 years ago by cberner (next)

comment:5 by Preston Holmes, 12 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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 Jannis Leidel, 12 years ago

Resolution: duplicate
Status: assignedclosed

Duplicate of #18603 which has a more complete patch.

comment:7 by bhuztez, 12 years ago

This is a duplicate of #14087.

for namespace package, you can try my patch: https://github.com/django/django/pull/178

Note: See TracTickets for help on using tickets.
Back to Top