~pyreadline/pyreadline/trunk

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Jorgen Stenarson
  • Date: 2011-10-06 19:02:52 UTC
  • mfrom: (100.1.19 python3)
  • Revision ID: jorgen.stenarson@bostream.nu-20111006190252-efh961vx5qbcohom
Merging python3 fixes from Shimizukawa

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#*****************************************************************************
10
10
 
11
11
import os
 
12
import sys
12
13
import glob
13
14
 
14
15
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
16
17
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
17
18
#
18
19
 
19
 
from distutils.core import setup
20
 
execfile('pyreadline/release.py')
 
20
extra = {}
 
21
_distribute = False
 
22
 
 
23
try:
 
24
    import setuptools
 
25
    setup = setuptools.setup
 
26
    _distribute = getattr(setuptools, '_distribute', False)
 
27
except ImportError:
 
28
    from distutils.core import setup
 
29
 
 
30
if sys.version_info >= (3, 0):
 
31
    if _distribute == False:
 
32
        raise RuntimeError('You must installed `distribute` to setup pyreadline with Python3')
 
33
 
 
34
    extra.update(
 
35
        use_2to3=True
 
36
    )
 
37
 
 
38
exec(compile(open('pyreadline/release.py').read(), 'pyreadline/release.py', 'exec'))
21
39
 
22
40
try:
23
41
    import sphinx
50
68
      package_data     = {'pyreadline':['configuration/*']},
51
69
      data_files       = [],
52
70
      cmdclass = cmd_class,
 
71
      **extra
53
72
      )
54
73