diff --git a/docs/news.txt b/docs/news.txt index f8a3521c5..361337f1c 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -7,6 +7,12 @@ svn trunk * Fixed small problem that prevented using ``pip.py`` without actually installing pip. +* Fixed ``--upgrade``, which would download and appear to install + upgraded packages, but actually just reinstall the existing package. + +* Fixed Windows problem with putting the install record in the right + place, and generating the ``pip`` script with Setuptools. + 0.2 --- diff --git a/setup.py b/setup.py index 4e8f3665b..10c9106d8 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,13 @@ +import sys try: from setuptools import setup except ImportError: + if sys.platform == 'win32': + raise ImportError('Could not import setuptools: setuptools is required on Windows systems') from distutils.core import setup import os + version = '0.2.1' doc_dir = os.path.join(os.path.dirname(__file__), 'docs') @@ -15,7 +19,10 @@ The main website for pip is `pip.openplans.org """ long_description = long_description + open(index_filename).read().split('split here', 1)[1] - +if sys.platform == 'win32': + kw = dict(entry_points=dict(console_scripts=['pip:pip:main'])) +else: + kw = dict(scripts=['scripts/pip']) setup(name='pip', version=version, @@ -34,8 +41,5 @@ setup(name='pip', url='http://pip.openplans.org', license='MIT', py_modules=['pip'], - ## FIXME: is this the best way? (Works with distutils, but - ## don't we really require setuptools anyway?) - scripts=['scripts/pip'], - ) + **kw)