setup now have 2to3 sequence that functionality depend on distribute package.

This commit is contained in:
shimizukawa
2011-04-10 03:00:18 +09:00
parent d2e943c670
commit 88b892079d
3 changed files with 24 additions and 2 deletions
+2
View File
@@ -1,2 +1,4 @@
build
dist
pyreadline.egg-info/
__pycache__/
+2 -1
View File
@@ -53,7 +53,7 @@ Features:
license = 'BSD'
authors = {'Jorgen' : ('Jorgen Stenarson','jorgen.stenarson@bostream.n'),
authors = {'Jorgen' : ('Jorgen Stenarson','jorgen.stenarson@bostream.nu'),
'Gary': ('Gary Bishop', ''),
'Jack': ('Jack Trainor', ''),
}
@@ -76,6 +76,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
]
+20 -1
View File
@@ -9,6 +9,7 @@
#*****************************************************************************
import os
import sys
import glob
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
@@ -16,7 +17,24 @@ import glob
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
#
from distutils.core import setup
extra = {}
_distribute = False
try:
import setuptools
setup = setuptools.setup
_distribute = getattr(setuptools, '_distribute', False)
except ImportError:
from distutils.core import setup
if sys.version_info >= (3, 0):
if _distribute == False:
raise RuntimeError('You must installed `distribute` to setup pyreadline with Python3')
extra.update(
use_2to3=True
)
exec(compile(open('pyreadline/release.py').read(), 'pyreadline/release.py', 'exec'))
try:
@@ -50,5 +68,6 @@ setup(name=name,
package_data = {'pyreadline':['configuration/*']},
data_files = [],
cmdclass = cmd_class,
**extra
)