Allow py2exe to work with Python >= 2.6 and with pygtk all-in-one for issue1350
This commit is contained in:
1 parent
a0ff0ee628
commit
d0b95c496d
3 files changed
+83
-21
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="5.0.0.0"
|
||||
processorArchitecture="x86"
|
||||
name="Tryton"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Tryton client</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false">
|
||||
</requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.VC90.CRT"
|
||||
version="9.0.21022.8"
|
||||
processorArchitecture="x86"
|
||||
publicKeyToken="1fc8b3b9a1e18e3b">
|
||||
</assemblyIdentity>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
@@ -12,6 +12,12 @@ except Exception:
|
||||
if os.name == 'nt' and hasattr(sys, "frozen"):
|
||||
sys.stdout = open(os.devnull, 'w')
|
||||
sys.stderr = open(os.devnull, 'w')
|
||||
etc = os.path.join(os.path.dirname(sys.executable), 'etc')
|
||||
os.environ['GTK2_RC_FILES'] = os.path.join(etc, 'gtk-2.0', 'gtkrc')
|
||||
os.environ['GDK_PIXBUF_MODULE_FILE'] = os.path.join(etc, 'gtk-2.0',
|
||||
'gdk-pixbuf.loaders')
|
||||
os.environ['GTK_IM_MODULE_FILE'] = os.path.join(etc, 'gtk-2.0',
|
||||
'gtk.immodules')
|
||||
|
||||
if os.name == 'mac' or \
|
||||
(hasattr(os, 'uname') and os.uname()[0] == 'Darwin'):
|
||||
|
||||
@@ -7,6 +7,9 @@ import os
|
||||
import glob
|
||||
import sys
|
||||
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
args = {}
|
||||
|
||||
try:
|
||||
@@ -28,14 +31,29 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
data_files=[
|
||||
('share/pixmaps/tryton', glob.glob('share/pixmaps/tryton/*.png') + \
|
||||
glob.glob('share/pixmaps/tryton/*.svg')),
|
||||
('share/locale/bg_BG/LC_MESSAGES',
|
||||
glob.glob('share/locale/bg_BG/LC_MESSAGES/*.mo')),
|
||||
('share/locale/cs_CZ/LC_MESSAGES',
|
||||
glob.glob('share/locale/cs_CZ/LC_MESSAGES/*.mo')),
|
||||
('share/locale/de_DE/LC_MESSAGES',
|
||||
glob.glob('share/locale/de_DE/LC_MESSAGES/*.mo')),
|
||||
('share/locale/es_CO/LC_MESSAGES',
|
||||
glob.glob('share/locale/es_CO/LC_MESSAGES/*.mo')),
|
||||
('share/locale/es_ES/LC_MESSAGES',
|
||||
glob.glob('share/locale/es_ES/LC_MESSAGES/*.mo')),
|
||||
('share/locale/fr_FR/LC_MESSAGES',
|
||||
glob.glob('share/locale/fr_FR/LC_MESSAGES/*.mo')),
|
||||
('share/locale/ru_RU/LC_MESSAGES',
|
||||
glob.glob('share/locale/ru_RU/LC_MESSAGES/*.mo')),
|
||||
('share/locale/ja_JP/LC_MESSAGES',
|
||||
glob.glob('share/locale/ja_JP/LC_MESSAGES/*.mo')),
|
||||
]
|
||||
|
||||
if os.name == 'nt':
|
||||
import py2exe
|
||||
origIsSystemDLL = py2exe.build_exe.isSystemDLL
|
||||
def isSystemDLL(pathname):
|
||||
if os.path.basename(pathname).lower() in ("msvcp71.dll", "dwmapi.dll"):
|
||||
return 0
|
||||
return origIsSystemDLL(pathname)
|
||||
py2exe.build_exe.isSystemDLL = isSystemDLL
|
||||
|
||||
args['windows'] = [{
|
||||
'script': os.path.join('bin', 'tryton'),
|
||||
@@ -57,6 +75,15 @@ if os.name == 'nt':
|
||||
}
|
||||
}
|
||||
args['zipfile'] = 'library.zip'
|
||||
|
||||
if sys.version_info < (2, 6):
|
||||
data_files.append(('', ['msvcp71.dll']))
|
||||
else:
|
||||
data_files.append(('', ['msvcr90.dll', 'msvcp90.dll', 'msvcm90.dll']))
|
||||
manifest = read('Microsoft.VC90.CRT.manifest')
|
||||
args['windows'][0]['other_resources'] = [(24, 1, manifest)]
|
||||
|
||||
|
||||
elif os.name == 'mac' \
|
||||
or (hasattr(os, 'uname') and os.uname()[0] == 'Darwin'):
|
||||
import py2app
|
||||
@@ -89,9 +116,6 @@ if sys.version_info < (2, 6):
|
||||
SIMPLEJSON = ['simplejson']
|
||||
EXTRAS['ssl'] = ['ssl']
|
||||
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
dist = setup(name=PACKAGE,
|
||||
version=VERSION,
|
||||
description='Tryton client',
|
||||
@@ -102,18 +126,7 @@ dist = setup(name=PACKAGE,
|
||||
download_url="http://downloads.tryton.org/" + \
|
||||
VERSION.rsplit('.', 1)[0] + '/',
|
||||
packages=find_packages(),
|
||||
data_files=[
|
||||
('share/pixmaps/tryton', glob.glob('share/pixmaps/tryton/*.png') + \
|
||||
glob.glob('share/pixmaps/tryton/*.svg')),
|
||||
('share/locale/bg_BG/LC_MESSAGES', glob.glob('share/locale/bg_BG/LC_MESSAGES/*.mo')),
|
||||
('share/locale/cs_CZ/LC_MESSAGES', glob.glob('share/locale/cs_CZ/LC_MESSAGES/*.mo')),
|
||||
('share/locale/de_DE/LC_MESSAGES', glob.glob('share/locale/de_DE/LC_MESSAGES/*.mo')),
|
||||
('share/locale/es_CO/LC_MESSAGES', glob.glob('share/locale/es_CO/LC_MESSAGES/*.mo')),
|
||||
('share/locale/es_ES/LC_MESSAGES', glob.glob('share/locale/es_ES/LC_MESSAGES/*.mo')),
|
||||
('share/locale/fr_FR/LC_MESSAGES', glob.glob('share/locale/fr_FR/LC_MESSAGES/*.mo')),
|
||||
('share/locale/ru_RU/LC_MESSAGES', glob.glob('share/locale/ru_RU/LC_MESSAGES/*.mo')),
|
||||
('share/locale/ja_JP/LC_MESSAGES', glob.glob('share/locale/ja_JP/LC_MESSAGES/*.mo')),
|
||||
],
|
||||
data_files=data_files,
|
||||
scripts=['bin/tryton'],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
|
||||
Reference in new issue
Block a user