Opened 3 years ago

Closed 10 months ago

# Having difficulty installing this plugin

Reported by: Owned by: David.Byrne@… ejucovy normal WorkflowActionButtonsPlugin normal 1.0

### Description

I downloaded the zip file and tried to install it with easy_install. I got the following output:

error: Setup script exited with error: can't copy 'workflow_actionbuttons/htdocs/fontawesome': doesn't exist or not a regular file


The directory exists, but it looks like it is expecting a file instead of a directory. I've also tried using 'python setup.py build' and I get a similar error.

### comment:1 Changed 3 years ago by ejucovy

• Status changed from new to accepted

Sorry - looking into this now.

### comment:2 Changed 3 years ago by ejucovy

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

I think I've fixed the error now. Any of the following commands should work to install the plugin now:

• easy_install https://github.com/ejucovy/trac-WorkflowActionButtonsPlugin/archive/master.zip (install current development head)
• easy_install https://github.com/ejucovy/trac-WorkflowActionButtonsPlugin/archive/0.2.zip (install 0.2 release tag that I just made)
• easy_install trac-WorkflowActionButtons (install latest release from PyPI)

### comment:3 Changed 3 years ago by David.Byrne@…

I used the third option and it didn't install the htdocs part of the package. The installation seemed to work, but the plugin didn't because it didn't have the Javascript or fonts. I copied over the contents from the zip file that I downloaded and it worked great after that. You may want to fix it so that the htdocs entries get copied.

### comment:4 Changed 3 years ago by ejucovy

• Resolution fixed deleted
• Status changed from closed to reopened

Grr. I never get this right. :-(

Reopening until I figure that out.

### comment:5 Changed 3 years ago by charlesc-trac-hacks.org@…

I've run into a related error. I don't just easy_install Trac plugins; I download the source (from PyPI in my case) and do python setup.py bdist_egg to generate the egg file, then drop that in the trac-env/plugins/ dir (this is the recommended way to install Trac plugins iirc?).

Doing this with this plugin, then enabling it in the [components] section of the config, results in Trac failing to start up with an error that ends:

  File ".../lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1350, in _extract_resource
zip_stat = self.zipinfo[zip_path]
KeyError: 'workflow_actionbuttons/templates'


### comment:6 Changed 3 years ago by ejucovy

Sorry -- got busy and never circled back to this. I /think/ I've now fixed it properly...

Would you mind trying again with this copy of the source: https://github.com/ejucovy/trac-WorkflowActionButtonsPlugin/archive/master.zip

Your installation method should work fine here -- just download and unpack the source, then python setup.py bdist_egg, then replace the other copy of the plugin that's in your /plugins/ dir.

If it works for you I'll release a new version to PyPI and (finally) close this ticket.

Thanks!

### comment:7 follow-up: ↓ 8 Changed 3 years ago by charlesc-trac-hacks.org@…

With the master.zip version, the error at startup is indeed gone - but it's not quite working yet. The htdocs don't appear to be getting found - i.e. I see a request for https://trac.example.org/chrome/workflow_actionbuttons/actionbuttons.js" but that 404s and that file is not present in the .../deploy/htdocs/ directory (so of course the new controls aren't shown). Shouldn't it need to get them from the egg with this installation method? Sorry, I'm no Trac expert...

### comment:8 in reply to: ↑ 7 Changed 3 years ago by charlesc-trac-hacks.org@…

With the master.zip version, the error at startup is indeed gone - but it's not quite working yet. The htdocs don't appear to be getting found - i.e. I see a request for https://trac.example.org/chrome/workflow_actionbuttons/actionbuttons.js" but that 404s and that file is not present in the .../deploy/htdocs/ directory (so of course the new controls aren't shown). Shouldn't it need to get them from the egg with this installation method? Sorry, I'm no Trac expert...

Edit: I should also have said that after installing the egg, I did trac-admin ... deploy <deploy-dir> in case that was needed to write out the htdocs, but it doesn't appear to have written any files from this plugin.

### comment:9 Changed 3 years ago by ejucovy

Ah I didn't think to test the deploy step -- I always just let the trac wsgi process serve its own static files.

I'll take another look. Sorry about the continued trouble.

### comment:10 Changed 3 years ago by ejucovy

I ran the bdist_egg installation method, dropped the .egg file into my environment's plugins/ directory, and ran trac-admin ... deploy <deploy-dir>. I do see the plugin's static files in my deploy dir:

Copying resources from:
trac.web.chrome.Chrome
/private/tmp/trac/lib/python2.7/site-packages/trac/htdocs
/private/tmp/trac/foo/htdocs
workflow_actionbuttons.web_ui.WebUI
/Users/ethanjucovy/.python-eggs/trac_WorkflowActionButtons-0.2-py2.7.egg-tmp/workflow_actionbuttons/htdocs/main
/Users/ethanjucovy/.python-eggs/trac_WorkflowActionButtons-0.2-py2.7.egg-tmp/workflow_actionbuttons/htdocs/fontawesome
/Users/ethanjucovy/.python-eggs/trac_WorkflowActionButtons-0.2-py2.7.egg-tmp/workflow_actionbuttons/htdocs/jquery.modal

$ls deploy-dir/htdocs/ common fontawesome jquery.modal site workflow_actionbuttons$ ls deploy-dir/htdocs/workflow_actionbuttons
actionbuttons.css  actionbuttons.js


...so I'm not sure offhand where it's going wrong for your setup.

Can you try running a standalone tracd development server with e.g. tracd -p 8080 -b 0.0.0.0 <env> and then visiting http://<domain>:8080/<env>/chrome/workflow_actionbuttons/actionbuttons.js?

If that 404s as well, then there's probably another installation issue causing Trac to silently ignore the plugin's .egg file -- you might then try configuring trac.ini's [logging] to a file at level = DEBUG and seeing if there's any interesting-looking messages in there when you start up the tracd server and/or make a new http request to it.

### comment:11 Changed 10 months ago by rjollos

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

Confirmed that it's working correctly.