On 12 avr. 2012, at 23:16, Aymeric Augustin wrote:

> Some people who had the habit of running "setup.py install" from a git clone 
> to keep up-to-date with the development version reported the problem.
> (Just to be 100% clear — this technique doesn't work because it doesn't 
> remove .py or .pyc files that are removed from Django.)

On 13 avr. 2012, at 06:49, Alex Ogier wrote:

> A reasonable
> way to track django trunk for example is to periodically pull and run
> "setup.py install" which is in most cases approximately idempotent.

No, this isn't a reasonable alternative, and installing software isn't an 
approximative operation.

Here's another example: this installation technique wouldn't reflect the 
changes in r17842 [1] properly — two files were removed. #18069 [2] was filed 
as a result.
The link between the problem and its cause was particularly tenuous in this 
case.

[1] https://code.djangoproject.com/changeset/17842
[2] https://code.djangoproject.com/ticket/18069

So a documentation fix might not be sufficient to eradicate the problem. Could 
we add this in a pre-install hook in setup.py?

try:
    import django
except ImportError:
    pass
else:
   print "It appears that Django %s is already installed." % 
django.get_version()
   print "If you want to upgrade Django, please remove the existing 
installation first."
   sys.exit(1)

To support pip install --upgrade, this code should be executed right before the 
new version is installed. I don't know very well what's possible with distutils.

Best regards,

-- 
Aymeric.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to