blob: 2892874eb7095eb408884582bb01349dcfc50482 [file] [log] [blame]
cliechtia3d9de52010-10-23 22:13:39 +00001# setup.py for pySerial
cliechtiff945632009-07-25 01:15:00 +00002#
cliechtia3d9de52010-10-23 22:13:39 +00003# Windows installer:
4# "python setup.py bdist_wininst"
5#
6# Direct install (all systems):
7# "python setup.py install"
8#
9# For Python 3.x use the corresponding Python executable,
10# e.g. "python3 setup.py ..."
cliechtiff945632009-07-25 01:15:00 +000011
cliechti7aaead32009-07-23 14:02:41 +000012import sys
13
cliechti1eb947d2009-07-25 00:44:23 +000014from distutils.core import setup
cliechti89b4af12002-02-12 23:24:41 +000015
cliechti1eb947d2009-07-25 00:44:23 +000016try:
17 from distutils.command.build_py import build_py_2to3 as build_py
cliechtia3d9de52010-10-23 22:13:39 +000018 from distutils.command.build_scripts import build_scripts_2to3 as build_scripts
cliechti1eb947d2009-07-25 00:44:23 +000019except ImportError:
20 if sys.version_info >= (3, 0):
21 raise ImportError("build_py_2to3 not found in distutils - it is required for Python 3.x")
22 from distutils.command.build_py import build_py
cliechtia3d9de52010-10-23 22:13:39 +000023 from distutils.command.build_scripts import build_scripts
cliechti05e6f792009-07-30 17:27:48 +000024 suffix = ""
25else:
26 suffix = "-py3k"
27
cliechti1eb947d2009-07-25 00:44:23 +000028
cliechtif81362e2009-07-25 03:44:33 +000029if sys.version < '2.3':
30 # distutils that old can't cope with the "classifiers" or "download_url"
31 # keywords and True/False constants and basestring are missing
cliechtidaf47ba2009-07-28 01:28:16 +000032 raise ValueError("Sorry Python versions older than 2.3 are no longer"
cliechti1eb947d2009-07-25 00:44:23 +000033 "supported - check http://pyserial.sf.net for older "
34 "releases or upgrade your Python installation.")
cliechti5600e7c2003-11-06 22:17:21 +000035
cliechti89b4af12002-02-12 23:24:41 +000036setup(
cliechti05e6f792009-07-30 17:27:48 +000037 name = "pyserial" + suffix,
cliechti54f69b62009-07-21 19:48:41 +000038 description = "Python Serial Port Extension",
cliechti07709e42010-05-21 00:30:09 +000039 version = "2.5",
cliechti54f69b62009-07-21 19:48:41 +000040 author = "Chris Liechti",
41 author_email = "cliechti@gmx.net",
42 url = "http://pyserial.sourceforge.net/",
43 packages = ['serial'],
44 license = "Python",
45 long_description = "Python Serial Port Extension for Win32, Linux, BSD, Jython, IronPython",
cliechti5600e7c2003-11-06 22:17:21 +000046 classifiers = [
cliechti8db88b62003-09-10 20:14:53 +000047 'Development Status :: 5 - Production/Stable',
48 'Intended Audience :: Developers',
49 'Intended Audience :: End Users/Desktop',
50 'License :: OSI Approved :: Python Software Foundation License',
51 'Natural Language :: English',
52 'Operating System :: POSIX',
53 'Operating System :: Microsoft :: Windows',
cliechtiff945632009-07-25 01:15:00 +000054 #~ 'Operating System :: Microsoft :: Windows :: Windows CE', # could work due to new ctypes impl. someone needs to confirm that
cliechti8db88b62003-09-10 20:14:53 +000055 'Programming Language :: Python',
cliechti1eb947d2009-07-25 00:44:23 +000056 'Programming Language :: Python :: 2',
57 'Programming Language :: Python :: 2.3',
58 'Programming Language :: Python :: 2.4',
59 'Programming Language :: Python :: 2.5',
60 'Programming Language :: Python :: 2.6',
cliechti07709e42010-05-21 00:30:09 +000061 'Programming Language :: Python :: 2.7',
cliechti1eb947d2009-07-25 00:44:23 +000062 'Programming Language :: Python :: 3',
63 'Programming Language :: Python :: 3.0',
64 'Programming Language :: Python :: 3.1',
cliechti8db88b62003-09-10 20:14:53 +000065 'Topic :: Communications',
66 'Topic :: Software Development :: Libraries',
cliechtiff945632009-07-25 01:15:00 +000067 'Topic :: Software Development :: Libraries :: Python Modules',
cliechti8db88b62003-09-10 20:14:53 +000068 'Topic :: Terminals :: Serial',
69 ],
cliechti54f69b62009-07-21 19:48:41 +000070 platforms = 'any',
cliechtia3d9de52010-10-23 22:13:39 +000071 cmdclass = {'build_py': build_py, 'build_scripts': build_scripts},
cliechti1eb947d2009-07-25 00:44:23 +000072
cliechti84508572009-07-30 21:15:57 +000073 scripts = ['examples/miniterm.py'],
cliechti54f69b62009-07-21 19:48:41 +000074)