Modify

Opened 16 years ago

Last modified 10 years ago

#5235 new defect

Installation with egg-file doesn't work

Reported by: trunneml@… Owned by:
Priority: normal Component: RepositoryHookSystemPlugin
Severity: normal Keywords: installation
Cc: jean.vittor@… Trac Release: 0.11

Description

I installed the Plugin by creating an egg-file and putting it into the plugin dir. But I can't find it in the Plugin-Admin-Panel Overview and even there are no new options in the admin-Panel. What did I wrong?

Attachments (0)

Change History (8)

comment:1 in reply to:  description ; Changed 15 years ago by anonymous

Replying to trunneml@studi.informatik.uni-stuttgart.de:

I installed the Plugin by creating an egg-file and putting it into the plugin dir. But I can't find it in the Plugin-Admin-Panel Overview and even there are no new options in the admin-Panel. What did I wrong?

Same error here.

Trac 0.11.4, python 2.6. I build the .egg file with python setup.py bdist_egg and copied RepositoryHookSystem-0.1.1-py2.6.egg to /projectdir/plugins/

comment:2 in reply to:  1 ; Changed 15 years ago by anonymous

Made it work by running this

easy_install RepositoryHookSystem-0.1.1-py2.6.egg

in the folder where the .egg file was located, and then enabling the plugin in trac.ini

[components] ... repository_hook_system.* = enabled

comment:3 in reply to:  2 Changed 15 years ago by anonymous

and then again.... when trying to enable a hook, I get

Trac detected an internal error: 
AttributeError: 'module' object has no attribute 'mknod'

Python Traceback
Most recent call last: 
File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\web\main.py", line 435, in _dispatch_request 
Code fragment:
    try:        if not env and env_error:            raise HTTPInternalError(env_error)        try:            dispatcher = RequestDispatcher(env)
                                      dispatcher.dispatch(req)
                                  except RequestDone:            pass        resp = req._response or []     except HTTPException, e:
                        Local variables:
Name Value 
after [u'        except RequestDone:', u'            pass', u'        resp = ... 
before [u'    try:', u'        if not env and env_error:', u'            raise ... 
dispatcher <trac.web.main.RequestDispatcher object at 0x030F0710> 
e AttributeError("'module' object has no attribute 'mknod'",) 
env <trac.env.Environment object at 0x0313A050> 
env_error None 
exc_info (<type 'exceptions.AttributeError'>, AttributeError("'module' object has ... 
filename 'C:\\Python26\\lib\\site-packages\\trac-0.11.4-py2.6-win32.egg\\trac\\web\\ ... 
frames [{'function': '_dispatch_request', 'lines_before': [u'    try:', u'        ... 
has_admin True 
line u'            dispatcher.dispatch(req)' 
lineno 434 
message u"AttributeError: 'module' object has no attribute 'mknod'" 
req <Request "POST u'/admin/repository_hooks/post-commit'"> 
resp [] 
tb <traceback object at 0x030D1698> 
tb_hide None 
traceback u'Traceback (most recent call last):\n  File ... 

File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\web\main.py", line 205, in dispatch 
Code fragment:
                            req.args.get('__FORM_TOKEN') != req.form_token:                        raise HTTPBadRequest('Missing or invalid form token. '                                             'Do you have cookies enabled?')                 # Process the request and render the template
                                          resp = chosen_handler.process_request(req)
                                          if resp:                    if len(resp) == 2: # Clearsilver                        chrome.populate_hdf(req)                        template, content_type = \                                  self._post_process_request(req, *resp)
                        Local variables:
Name Value 
chosen_handler <trac.admin.web_ui.AdminModule object at 0x03155A90> 
chrome <trac.web.chrome.Chrome object at 0x030F0230> 
ctype 'application/x-www-form-urlencoded' 
err (<type 'exceptions.AttributeError'>, AttributeError("'module' object has ... 
handler <trac.admin.web_ui.AdminModule object at 0x03155A90> 
options {} 
req <Request "POST u'/admin/repository_hooks/post-commit'"> 
self <trac.web.main.RequestDispatcher object at 0x030F0710> 

File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\admin\web_ui.py", line 113, in process_request 
Code fragment:
        if not provider:            raise HTTPNotFound(_('Unknown administration panel'))         if hasattr(provider, 'render_admin_panel'):            template, data = provider.render_admin_panel(req, cat_id, panel_id,
                                                                                   path_info)
                                   else: # support for legacy WebAdmin panels            data = {}            cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,                                                        path_info)
                        Local variables:
Name Value 
_panel_order <function _panel_order at 0x0313B8B0> 
cat_id u'repository_hooks' 
panel_id u'post-commit' 
panels [('general', 'General', 'basics', 'Basic Settings'), ('general', ... 
path_info None 
provider <repository_hook_system.admin.RepositoryHookAdmin object at 0x032903F0> 
providers {('repository_hooks', 'post-commit'): ... 
req <Request "POST u'/admin/repository_hooks/post-commit'"> 
self <trac.admin.web_ui.AdminModule object at 0x03155A90> 

File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\admin.py", line 96, in render_admin_panel 
Code fragment:
            # XXX should probably handle errors, etc            system.process_post(hookname, req)             # toggle invocation of the hook            if req.args.get('enable'):
                                          system.enable(hookname)
                                      else:                system.disable(hookname)             # set available listeners on a hook            listeners = req.args.get('listeners', [])
                        Local variables:
Name Value 
category u'repository_hooks' 
data {'hook': u'post-commit'} 
hookname u'post-commit' 
page u'post-commit' 
path_info None 
req <Request "POST u'/admin/repository_hooks/post-commit'"> 
self <repository_hook_system.admin.RepositoryHookAdmin object at 0x032903F0> 
system <repository_hook_system.svnhooksystem.SVNHookSystem object at 0x032846F0> 

File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\filesystemhooks.py", line 115, in enable 
Code fragment:
                lines[index] = command_line(projects, hookname, *self.args())                f = file(filename, 'w')                for line in lines:                    print >> f, line                            else:
                                      f = self.create(hookname)
                                      print_hook(f)                    f.close()     def disable(self, hookname):
                        Local variables:
Name Value 
filename u'd:/repositories/tractest\\hooks\\post-commit' 
hookname u'post-commit' 
print_hook <function print_hook at 0x0313BAB0> 
self <repository_hook_system.svnhooksystem.SVNHookSystem object at 0x032846F0> 

File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\filesystemhooks.py", line 80, in create 
Code fragment:
     def create(self, hookname):        """create the stub for given hook and return the file object"""                filename = self.filename(hookname)
                                  os.mknod(filename, self.mode)
                                  f = file(filename, 'w')        print >> f, "#!/bin/bash"        return f     ### methods for IRepositoryHookSetup
                        Local variables:
Name Value 
filename u'd:/repositories/tractest\\hooks\\post-commit' 
hookname u'post-commit' 
self <repository_hook_system.svnhooksystem.SVNHookSystem object at 0x032846F0> 

File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\web\main.py", line 435, in _dispatch_request
  dispatcher.dispatch(req)
File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\web\main.py", line 205, in dispatch
  resp = chosen_handler.process_request(req)
File "C:\Python26\lib\site-packages\trac-0.11.4-py2.6-win32.egg\trac\admin\web_ui.py", line 113, in process_request
  path_info)
File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\admin.py", line 96, in render_admin_panel
  system.enable(hookname)
File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\filesystemhooks.py", line 115, in enable
  f = self.create(hookname)
File "C:\Python26\lib\site-packages\repositoryhooksystem-0.1.1-py2.6.egg\repository_hook_system\filesystemhooks.py", line 80, in create
  os.mknod(filename, self.mode)

  • so, no plugin for me

comment:4 Changed 15 years ago by anonymous

I have the same problem on my Windows Vista. Is this a Windows only problem?

Here is some code from the Python Traceback.

Code fragment:

  1. def create(self, hookname):
  2. """create the stub for given hook and return the file object""" 78.
  3. filename = self.filename(hookname)
  4. os.mknod(filename, self.mode)
  5. f = file(filename, 'w')
  6. print >> f, "#!/bin/bash"
  7. return f
  8. ### methods for IRepositoryHookSetup

Local variables: Name Value filename u'd:/projects/svn/my-project\\hooks\\post-commit' hookname u'post-commit' self <repository_hook_system.svnhooksystem.SVNHookSystem object at 0x0368E0B0>

Is the filename OK with slashs and backslashs??

comment:5 Changed 15 years ago by webmaster@…

Priority: normalhigh

cant even install the egg-file

on prcessing the 'easy_install RepositoryHookSystem-0.1.1-py2.5.egg' i got the message:

Processing dependencies for RepositoryHookSystem==0.1.1
Searching for python-dateutil
Reading http://pypi.python.org/simple/python-dateutil/

Download error: (101, 'Network is unreachable') -- Some packages may not be found!

waiting for some minutes the installation broke with failed dependencies because he couldnt find the python-dateutil package

ps: my network is reachable and has access to the internet :-)

comment:6 Changed 15 years ago by anonymous

Priority: highnormal

Please don't change priorities. I consider egg-file installations the lowest priority as I don't install via egg files.

Does easy_install python-dateutil work for you? If not....you have some serious issues.

comment:7 in reply to:  2 Changed 14 years ago by anonymous

Cc: jean.vittor@… added; anonymous removed

Replying to anonymous:

Made it work by running this

easy_install RepositoryHookSystem-0.1.1-py2.6.egg

in the folder where the .egg file was located,

I miss this step :

  • egg generation pops a warning : warning: install_lib: byte-compiling is disabled, skipping.
    [me@localhost repositoryhooksystemplugin]$ python 0.11/setup.py bdist_egg
    running bdist_egg
    running egg_info
    writing requirements to RepositoryHookSystem.egg-info/requires.txt
    writing RepositoryHookSystem.egg-info/PKG-INFO
    writing top-level names to RepositoryHookSystem.egg-info/top_level.txt
    writing dependency_links to RepositoryHookSystem.egg-info/dependency_links.txt
    writing entry points to RepositoryHookSystem.egg-info/entry_points.txt
    warning: manifest_maker: standard file 'setup.py' not found
    writing manifest file 'RepositoryHookSystem.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-x86_64/egg
    running install_lib
    creating build/bdist.linux-x86_64/egg
    warning: install_lib: byte-compiling is disabled, skipping.
    creating build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying RepositoryHookSystem.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    creating 'dist/RepositoryHookSystem-0.1.1-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
    removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    
  • and easy_install fails :
    [root@localhost dist]# easy_install RepositoryHookSystem-0.1.1-py2.6.egg 
    Processing RepositoryHookSystem-0.1.1-py2.6.egg
    removing '/usr/lib/python2.6/site-packages/RepositoryHookSystem-0.1.1-py2.6.egg' (and everything under it)
    creating /usr/lib/python2.6/site-packages/RepositoryHookSystem-0.1.1-py2.6.egg
    Extracting RepositoryHookSystem-0.1.1-py2.6.egg to /usr/lib/python2.6/site-packages
    error: byte-compiling is disabled.
    

...

comment:8 Changed 10 years ago by Ryan J Ollos

Owner: Jeff Hammel deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.