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

Closed
opened 2010-05-09 21:29:14 +00:00 by freestorm · 9 comments
freestorm commented 2010-05-09 21:29:14 +00:00
Owner

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

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>
tahoe-lafs added the
code
major
defect
1.6.1
labels 2010-05-09 21:29:14 +00:00
tahoe-lafs added this to the undecided milestone 2010-05-09 21:29:14 +00:00
freestorm commented 2010-05-09 21:29:38 +00:00
Author
Owner

Attachment xhtml_and_tahoe.css_not_included.darcspatch.txt (5291 bytes) added

**Attachment** xhtml_and_tahoe.css_not_included.darcspatch.txt (5291 bytes) added
tahoe-lafs modified the milestone from undecided to 1.7.0 2010-05-09 21:31:52 +00:00
tahoe-lafs changed title from *.xhtml and tahoe.css are not copied from web directory to *.xhtml and tahoe.css are not copied from web directory on Windows 2010-05-09 21:31:52 +00:00
zooko commented 2010-05-10 02:06:47 +00:00
Author
Owner

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()]source:src/allmydata/web/common.py@4193#L19 with argument 'directory.xhtml'.

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()]source:src/allmydata/web/common.py@4193#L19 with argument `'directory.xhtml'`.
zooko commented 2010-05-10 06:51:32 +00:00
Author
Owner

Test added in changeset: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.

Test added in changeset: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.
tahoe-lafs added
packaging
and removed
code
labels 2010-05-10 15:42:53 +00:00
freestorm commented 2010-05-11 17:05:50 +00:00
Author
Owner

Attachment run_trial.darcspath.txt (5082 bytes) added

**Attachment** run_trial.darcspath.txt (5082 bytes) added
freestorm commented 2010-05-11 17:08:01 +00:00
Author
Owner

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.environ['PATH']=os.getcwd()+os.pathsep+os.environ['PATH'];os.environ['PYTHONPATH']=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

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.environ['PATH']=os.getcwd()+os.pathsep+os.environ['PATH'];os.environ['PYTHONPATH']=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
zooko commented 2010-05-20 04:43:10 +00:00
Author
Owner

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...

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](wiki/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](wiki/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](wiki/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...
freestorm commented 2010-05-22 00:20:13 +00:00
Author
Owner

Attachment path_reparator_change_for_windows.darcs.txt (1144 bytes) added

**Attachment** path_reparator_change_for_windows.darcs.txt (1144 bytes) added
freestorm commented 2010-05-22 00:34:31 +00:00
Author
Owner

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

I've attached the patch for setuptools_darcs/setuptools_darcs.py.<br> # > 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
zooko commented 2010-05-24 09:22:46 +00:00
Author
Owner

Okay this is fixed by setuptools_darcs-1.2.9.

Okay this is fixed by setuptools_darcs-1.2.9.
tahoe-lafs added the
fixed
label 2010-05-24 09:22:46 +00:00
zooko closed this issue 2010-05-24 09:22:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1033
No description provided.