After installing django:
pip install django
I can immediately write:
django-admin.py startproject project
And django-admin.py is somehow known to my system.
I'm developing small webserver and distribute is using PIP - what should I put in my setup.py to expose my runserver.py file system-wide in the same manner as Django does?
Use the scripts keyword to setup. For example:
setup(...,
scripts=['django_admin.py']
)
The script is required to be executable.
In some cases, an alternative is to specify a function in a module that should be an entry_point
setup(...,
entry_points={
'console_scripts':
['myscript = my.package.scripts:main'],
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With