annotate setup-exe.py @ 247:f5847d29e838

Fixed: match='re' could produce duplicate test identifiers files.Files.regexp(pattern) now makes sure to return only one metafile for each matching virtual path, namely, the one that would be returned for that virtual path by files.Files.from_virtual_path.
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 03 Oct 2013 01:19:09 +0300
parents cf7dd3f46e89
children
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',
243
cf7dd3f46e89 Bumped the version number to 2.05.0
Oleg Oshmyan <chortos@inbox.lv>
parents: 220
diff changeset
33 version='2.05.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')