manage.py and pyc's
The patch in ticket #8280 finds management commands shipped in .pyc, .pyo, .zip, .egg files, etc I find it strange and un-pythonic that the current code uses a walk over the file system, rather than the proper python APIs to discover the contents of packages... Johan -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
Re: manage.py and pyc's
Well, the sneaky workaround would probably be to ship a totally simple management/commands/foo_command.py that does nothing more than "from only_as_pyc import *". Would that work for your use case? mjl -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
Re: manage.py and pyc's
It looks like this issue has been marked as wontfix in https://code.djangoproject.com/ticket/14952 However, I've used the following in manage.py to support running management commands when distributing only .pyc files: https://gist.github.com/cchurch/6067733 On Tue, Jul 23, 2013 at 6:29 PM, Jan Vilhuberwrote: > In our project, we typically deploy our django app without py's, except > for a few select ones (manage,py for example). I recently added a few > management/commands to a few of the apps in my project, and discovered that > manage.py does not find them, as it looks only for .py files (ignoring > .pyc's; django.core.management.__init__::29 in django 1.4). > > Any reason why this is so? Could commands be discovered by regular python > introspection rather than looking for py files? > > jan > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at http://groups.google.com/group/django-developers. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
manage.py and pyc's
In our project, we typically deploy our django app without py's, except for a few select ones (manage,py for example). I recently added a few management/commands to a few of the apps in my project, and discovered that manage.py does not find them, as it looks only for .py files (ignoring .pyc's; django.core.management.__init__::29 in django 1.4). Any reason why this is so? Could commands be discovered by regular python introspection rather than looking for py files? jan -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.