You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
The downside is that it relies on distribute and for your app to be installed or pseudoinstalled (developer mode) but the upside is that it lets your app actually work like a proper distributable package, not relying on being in the source directory or even even having the source directory. Just install and use myappctl. I also like having code related to my package //in// my actual package.
Often you might just have development stuff in your manage.py but maybe you have deployment stuff such as creating tables in a database etc. This way you can just put an sdist with fabric, easy_install it and your manager is just there.
Maybe this method should be documented as an alternative?
(Even without entry points, this still lets you do python -m myapp.manage outside of the source dir or python myapp/manage.py inside it.)
root@6a82e08503e4:~# angler-rod
Traceback (most recent call last):
File "/usr/local/bin/angler-rod", line 9, in <module>
load_entry_point('Angler-Rod==2.0', 'console_scripts', 'angler-rod')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
ImportError: No module named manage
I like to keep the manager in my app package and use distribute entry points:
The downside is that it relies on distribute and for your app to be installed or pseudoinstalled (developer mode) but the upside is that it lets your app actually work like a proper distributable package, not relying on being in the source directory or even even having the source directory. Just install and use myappctl. I also like having code related to my package //in// my actual package.
Often you might just have development stuff in your manage.py but maybe you have deployment stuff such as creating tables in a database etc. This way you can just put an sdist with fabric, easy_install it and your manager is just there.
Maybe this method should be documented as an alternative?
(Even without entry points, this still lets you do
python -m myapp.manage
outside of the source dir orpython myapp/manage.py
inside it.)The text was updated successfully, but these errors were encountered: