1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #257 new

don't use curl in the instructions on how to download distribute_setup.py

Irmen de Jong
created an issue

All instructions that I see on how to bootstrap install distribute, involve downloading distribute.setup.py by using curl.

I suggest to not do this, and replace it by something like :

python -c "import urllib; urllib.urlretrieve('http://python-distribute.org/distribute_setup.py','distribute_setup.py')"

This also works on platforms that don't include curl, most notably, Windows. In my experience it has been harder than strictly needed to get distribute installed on Windows if the box doesn't have cygwin or whatever installed that provides curl.

Comments (5)

  1. Jason R. Coombs

    Personally, I use:

    python -c "import urllib2, sys;eval(compile(urllib2.urlopen('http://python-distribute.org/distribute_setup.py').read(), 'distribute_setup', 'exec'))"
    

    on Python 2.x and

    python -c "import urllib.request, sys;eval(compile(urllib.request.urlopen('http://python-distribute.org/distribute_setup.py').read(), 'distribute_setup', 'exec'))"
    

    on Python 3.x. This technique saves the extra step of running the Python code after downloading it and deleting the distribute_setup.py after (though you still have to delete the .tar.gz file downloaded).

    The biggest disadvantage is that it's long to type and has to be customized for Python2/3 (though I believe the suggested proposal has the same limitation).

  2. Irmen de Jong reporter
    • changed status to open

    I like your suggestion, and personally I don't have a problem with it because the distribute home page even suggests to "copy&paste" the commands.

    My suggestion lacks the python3.x version, indeed.

  3. Anonymous
  4. Log in to comment