diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-25 00:44:23 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-25 00:44:23 +0000 |
commit | ce5b3c85a28e70a67f1f7d5d8bd43d9d0e2f35d9 (patch) | |
tree | 06568a969e3a7681dc859feb5f80eaa0a6bf02c3 | |
parent | ac0ce6d8a0bd5d009f6e1fd0da441cdc64280a19 (diff) | |
download | pyserial-ce5b3c85a28e70a67f1f7d5d8bd43d9d0e2f35d9.tar.gz |
- use 2to3 on the fly when installing for Python 3.x (bdist/install)
- update categories
- drop support for older Python than 2.2.3
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@246 f19166aa-fa4f-0410-85c2-fa1106f25c8a
-rw-r--r-- | setup.py | 33 |
1 files changed, 22 insertions, 11 deletions
@@ -1,23 +1,24 @@ # setup.py import sys +from distutils.core import setup + try: - from setuptools import setup + from distutils.command.build_py import build_py_2to3 as build_py except ImportError: - sys.stdout.write("standard distutils\n") - from distutils.core import setup -else: - sys.stdout.write("setuptools\n") + if sys.version_info >= (3, 0): + raise ImportError("build_py_2to3 not found in distutils - it is required for Python 3.x") + from distutils.command.build_py import build_py -#windows installer: -# python setup.py bdist_wininst +# windows installer: +# python setup.py bdist_wininst # patch distutils if it can't cope with the "classifiers" or # "download_url" keywords if sys.version < '2.2.3': - from distutils.dist import DistributionMetadata - DistributionMetadata.classifiers = None - DistributionMetadata.download_url = None + raise ValueError("Sorry Python versions older than 2.2.3 are no longer" + "supported - check http://pyserial.sf.net for older " + "releases or upgrade your Python installation.") setup( name = "pyserial", @@ -38,10 +39,20 @@ setup( 'Operating System :: POSIX', 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.3', + 'Programming Language :: Python :: 2.4', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.0', + 'Programming Language :: Python :: 3.1', 'Topic :: Communications', 'Topic :: Software Development :: Libraries', 'Topic :: Terminals :: Serial', ], platforms = 'any', - #~ scripts = ['scripts/python-miniterm'], + cmdclass = {'build_py': build_py}, + + #~ scripts = ['scripts/pyserial-miniterm'], ) |