Opened 5 years ago

Closed 4 years ago

#21340 closed Bug (fixed)

Can't run on Windows

Reported by: remirampin@… Owned by: nobody
Component: Packaging Version: master
Severity: Normal Keywords: windows setuptools distutils
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


On Windows, setuptools usually installs a .exe file in Python\Scripts (which is typically on the path) so that it can be run from the console.

Because Django uses distutils, that script is not executable. The only way to run it is to use the full path to it or to copy it to the current directory (as stated in the docs).

I proposed a very simple pull request that uses setuptools's entry_point mechanism to create the .exe wrapper, if setuptools is installed.

There is no change in behavior if setuptools is not available (distutils will be used) and probably very few changes on UNIX systems (except that the entry point will be created by setuptools, instead of being copied from the django/bin directory).

Related discussions:

Attachments (1)

1812.patch (2.1 KB) - added by remirampin@… 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by remirampin@…

Attachment: 1812.patch added

comment:1 Changed 5 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Tim Graham

Type: UncategorizedBug
Version: master

Here's another mailing list thread about this.

comment:3 Changed 4 years ago by Tim Graham

We may switch to using setuptools rather than distutils, see PR 2116.

comment:4 Changed 4 years ago by Florian Apolloner

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top