comparison setup.py @ 8:19fd067db7ca

Added Windows support
author Ben Croston
date Mon, 15 Aug 2011 00:20:31 +0100
parents 639d9699e53c
children cc41931a7ded
comparison
equal deleted inserted replaced
7:0687a6666873 8:19fd067db7ca
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 import sys 2 import sys
3 from distutils.core import setup 3 from distutils.core import setup
4 4
5 try: 5 try:
6 from distutils.command.build_py import build_py_2to3 as build_py 6 from distutils.command.build_py import build_py_2to3 as build_py
7 except ImportError: 7 except ImportError:
8 from distutils.command.build_py import build_py 8 from distutils.command.build_py import build_py
9 9
10 classifiers = ['Development Status :: 3 - Alpha', 10 classifiers = ['Development Status :: 3 - Alpha',
11 'Operating System :: Microsoft :: Windows', 11 'Operating System :: Microsoft :: Windows',
12 'Operating System :: Unix', 12 'Operating System :: Unix',
13 'License :: OSI Approved :: MIT License', 13 'License :: OSI Approved :: MIT License',
14 'Programming Language :: Python',
14 'Programming Language :: Python :: 2.7', 15 'Programming Language :: Python :: 2.7',
15 'Programming Language :: Python :: 3', 16 'Programming Language :: Python :: 3',
16 'Topic :: Printing'] 17 'Topic :: Printing']
17 18
18 long_description = open('README').read() 19 long_description = open('README').read()
19 20
20 if sys.platform.lower().startswith('win'): 21 if sys.platform.lower().startswith('win'):
21 requires = ['win32print'] 22 requires = ['win32print']
23 try:
24 import win32print
25 except:
26 raise Exception('Requires the win32print module from the pywin32 package')
22 else: 27 else:
23 requires = [] 28 requires = []
24 29
25 setup(name = 'zebra', 30 setup(name = 'zebra',
26 version = '0.0.1a', 31 version = '0.0.2a',
27 py_modules = ['zebra'], 32 py_modules = ['zebra'],
28 author = 'Ben Croston', 33 author = 'Ben Croston',
29 author_email = 'ben@croston.org', 34 author_email = 'ben@croston.org',
30 maintainer = 'Ben Croston', 35 maintainer = 'Ben Croston',
31 maintainer_email = 'ben@croston.org', 36 maintainer_email = 'ben@croston.org',
32 # url = 'http://www.wyre-it.co.uk/zebra/', 37 url = 'http://www.wyre-it.co.uk/zebra/',
33 description = 'A package to communicate with (Zebra) label printers using EPL2', 38 description = 'A package to communicate with (Zebra) label printers using EPL2',
34 long_description = long_description, 39 long_description = long_description,
35 platforms = 'Windows, Unix', 40 platforms = 'Windows, Unix',
36 classifiers = classifiers, 41 classifiers = classifiers,
37 license = 'MIT', 42 license = 'MIT',