#6013: management.find_commands makes distribute django app difficultly.
-----------------------+----------------------------------------------------
Reporter:  bear330     |       Owner:  nobody        
  Status:  new         |   Component:  Core framework
 Version:  SVN         |    Keywords:                
   Stage:  Unreviewed  |   Has_patch:  0             
-----------------------+----------------------------------------------------
 django.core.management.find_commands only searches the commands that ends
 with .py, but if I want to distribute django application to others and
 don't want to distribute source code, this will be a barrier.

 Actually, I want to distribute my django application using py2exe to be a
 desktop application.

 My approach in this time is:
         import django.core.management

         def find_commands(management_dir):
             command_dir = os.path.join(management_dir, 'commands')
             try:
                 return [f[:-4] for f in os.listdir(command_dir)
                         if not f.startswith('_') and f.endswith('.pyo')]
             except OSError:
                 return []

         django.core.management.find_commands = find_commands

         from django.core.management import ProjectManagementUtility
         os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
         utility = ProjectManagementUtility(sys.argv, executableDir)
         utility.execute()

 It looks silly.
 If django.core.management.find_commands can search .py, .pyc and .pyo, I
 don't need to this anymore.

 This will make distribute django more easily and more flexible.

 Thanks for your effort.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6013>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to