Use entry_points from setuptools if available #1812

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@remram44

This fixes not being able to run django-admin.py on Windows in most cases.

I know you removed the dependency on setuptools a while ago. This doesn't bring it back, it will only be used if available.

@remram44 remram44 Use entry_points from setuptools if available
If setuptools is available, use setuptools.setup() instead of
distutils.core.setup(), and use 'entry_point' instead of 'scripts'.

Keep the exact same behavior if setuptools cannot be imported.

This means that a django-admin.py.exe will be created in the PATH of
Windows users that have setuptools available, allowing them to run it
from the command line without having to type in the full name to the
script (prefixed with the 'python' command) or copy it to their
project's directory.
cef5314
@timgraham
Django member

Not sure if this will be accepted or not, but it needs a Trac ticket in order to move it forward (non-trivial patches without Trac tickets are ignored).

@remram44

I added 21340, with links to all the previous discussions I could find. Thanks!

I can see why they'd be reluctant to accept this simple change, but it's a pretty annoying issue on Windows.

@timgraham
Django member

It seemed to me like the consensus on the mailing list is that this isn't the best approach to solve this... should we close this PR for now?

@remram44

It seemed to me like the consensus on the mailing list is that this isn't the best approach to solve this...

Is it? :(

Email thread is here.

@timgraham
Django member

It looks like we may just switch to setuptools, see #2116

@timgraham timgraham closed this Dec 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment