Mercurial > ~astiob > upreckon > hgweb
annotate setup.py @ 182:a45ee530d136 2.02
Added tag 2.02.0 for changeset 91fe19d9eba4
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 14 Jul 2011 16:47:56 +0300 |
parents | 91fe19d9eba4 |
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', |
181
91fe19d9eba4
Created a branch for the 2.02 release
Oleg Oshmyan <chortos@inbox.lv>
parents:
169
diff
changeset
|
31 version='2.02.0', |
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', |
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 ) |