[svn r21134] Use an entry point for the pip command on Windows (#5). And some missing news items

This commit is contained in:
Ian Bicking 2008-10-30 14:02:05 -05:00
parent fca571a9eb
commit 7e8a35b1fb
2 changed files with 15 additions and 5 deletions

View File

@ -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
---

View File

@ -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)