mirror of
https://github.com/wassname/pyreadline.git
synced 2026-06-27 16:10:38 +08:00
setup now have 2to3 sequence that functionality depend on distribute package.
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
build
|
||||
dist
|
||||
pyreadline.egg-info/
|
||||
__pycache__/
|
||||
|
||||
@@ -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',
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user