mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-04 12:14:11 +00:00
6c2944d4e1
so in the build slave's environment, everything builds and runs fine without '_xmlplus'. In my existing local environment everything builds and runs only if I tell py2exe to explicitly link in '_xmlplus'. the _xmlplus module, tested for by the python standard library, comes from PyXML ( http://pyxml.sf.net ) a project which is no longer maintained and, for instance, hasn't released a build for windows past python 2.4 hence something about the way nevow and the std lib import xml dependencies causes build environment incompatabilities between my box (which is running py24 currently) and the buildslave (which is on py25, and doesn't have PyXML) (if I remove _xmlplus from my environment, then a different set of nevow/xml import problems emerge, which do not occur in the buildslave's py25 env) this change tests the environment the build is happening in, and if the _xmlplus package is importable, then py2exe is directed to link it into the build. otherwise the package is left out. as far as I comprehend the issue this should make both of these environments work. if other people have problems around this issue, obviously I'm interested in learning more.
83 lines
1.7 KiB
Python
83 lines
1.7 KiB
Python
from distutils.core import setup
|
|
import py2exe
|
|
|
|
import glob
|
|
|
|
lnf_manifest = """
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
|
|
manifestVersion="1.0">
|
|
<assemblyIdentity
|
|
version="0.64.1.0"
|
|
processorArchitecture="x86"
|
|
name="Controls"
|
|
type="win32"
|
|
/>
|
|
<description>%s</description>
|
|
<dependency>
|
|
<dependentAssembly>
|
|
<assemblyIdentity
|
|
type="win32"
|
|
name="Microsoft.Windows.Common-Controls"
|
|
version="6.0.0.0"
|
|
processorArchitecture="X86"
|
|
publicKeyToken="6595b64144ccf1df"
|
|
language="*"
|
|
/>
|
|
</dependentAssembly>
|
|
</dependency>
|
|
</assembly>
|
|
"""
|
|
|
|
packages = ['encodings']
|
|
|
|
try:
|
|
import _xmlplus
|
|
except ImportError:
|
|
pass
|
|
else:
|
|
packages.append('_xmlplus')
|
|
|
|
setup_args = {
|
|
'name': 'Tahoe',
|
|
'description': 'Allmydata Tahoe distributated storage',
|
|
'author': 'Allmydata, Inc.',
|
|
'windows': [
|
|
{
|
|
'script': 'confwiz.py',
|
|
'icon_resources': [(1, 'amdicon.ico')],
|
|
'other_resources': [(24,1,lnf_manifest%'Allmydata Tahoe Config Wizard')],
|
|
},
|
|
],
|
|
'console': [
|
|
'tahoe.py',
|
|
],
|
|
'service': [
|
|
'tahoesvc',
|
|
],
|
|
'data_files': [
|
|
('.', [
|
|
],),
|
|
('web', glob.glob('../src/allmydata/web/*')),
|
|
],
|
|
'zipfile' : 'library.zip',
|
|
'options': {
|
|
"py2exe": {
|
|
"excludes": [
|
|
"pkg_resources",
|
|
],
|
|
"includes": [
|
|
],
|
|
"packages": packages,
|
|
#"optimize" : 2,
|
|
},
|
|
},
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
setup(**setup_args)
|
|
|
|
|
|
_junk = py2exe # appease pyflakes
|
|
del _junk
|