distutils2: 6aadad4c1cb3 (original) (raw)

Mercurial > distutils2

changeset 1098:6aadad4c1cb3

Porting setup.py for Python 3: * use either build_py or build_py_2to3 based on Python version for automatic 2to3 * replaced find_packages() with static package list since distutils2.utils can't be ported to Py3 before setup.py is run * replaced "if rev == ''" with "if not rev" to avoid bytes vs string issue on Py3

Arc Riley arcriley@gmail.com
date Sat, 20 Nov 2010 14:00:07 -0500
parents a8eaafda8fd3
children 001ff262c405
files setup.py
diffstat 1 files changed, 24 insertions(+), 4 deletions(-)[+] [-] setup.py 28

line wrap: on

line diff

--- a/setup.py +++ b/setup.py @@ -5,13 +5,20 @@ import os import re from distutils2 import version as VERSION -from distutils2.util import find_packages from distutils import log from distutils.core import setup, Extension from distutils.ccompiler import new_compiler from distutils.command.sdist import sdist from distutils.command.install import install +# Python 3.x hook to run 2to3 automatically +try:

+except ImportError:

+ + f = open('README.txt') try: README = f.read() @@ -26,7 +33,7 @@ def get_tip_revision(path=os.getcwd()): except OSError: return 0 rev = cmd.stdout.read()