diff options
author | Waylan Limberg <waylan@gmail.com> | 2010-07-14 12:54:47 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2010-07-14 12:54:47 -0400 |
commit | d7811fe5e4ba718c38ffdfbc30c18a7316f37a44 (patch) | |
tree | 3df052dcbf5c860ef420306a01c8e5796d7a19f2 /setup.py | |
parent | a9f85f47c1cf7b6436810d7c9bba4cd9f62868af (diff) | |
download | markdown-d7811fe5e4ba718c38ffdfbc30c18a7316f37a44.tar.gz markdown-d7811fe5e4ba718c38ffdfbc30c18a7316f37a44.tar.bz2 markdown-d7811fe5e4ba718c38ffdfbc30c18a7316f37a44.zip |
The 2to3 tool now gets run automaticaly when building in Python 3.x.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -4,6 +4,14 @@ import sys, os from distutils.core import setup from distutils.command.install_scripts import install_scripts +# Try to run 2to3 automaticaly when building in Python 3.x +try: + from distutils.command.build_py import build_py_2to3 as build_py +except ImportError: + if sys.version_info >= (3, 0): + raise ImportError("build_py_2to3 is required to build in Python 3.x.") + from distutils.command.build_py import build_py + version = '2.1.0.Dev' # The command line script name. Currently set to "markdown_py" so as not to @@ -43,7 +51,8 @@ data = dict( license = 'BSD License', packages = ['markdown', 'markdown.extensions'], scripts = ['bin/%s' % SCRIPT_NAME], - cmdclass = {'install_scripts': md_install_scripts}, + cmdclass = {'install_scripts': md_install_scripts, + 'build_py': build_py}, classifiers = ['Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', |