#1033 closed defect (fixed)

*.xhtml and tahoe.css are not copied from web directory on Windows

Reported by: freestorm Owned by: zooko
Priority: major Milestone: 1.7.0
Component: packaging Version: 1.6.1
Keywords: windows xhtml tahoe.css web install Cc:
Launchpad Bug:

Description (last modified by davidsarah)

When Tahoe is installed using setup.py install from a darcs checkout, the *.xhtml and tahoe.css from web directory are not copied to lib/allmydata/web.

The result is that the web interface cannot be used, because of the missing files.

This issue occurs only on Windows.

It works in these cases (Windows):

  • Installing tahoe from tarballs
  • Creating tarballs with "python setup.py sdist"
  • Running bin/tahoe from the source directory

Tested with python2.6

External link: http://mail.python.org/pipermail/distutils-sig/2006-October/006740.html

Attachments (3)

xhtml_and_tahoe.css_not_included.darcspatch.txt (5.2 KB) - added by freestorm at 2010-05-09T21:29:38Z.
run_trial.darcspath.txt (5.0 KB) - added by freestorm at 2010-05-11T17:05:50Z.
path_reparator_change_for_windows.darcs.txt (1.1 KB) - added by freestorm at 2010-05-22T00:20:13Z.

Download all attachments as: .zip

Change History (14)

comment:1 Changed at 2010-05-09T21:31:52Z by davidsarah

  • Description modified (diff)
  • Milestone changed from undecided to 1.7.0
  • Summary changed from *.xhtml and tahoe.css are not copied from web directory to *.xhtml and tahoe.css are not copied from web directory on Windows

comment:2 Changed at 2010-05-09T21:43:55Z by davidsarah

  • Description modified (diff)

comment:3 Changed at 2010-05-10T02:06:47Z by zooko

Let's add a test of this behavior. Let's see, if everything is working then we should get a string containg 'html xmlns' from calling getxmlfile() with argument 'directory.xhtml'.

comment:4 Changed at 2010-05-10T06:51:32Z by zooko

Test added in 6037df55b372beb6. In addition I've attempted to program the buildbots so that a few of them, including FreeStorm's, run the unit tests from installed locations, but I doubt that I succeeded at that.

comment:5 Changed at 2010-05-10T15:42:53Z by davidsarah

  • Component changed from code to packaging
  • Keywords reviewed install added; review-needed removed

Changed at 2010-05-11T17:05:50Z by freestorm

comment:6 Changed at 2010-05-11T17:08:01Z by freestorm

I wrote the patch for run_trial.py,

I copied into build/misc/run_trial.py on my buildbot.

And after run:

python -c "import glob,os,subprocess,sys;os.chdir('egginstalldir');os.environPATH?=os.getcwd()+os.pathsep+os.environPATH?;os.environPYTHONPATH?=os.pathsep.join(glob.glob('*.egg'))+os.pathsep+os.environ.get('PYTHONPATH',);sys.exit(subprocess.call(['python','../misc/run_trial.py', 'allmydata.test'], env=os.environ))"

and it work :-)

Maybe, we can do: os.chdir('../'); before calling subprocess and simply calling 'python','misc/run_trial.py'

Fred

comment:7 Changed at 2010-05-16T16:06:03Z by davidsarah

  • Keywords review-needed added; reviewed removed
  • Owner changed from somebody to zooko

comment:8 Changed at 2010-05-20T04:43:10Z by zooko

Okay we have automated tests of this issue now.

Here is a build step that is producing the .egg on Kyle's OpenBSD and it succeeds:

http://tahoe-lafs.org/buildbot/builders/Kyle%20OpenBSD-4.6%20amd64/builds/146/steps/create-egg/logs/stdio

You can see that it is including the xhtml files in the .egg.

Here is the same step on FreeStorm?'s WinXP which doesn't mention any xhtml files:

http://tahoe-lafs.org/buildbot/builders/FreeStorm%20WinXP-x86%20py2.6/builds/14/steps/create-egg/logs/stdio

Then here is the step which runs the unit tests from the installed location after installing from the egg that it built. The tests pass on Kyle's OpenBSD:

http://tahoe-lafs.org/buildbot/builders/Kyle%20OpenBSD-4.6%20amd64/builds/146/steps/test-from-egg/logs/stdio

and fail on FreeStorm?'s WinXP:

http://tahoe-lafs.org/buildbot/builders/FreeStorm%20WinXP-x86%20py2.6/builds/14/steps/test-from-egg/logs/stdio

(We also have comparable tests of installing and running from the installed version that doesn't use .egg format, that also passes on Kyle's and fails on FreeStorm?'s.)

Here are the "versions of tools" steps that say what versions of everything are installed on the respective buildslaves:

http://tahoe-lafs.org/buildbot/builders/Kyle%20OpenBSD-4.6%20amd64/builds/146/steps/show-tool-versions/logs/stdio

http://tahoe-lafs.org/buildbot/builders/FreeStorm%20WinXP-x86%20py2.6/builds/14/steps/show-tool-versions/logs/stdio

Okay now we can tell if we fix this issue! I would like to fix it by figuring out why the include_package_data=True and the setuptools_darcs features that works on most systems doesn't work on WinXP rather than by applying the patch to manually specify package data.

Oh, I'll bet there is a bug in setuptools_darcs having to do with Windows vs. Unix path separators...

comment:9 Changed at 2010-05-22T00:34:31Z by freestorm

I've attached the patch for setuptools_darcs/setuptools_darcs.py.
=> path_reparator_change_for_windows.darcs.txt

This patch changes the path separator of "darcs show manifest" output to be correctly processed by setuptools on Windows.

Fred

comment:10 Changed at 2010-05-24T09:22:46Z by zooko

  • Resolution set to fixed
  • Status changed from new to closed

Okay this is fixed by setuptools_darcs-1.2.9.

comment:11 Changed at 2010-06-03T04:28:27Z by davidsarah

  • Keywords review-needed removed
Note: See TracTickets for help on using tickets.