Roundup Tracker - Issues

Message7521

Author rouilj
Recipients austin, rouilj, tonimueller
Date 2022-05-14.15:57:58
Message-id <1652543878.44.0.797095648138.issue2550995@roundup.psfhosted.org>
In-reply-to
Hi Toni:

Thanks for reopening this, but I think it may be solved in
the repo. However let's get a little info first.

What OS are you on? Also version of Roundup and Python are
you seeing this with?

What command did you use to create the virtulenv:
virtualenv, venv, pythonX -m venv ...?

Also what is the path of your virtualenv?

Can you do a (1):

  find /path/to/virtualenv | grep TEMPLATE

and tell me where the templates are.

It sounds like you did this sequence (using /tools/roundup
as the virtualenv root):

  % virtualenv -p python3 /tools/roundup

which performs an install of 2.1.0 from pipy using wheel indicated by:

  % /tools/roundup/lib/python3.6/site-packages/roundup-2.1.0.dist-info/WHEEL

Then running the find (1) above shows:

   /tools/roundup/lib/python3.6/site-
packages/tools/roundup/share/roundup/templates/minimal/TEMPLATE-INFO.txt

along with TEMPLATE-INFO.txt for the other 4 templates. This
path will not be found by roundup as is not a parent
directory of admin.py followed by share/roundup/templates.

You placed the share subdirectory in the same directory as
admin.py. This is why you needed to patch admin.py to add 1.

If you place the share directory at the same level as the
bin directory in your virtualenv it should be found by
roundup-admin. (Also IIRC roundup will also use a locale
subdirectory for translations at that location.)

I was able to fix this (for 2.1.0) with:

  cp -pr /tools/roundup/lib/python3.6/site-packages/tools/roundup/share/. 
/tools/roundup/share/.

then roundup-admin install listed all the templates and
worked correctly.

This points to a couple of additional improvements:

  1) if no templates are found in listTemplates(), fail
     and report the lack of templates rather than crashing
     later in install.
     
  2) copying the files shouldn't be needed. But a symbolic
     link won't work as the check in listTemplates only
     allows a directory not a symbolic link to be
     scanned. So allow share to be a symbolic link.

Last novemeber changeset f961dbbc3573 was added which makes
roundup look in the wheel install directory.

Can you try the following:

  create a new virtualenv

  activate the virtualenv

  cd to a directory that is the current mercurial checkout of roundup
     (hg clone http://hg.code.sf.net/p/roundup/code roundup; cd roundup)

  run python ./setup.py sdist

  run pip install dist/roundup-2.1.0.tar.gz

The find above should show the templates in the wheel
location, but roundup-admin should now work.
History
Date User Action Args
2022-05-14 15:57:58rouiljsetmessageid: <1652543878.44.0.797095648138.issue2550995@roundup.psfhosted.org>
2022-05-14 15:57:58rouiljsetrecipients: + rouilj, tonimueller, austin
2022-05-14 15:57:58rouiljlinkissue2550995 messages
2022-05-14 15:57:58rouiljcreate