Mercurial > ~astiob > upreckon > hgweb
annotate setup.py @ 177:aed52e3fa5a0 2.01
Fixed crashing on stdio=False with _unix
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Mon, 20 Jun 2011 16:00:45 +0300 |
parents | e56d43b40884 |
children |
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', |
172
e56d43b40884
Bumped the version number to 2.01.2
Oleg Oshmyan <chortos@inbox.lv>
parents:
166
diff
changeset
|
31 version='2.01.2', |
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', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
34 url='http://chortos.selfip.net/~astiob/test.py/', |
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', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
49 'Programming Language :: Python', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
50 'Programming Language :: Python :: 2', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
51 #'Programming Language :: Python :: 2.5', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
52 'Programming Language :: Python :: 2.6', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
53 'Programming Language :: Python :: 2.7', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
54 'Programming Language :: Python :: 3', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
55 'Programming Language :: Python :: 3.0', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
56 'Programming Language :: Python :: 3.1', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
57 'Programming Language :: Python :: 3.2', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
58 'Topic :: Software Development :: Testing', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
59 'Topic :: Utilities', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
60 ), |
154
eb0866a11ba1
_unix is no longer compiled on non-UNIX systems
Oleg Oshmyan <chortos@inbox.lv>
parents:
146
diff
changeset
|
61 ext_modules=ext_modules, |
146
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
62 packages=['upreckon'], |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
63 scripts=scripts, |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
64 cmdclass={'build_ext': build_opt_ext}, |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
65 ) |