annotate setup.py @ 211:78be952f6b40

Changed the help message to say Python 2.6 is required Change back when full Python 2.5 support is implemented.
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 18 Aug 2011 15:31:17 +0300
parents fe03964896ef
children ad4362bf9858 9d21cef40e5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
1 #! /usr/bin/env python
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
2 try:
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
3 from setuptools import setup, Extension
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
4 from setuptools.command.build_ext import build_ext
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
5 except ImportError:
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
6 from distutils.core import setup, Extension
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
7 from distutils.command.build_ext import build_ext
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
8 from distutils.errors import CCompilerError
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
9 from distutils import log
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
10 import os
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
11
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
12 class build_opt_ext(build_ext):
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
13 def build_extension(self, ext):
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
14 try:
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
15 build_ext.build_extension(self, ext)
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
16 except CCompilerError:
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
17 log.warn("failed to build native extension %s (skipping)",
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
18 ext.name)
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
19
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
20 scripts = ['upreckon/upreckon']
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
21 if os.name == 'nt':
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
22 scripts.append('upreckon/upreckon.cmd')
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
23
154
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
24 if os.name == 'posix':
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
25 ext_modules = [Extension('upreckon._unix',
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
26 sources=['upreckon/_unixmodule.cpp'])]
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
27 else:
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
28 ext_modules = []
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
29
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
30 setup(name='upreckon',
184
4df9537ed261 Updated version numbers
Oleg Oshmyan <chortos@inbox.lv>
parents: 169
diff changeset
31 version='2.03.0dev',
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
32 author='Oleg Oshmyan',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
33 author_email='chortos@inbox.lv',
188
fe03964896ef Updated home page URL
Oleg Oshmyan <chortos@inbox.lv>
parents: 184
diff changeset
34 url='http://chortos.selfip.net/~astiob/upreckon/',
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
35 #description='',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
36 #long_description='',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
37 download_url='https://bitbucket.org/astiob/upreckon/downloads',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
38 #platforms=(),
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
39 #license='',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
40 classifiers=(
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
41 'Development Status :: 5 - Production/Stable',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
42 'Environment :: Console',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
43 'Intended Audience :: Developers',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
44 'License :: Freely Distributable',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
45 'Natural Language :: English',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
46 'Operating System :: Microsoft :: Windows',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
47 'Operating System :: OS Independent',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
48 'Operating System :: POSIX',
169
d7f4b051ad79 Added C and C++ to the list of programming language classifiers
Oleg Oshmyan <chortos@inbox.lv>
parents: 154
diff changeset
49 'Programming Language :: C',
d7f4b051ad79 Added C and C++ to the list of programming language classifiers
Oleg Oshmyan <chortos@inbox.lv>
parents: 154
diff changeset
50 'Programming Language :: C++',
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
51 'Programming Language :: Python',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
52 'Programming Language :: Python :: 2',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
53 #'Programming Language :: Python :: 2.5',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
54 'Programming Language :: Python :: 2.6',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
55 'Programming Language :: Python :: 2.7',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
56 'Programming Language :: Python :: 3',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
57 'Programming Language :: Python :: 3.0',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
58 'Programming Language :: Python :: 3.1',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
59 'Programming Language :: Python :: 3.2',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
60 'Topic :: Software Development :: Testing',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
61 'Topic :: Utilities',
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
62 ),
154
eb0866a11ba1 _unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents: 146
diff changeset
63 ext_modules=ext_modules,
146
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
64 packages=['upreckon'],
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
65 scripts=scripts,
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
66 cmdclass={'build_ext': build_opt_ext},
d5b6708c1955 Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
67 )