annotate setup-exe.py @ 193:a76cdc26ba9d

Added conf. var. match and match='regexp' for non-archives Specify match='regexp', and your tests and dummies will be treated as regular expressions describing test case identifiers. Every file that is in a suitable location and whose name matches {testcase,dummy}inname and the given regexp will be treated as a file with test case input data. You are free to use backreferences in the regexps, but group numbering starts at two rather than one. If you want test groups, you can get them magically created for you by putting a part of the test ID in a group in the regexp sense and specifying the tests variable as a pair consisting of the regexp itself and the number of this regexp group (remember group numbers start at two).
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 11 Aug 2011 23:20:52 +0300
parents fe03964896ef
children ad4362bf9858 9d21cef40e5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
147
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
1 #! /usr/bin/env python
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
2 from cx_Freeze import setup, Executable, build_exe
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
3 from distutils.core import Extension
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
4 from distutils.command.build_ext import build_ext
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
5 from distutils.errors import CCompilerError
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
6 from distutils import log
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
7 import os
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
8
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
9 class build_opt_ext(build_ext):
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
10 def build_extension(self, ext):
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
11 try:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
12 build_ext.build_extension(self, ext)
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
13 except CCompilerError:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
14 log.warn("Failed to build native extension '%s' (skipping)",
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
15 ext.name)
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
16
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
17 try:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
18 from sys import maxsize
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
19 except ImportError:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
20 from sys import maxint as maxsize
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
21 if maxsize < 2**32:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
22 arch = 'x86'
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
23 else:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
24 arch = 'amd64'
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
25 direct = (R'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\%s'
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
26 R'\Microsoft.VC90.CRT' % arch)
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
27 files = ['msvcr90.dll', 'Microsoft.VC90.CRT.manifest']
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
28 msvcrt_files = [os.path.join(direct, name) for name in files]
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
29
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
30 os.rename('upreckon/unix.py', 'upreckon/unix.py~')
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
31 try:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
32 setup(name='Upreckon',
184
4df9537ed261 Updated version numbers
Oleg Oshmyan <chortos@inbox.lv>
parents: 147
diff changeset
33 version='2.03.0dev',
147
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
34 author='Oleg Oshmyan',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
35 author_email='chortos@inbox.lv',
188
fe03964896ef Updated home page URL
Oleg Oshmyan <chortos@inbox.lv>
parents: 184
diff changeset
36 url='http://chortos.selfip.net/~astiob/upreckon/',
147
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
37 #description='',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
38 #long_description='',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
39 download_url='https://bitbucket.org/astiob/upreckon/downloads',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
40 #platforms=(),
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
41 #license='',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
42 #ext_modules=[Extension('upreckon._unix',
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
43 # sources=['upreckon/_unixmodule.cpp'])],
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
44 executables=[Executable('upreckon/upreckon')],
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
45 data_files=[('', msvcrt_files)],
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
46 cmdclass={'build_ext': build_opt_ext},
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
47 )
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
48 finally:
37955420fd66 Added a cx_Freeze-based setup-exe.py for Windows
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
49 os.rename('upreckon/unix.py~', 'upreckon/unix.py')