Ticket #23 (new task)

Opened 3 years ago

Last modified 2 years ago

0.11b1 Support

Reported by: adrian@boreste.us Assigned to: s0undt3ch
Priority: blocker Milestone: TracWikiTemplates-0.3.0
Component: general Version: 0.3.0rc3
Keywords: Cc:

Description

Hi Pedro,

Happy 2008!!

I'm delighted with your plugin. I've found many nice uses to it. But now I migrated to Trac 0.11b1 (with both PG and SQLite) and cannot put it again to work.

Do you have any tip on how to do it or other info you'll need to guess

Any support is welcomed.

Thak you

Adrián

Attachments

diff-trunk_TracWikiTemplates-from-r7574-to-r7971.diff (53.7 kB) - added by g on 30-06-2008 23:51:21.
Changes for 0.11
diff-trunk_TracWikiTemplates-from-r7574-to-r7971.2.diff (53.7 kB) - added by g on 30-06-2008 23:51:47.
Changes for 0.11
TracWikiTemplates-for-0.11.zip (54.8 kB) - added by kennethxu on 04-10-2008 23:48:34.
For Trac 0.11. Fixed template attachment, removed broken Image macro as buildin is good enough.

Change History

22-01-2008 03:09:59 changed by adrian@boreste.us

  • version set to 0.3.0rc3.

More details:

  • installed CTXTNAV (easy_install http://trac-hacks.org/svn/ctxtnavaddplugin/)
    • OK, details below
      Adding TracCtxtnavAdd 2.0 to easy-install.pth file
      Installed /usr/lib/python2.4/site-packages/TracCtxtnavAdd-2.0-py2.4.egg
      
  • installed WikiTemplatesPlugin? (easy_install http://wikitemplates.ufsoft.org/svn/tags/0.3.0rc3)
    • Results in this:
      Processing 0.3.0rc3
      Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-xWgbBM/0.3.0rc3/egg-dist-tmp-xc5f-8
      zip_safe flag not set; analyzing archive contents...
      TracWikiTemplates 0.3.0rc3 is already the active version in easy-install.pth
      
      Installed /usr/lib/python2.4/site-packages/TracWikiTemplates-0.3.0rc3-py2.4.egg
      Processing dependencies for TracWikiTemplates==0.3.0rc3
      Traceback (most recent call last):
        File "/usr/bin/easy_install", line 7, in ?
          sys.exit(
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1588, in main
          with_ei_usage(lambda:
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1577, in with_ei_usage
          return f()
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1591, in <lambda>
          distclass=DistributionWithoutHelpCommands, **kw
        File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
          dist.run_commands()
        File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
          self.run_command(cmd)
        File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
          cmd_obj.run()
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 211, in run
          self.easy_install(spec, not self.no_deps)
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 422, in easy_install
          return self.install_item(None, download, tmpdir, deps, True)
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 473, in install_item
          self.process_distribution(spec, dist, deps)
        File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 518, in process_distribution
          distros = WorkingSet([]).resolve(
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 488, in resolve
          requirements.extend(dist.requires(req.extras)[::-1])
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2025, in requires
          dm = self._dep_map
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2017, in _dep_map
          for extra,reqs in split_sections(self._get_metadata(name)):
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2436, in split_sections
          for line in yield_lines(s):
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1731, in yield_lines
          for ss in strs:
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2039, in _get_metadata
          for line in self.get_metadata_lines(name):
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1058, in get_metadata_lines
          return yield_lines(self.get_metadata(name))
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1055, in get_metadata
          return self._get(self._fn(self.egg_info,name))
        File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1113, in _get
          return self.loader.get_data(path)
      zipimport.ZipImportError: bad local file header in /usr/lib/python2.4/site-packages/TracWikiTemplates-0.3.0rc3-py2.4.egg
      

If I now try to use Trac it collapses.

If I force to install once (easy_install TracWikiTemplates?-0.3.0rc3-py2.4.egg

  • Results in
    Processing TracWikiTemplates-0.3.0rc3-py2.4.egg
    TracWikiTemplates 0.3.0rc3 is already the active version in easy-install.pth
    
    Installed /usr/lib/python2.4/site-packages/TracWikiTemplates-0.3.0rc3-py2.4.egg
    Processing dependencies for TracWikiTemplates==0.3.0rc3
    
    Then Trac is fine again but WikiTemplatesPlugin? (even enabled in trac.ini file)
    wikitemplates.* = enabled
    
    does nothing

  • also tryed restarting Apache service.

09-04-2008 13:36:25 changed by g

Attempted similar steps and received similar results.

I was able to eliminate the "bad local file header" error:

zipimport.ZipImportError: bad local file header in c:\python25\lib\site-packages
\tracwikitemplates-0.3.0rc3-py2.5.egg

by removing the trailing commas for entry_points and classifiers in setup.py

      entry_points = {
          'trac.plugins': [
              'wikitemplates = WikiTemplates'
          ]
      },
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Web Environment',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: BSD License',
          'Operating System :: OS Independent',
          'Programming Language :: Python',
          'Topic :: Text Processing',
          'Topic :: Utilities',
          'Topic :: Internet :: WWW/HTTP',
          'Topic :: Internet :: WWW/HTTP :: Dynamic Content'
      ]

Also noticed this error in the log file...

Trac[loader] ERROR: Skipping "wikitemplates = WikiTemplates": (can't import "cannot import name attachments_to_hdf")

10-04-2008 13:21:02 changed by g

Looks like the templates need to be ported from ClearSilver? to Genshi.

12-04-2008 23:56:06 changed by s0undt3ch

Feel free to code a patch to provide the upgrade since I'm not using this anymore and I don't have time to recode it for trac 0.11.x

Sorry ppl....

29-04-2008 16:27:47 changed by g

I was able to get it to partially work by installing ClearSilver? and making a few modifications, but ran into some problems with rendering other macros within the template such as TOC.

30-06-2008 23:51:21 changed by g

  • attachment diff-trunk_TracWikiTemplates-from-r7574-to-r7971.diff added.

Changes for 0.11

30-06-2008 23:51:47 changed by g

  • attachment diff-trunk_TracWikiTemplates-from-r7574-to-r7971.2.diff added.

Changes for 0.11

30-06-2008 23:53:43 changed by g

Not sure what the best way to do it, but attached are the changes that I made in order to make WikiTemplates? mostly usable in 0.11.

29-09-2008 21:43:30 changed by kennethxu

g,

I guess you patch is based on r85. I'm unable to check out the code from this site as I'm getting "501 Not Implemented" error.

Would you please attached the zipped source tree instead so that I can download and try?

Thanks!

(follow-up: ↓ 10 ) 29-09-2008 22:26:58 changed by kennethxu

I got it to work by applying the attached patch to r85, it was a pain to get r85 as SVN is not working on this site...

  1. Install ctxtnavadd, make sure to install from 0.11 dir
    easy_install http://trac-hacks.org/svn/ctxtnavaddplugin/0.11
    
  2. Install ClearSilver, this is easy.
    easy_install SlearSilver
    
  3. Install the WikiTemplate? from the zip file in the attachement.

30-09-2008 02:21:03 changed by kennethxu

Well, seems to be working but the search is broken now :(

(in reply to: ↑ 8 ) 01-10-2008 16:13:34 changed by s0undt3ch

Replying to kennethxu:

I got it to work by applying the attached patch to r85, it was a pain to get r85 as SVN is not working on this site... 1. Install ctxtnavadd, make sure to install from 0.11 dir {{{ easy_install http://trac-hacks.org/svn/ctxtnavaddplugin/0.11 }}} 2. Install ClearSilver, this is easy. {{{ easy_install SlearSilver? }}} 3. Install the WikiTemplate? from the zip file in the attachement.

I'll see what's going on with svn checkouts.

01-10-2008 22:33:58 changed by s0undt3ch

SVN checkouts now working again.

03-10-2008 23:13:36 changed by kennethxu

Thanks for get SVN working. Do you mind to create 0.11 dev branch by coping from r85 of 0.10? So that I can send you the patch to apply to the 0.11 dev branch. Or I can help to commit to there if you give me permission.

Everything seems to be working perfectly fine here.

04-10-2008 23:48:34 changed by kennethxu

  • attachment TracWikiTemplates-for-0.11.zip added.

For Trac 0.11. Fixed template attachment, removed broken Image macro as buildin is good enough.

13-01-2009 11:07:30 changed by g

Thanks kennethxu for the fixes for search and the image macro.