Re: Using setuptools to make django-admin.py runnable on Windows (#21340)

2013-11-24 Thread Waylan Limberg
On Sunday, November 24, 2013, Rémi Rampin wrote:

> Hi developers,
>
> On Windows, running the django-admin.py tool is painful[1], because
> .py scripts are not "executable". You might be able to run it using
> the full path (if Python is the default handler for .py files, which
> it really shouldn't be). Most probably you'll need to copy it to your
> project directory and prefix it with "python " each time.


There are a few things I do whenever I install python on windows.

1) first, make sure the .py extension is associated with python.exe.
2) add the python directory to my path.
3) add the scripts directory to my path.

Then, when any packages install scripts (like django-admin.py), they ‘just
work’.

If you have multiple versions on python installed, then you can copy
python.exe to pythonX.X.exe and make sure the defult version (the version
associated with .py) is listed first on your path. The order of dirs on
your path in key here, but you can list all the versions on your path. Then
you can just type `python3.3` for example, and you'll get that version just
like on unix systems.

Of course, on unix based systems we all use virtualenv. There are a few
windows virtualenv clones implemented for windows either as batch scripts
or powershell scripts. You might want to look into those. Although, I
haven't used them myself, so I can't speak to their completeness,
reliability or usefulness. I always have git installed which comes with
mssys and gives me a bash shell on windows - the best solution IMO
(although virtualenv can be a little janky).

Of course, this has entered django-users territory. And additional
discussion about how to work around windows limitations should probably be
discussed there. My point is that with a correctly configured system, this
is not a problem on windows at all.

If there are any changes to make to Django, perhaps the install docs could
suggest the additions to the path I mention about as specific to installing
on windows.


-- 
Waylan Limberg

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAPubG6FCQraNF-%2BXdpxe2PO7yVfhk_weZ1KKyEtXnOMbMdWuvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Using setuptools to make django-admin.py runnable on Windows (#21340)

2013-11-24 Thread Donald Stufft
The recommended build tool at the moment is setuptools.

It's up to the individual project to decide if they think the install story for 
setutpools pre 3.4 is appropriate for them. This'll get better in general in 
the future with MSI installers for setuptools and pip



> On Nov 24, 2013, at 2:37 PM, Florian Apolloner  wrote:
> 
> Hi,
> 
> I am pretty much against setuptools and given that pip is somewhat becoming 
> the defacto-standard to install stuff; I'd ask Donald what can be done here 
> (cc'ed him). I don't think it's a good idea to fix this in Django since this 
> is imo a problem in Python itself.
> 
> Regards,
> Florian
> 
>> On Sunday, November 24, 2013 7:18:15 PM UTC+1, Remram wrote:
>> Hi developers, 
>> 
>> On Windows, running the django-admin.py tool is painful[1], because 
>> .py scripts are not "executable". You might be able to run it using 
>> the full path (if Python is the default handler for .py files, which 
>> it really shouldn't be). Most probably you'll need to copy it to your 
>> project directory and prefix it with "python " each time. 
>> 
>> setuptools has a neat workaround for scripts on Windows, which works 
>> great: it creates a wrapper binary that it puts on the PATH. I know 
>> from previous threads that Django chose to move away from setuptools 
>> and back to distutils, however it is easy to conditionally use this 
>> feature if setuptools are available. That way, Windows developers that 
>> have setuptools installed (which should be, like, all of them) will be 
>> able to run django-admin.py easily. 
>> 
>> I submitted a pull request on Github[2] a month ago, then opened a 
>> ticket[3] later on. Apart from an uncommented update from akaariai, I 
>> didn't get any feedback. 
>> 
>> I'd really like to see this small change accepted. It is fairly minor 
>> but would work towards restoring the portability that is a strength or 
>> Python. 
>> 
>> Thanks for your input/reviews/time, 
>> -- Remram 
>> 
>> [1] http://stackoverflow.com/q/19593404/711380 
>> [2] https://github.com/django/django/pull/1812 
>> [3] https://code.djangoproject.com/ticket/21340 
>> 
>> TL;DR: what happened to my patch? 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7AA51553-FDF5-4DD4-B083-FF13BA1451EE%40stufft.io.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Using setuptools to make django-admin.py runnable on Windows (#21340)

2013-11-24 Thread Florian Apolloner
Hi,

I am pretty much against setuptools and given that pip is somewhat becoming 
the defacto-standard to install stuff; I'd ask Donald what can be done here 
(cc'ed him). I don't think it's a good idea to fix this in Django since 
this is imo a problem in Python itself.

Regards,
Florian

On Sunday, November 24, 2013 7:18:15 PM UTC+1, Remram wrote:
>
> Hi developers, 
>
> On Windows, running the django-admin.py tool is painful[1], because 
> .py scripts are not "executable". You might be able to run it using 
> the full path (if Python is the default handler for .py files, which 
> it really shouldn't be). Most probably you'll need to copy it to your 
> project directory and prefix it with "python " each time. 
>
> setuptools has a neat workaround for scripts on Windows, which works 
> great: it creates a wrapper binary that it puts on the PATH. I know 
> from previous threads that Django chose to move away from setuptools 
> and back to distutils, however it is easy to conditionally use this 
> feature if setuptools are available. That way, Windows developers that 
> have setuptools installed (which should be, like, all of them) will be 
> able to run django-admin.py easily. 
>
> I submitted a pull request on Github[2] a month ago, then opened a 
> ticket[3] later on. Apart from an uncommented update from akaariai, I 
> didn't get any feedback. 
>
> I'd really like to see this small change accepted. It is fairly minor 
> but would work towards restoring the portability that is a strength or 
> Python. 
>
> Thanks for your input/reviews/time, 
> -- Remram 
>
> [1] 
> http://stackoverflow.com/q/19593404/711380
>  
> [2] 
> https://github.com/django/django/pull/1812
>  
> [3] 
> https://code.djangoproject.com/ticket/21340
>  
>
> TL;DR: what happened to my patch? 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/777236c7-e9dd-4429-b983-3a86b521c0e7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Using setuptools to make django-admin.py runnable on Windows (#21340)

2013-11-24 Thread Rémi Rampin
Hi developers,

On Windows, running the django-admin.py tool is painful[1], because
.py scripts are not "executable". You might be able to run it using
the full path (if Python is the default handler for .py files, which
it really shouldn't be). Most probably you'll need to copy it to your
project directory and prefix it with "python " each time.

setuptools has a neat workaround for scripts on Windows, which works
great: it creates a wrapper binary that it puts on the PATH. I know
from previous threads that Django chose to move away from setuptools
and back to distutils, however it is easy to conditionally use this
feature if setuptools are available. That way, Windows developers that
have setuptools installed (which should be, like, all of them) will be
able to run django-admin.py easily.

I submitted a pull request on Github[2] a month ago, then opened a
ticket[3] later on. Apart from an uncommented update from akaariai, I
didn't get any feedback.

I'd really like to see this small change accepted. It is fairly minor
but would work towards restoring the portability that is a strength or
Python.

Thanks for your input/reviews/time,
-- Remram

[1] http://stackoverflow.com/q/19593404/711380
[2] https://github.com/django/django/pull/1812
[3] https://code.djangoproject.com/ticket/21340

TL;DR: what happened to my patch?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMto89DFXZ5BHhgx3C%2BKwFihJfm_gVAyBW4HU5KqCjAyMybxkw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.