robk-tahoe [Tue, 15 Jan 2008 23:59:41 +0000 (16:59 -0700)]
tweak py2exe setup.py to link in xmlplus iff present
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.
robk-tahoe [Tue, 15 Jan 2008 00:53:54 +0000 (17:53 -0700)]
windows installer build refinements
this resolves problems of py2exe's modulefinder collection of sources from
.zipped egg files, not by using easy_install to reach the --always-unzip
option, but rather with a small tool which unpacks any zipped egg files found
in misc/dependencies. this fixes the py2exe build given rollback of the
easy_install stuff which had broken the unix builds. misc/hatch-eggs.py
performs the honours.
this also includes a misc/sub-ver.py tool which substitutes elements of the
verion number for the current code base (by importing allmydata.__version__
hence make-version should be run first, and the python path carefully managed)
into template files using python's string interpolation of named args from a
dict as the templating syntax. i.e. %(major)d %(minor)d %(point)d %(nano)d
each expand to the individual components of the version number as codified
by the pyutil.version_class.Version class. there is also a %(build)s tag
which expands to the string form of the whole version number. This tool is
used to interpolate the automatically generated version information into the
innosetup source file in a form consistent with innosetup/windows' restrictions
robk-tahoe [Sat, 12 Jan 2008 03:41:21 +0000 (20:41 -0700)]
add windows installer target to build
add 'windows-installer' target to top level makefile to build a windows setup.exe package
using innosetup. this assumes innosetup 5 is installed in program files as normal.
this doesn't include any logic to manage version numbers at this point, it's just a
simple experiment to test out building an installer as yet.
robk-tahoe [Sat, 12 Jan 2008 02:53:15 +0000 (19:53 -0700)]
implement a very simple, wxpython based, config wizard
This implements a very small app using a wx ui to log a user in.
it takes a username and password, and submits them to a backend on the web site
(currently the allmydata test net webserver) to authenticate them. It returns
the 'root_cap' uri of the user's virtual drive. Also the introducer.furl is
retrieved. These are then written into the default noderoot basedir in their
usual files (private/root_dir.cap and introducer.furl)
a button is provided which will direct the user to the web site in the event
that they need to register in order to have an account to use.
once the user is successfully authenticated and the files are written, then
on win32 the tahoe service will be started.
Brian Warner [Tue, 15 Jan 2008 05:31:41 +0000 (22:31 -0700)]
test_GET_DIRURL_large: reduce from 400 to 200 children: the test fails to
fail anyways, and 200 ought to be enough to trigger the problem, so 400 is
overkill, and just wastes CPU.
setup: switch back from using "misc/dependencies/setup.py easy_install --always-unzip misc/dependencies" to using "misc/dependencies/setup.py install"
because I don't fully understand the former, I suspect it of being implicated in the current buildslave redness, and we require --always-unzip solely for py2exe.
robk-tahoe [Thu, 10 Jan 2008 22:26:19 +0000 (15:26 -0700)]
fix nevow build prob for py2exe
nevow attempts to use pkg_resources to find the formless css file upon
import, if pkg_resources is available. unfortunately using pkg_resources
to find files is not supported if the files are being loaded from a zip
archive (i.e. only source and egg), and further py2exe uses a zip bundle
for all the code and dependent libraries. hence having both pkg_resources
and nevow built into an exe causes nevow to explode upon import.
this tells py2exe not to link pkg_resources into the target, so that
this behaviour isn't stimulated. the side effect being that pkg_resources
isn't available.
robk-tahoe [Thu, 10 Jan 2008 22:23:41 +0000 (15:23 -0700)]
added tweaked sibpath implementation
use of twisted.python.util.sibpath to find files relative to modules doesn't
work when those modules are bundled into a library by py2exe. this provides
an alternative implementation (in allmydata.util.sibpath) which checks for
the existence of the file, and if it is not found, attempts to find it relative
to sys.executable instead.
robk-tahoe [Thu, 10 Jan 2008 02:54:12 +0000 (19:54 -0700)]
add 'run' command to tahoe
adds a 'run' commands to bin/tahoe / tahoe.exe
it loads a client node into the tahoe process itself,
running in the base dir specified by --basedir/-C and
defaulting to the current working dir.
it runs synchronously, and the tahoe process blocks until
the reactor is stopped.
robk-tahoe [Thu, 10 Jan 2008 02:25:38 +0000 (19:25 -0700)]
add build dependencies to support py2exe's modulefinder
adds windows/depends.py as a container for modules which are needed at runtime
but which py2exe's modulefinder dependency analysis fails to find as requisites.
robk-tahoe [Thu, 10 Jan 2008 02:19:52 +0000 (19:19 -0700)]
added a 'repl' command to tahoe.exe
this is probably not of very high utility in the unix case of bin/tahoe
but is useful when working with native builds, e.g. py2exe's tahoe.exe,
to examine and debug the runtime environment, linking problems etc.
robk-tahoe [Thu, 10 Jan 2008 02:02:53 +0000 (19:02 -0700)]
tweaks to build process to support py2exe
py2exe is unable to handle .eggs which are packaged as zip files
in preference it will pull in other versions of libraries if they
can be found in the environment.
this changes causes .eggs to be built as .egg directories, which
py2exe can handle.
robk-tahoe [Thu, 10 Jan 2008 02:01:56 +0000 (19:01 -0700)]
first stab at windows build details.
there are many and various fiddly details that were involved in this process
on mountain view. This is a stripped down version of the build process used
there. there's hence a good chance that one or two necessary details got
stripped down through the cracks.
this provides a py2exe setup.py to build a tahoe.exe and a tahoesvc.exe
the former is equivalent to bin/tahoe, but without the start/stop commands.
the latter is a windows service that instantiates a client whose basedir
is found in the registry.
setup: require setuptools >= v0.6c6 on all platforms
Technically, we could get away with v0.6c5 or v0.6c4 on non-cygwin platforms, but if someone currently doesn't have setuptools >= v0.6c6 installed then our setup process will just use our bundled setuptools v0.6c7 anyway, so it will still work, and this makes the setup.py and the accompanying documentation simpler.
setup: remove the hack to determine if we can avoid the explicit setuptools-managed dependency on nevow (which was useful for building on dapper)
For simplicity, and to avoid weird failure modes that result from importing nevow during the build process, we now simply require nevow >= 0.6.0. We currently bundle in misc/dependencies nevow v0.9.18, which will not work on Dapper, since it requires Twisted >= 2.4.0, and Dapper comes with Twisted 2.2.0. Dapper users can (a) install a newer Twisted, (b) install nevow 0.6.0 in egg form so that setuptools can tell that it is installed (without importing it), (c) beg us to start shipping nevow 0.6.0 instead of nevow 0.9.18 in our bundle.
docs: add require version numbers of deps to install.html, move pywin32 from install.html to install-details.html, change ref to install-details.html in install.html
robk-tahoe [Tue, 8 Jan 2008 01:04:56 +0000 (18:04 -0700)]
reinstate creation of node.url files upon startup
a recent purge of the start.html code also took away the logic that wrote
'node.url' into the node root. this is required for the tahoe cli tool to
find the node. this puts back a limited fraction of that code, so that the
node writes out a node.url file upon startup.