Closed
Bug 562473
Opened 16 years ago
Closed 15 years ago
[CLI] Mozmill should contain separate files for easier uninstalled running
Categories
(Testing Graveyard :: Mozmill, enhancement)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 568998
People
(Reporter: k0scist, Unassigned)
Details
(Whiteboard: [CLI])
Attachments
(1 file)
|
50.22 KB,
patch
|
Details | Diff | Splinter Review |
Because of its hardcoded dependency on file placement vs pkg_resources (e.g. http://github.com/mikeal/mozmill/blob/master/mozmill/__init__.py#L65 ,
extension_path = os.path.join(basedir, 'extension')
), mozmill has no real reason to be able to run from an uninstalled tree. However, no if __name__ == '__main__': clause is added to mozmill for this purpose. One reason that this is hard is that the main file (mozmill/__init__.py) contains entry points for three console_scripts:
[console_scripts]
mozmill = mozmill:cli
mozmill-thunderbird = mozmill:tbird_cli
mozmill-restart = mozmill:restart_cli
see http://github.com/mikeal/mozmill/blob/master/setup.py
In order to make the `if __name__ == '__main__'` process work, these functions should be put in three different files for convenience
| Reporter | ||
Comment 1•16 years ago
|
||
This patch seems to work. Its a fairly major restructured, but that's what I get for breaking things up into files. What I did (shorthand):
- pulled out everything from __init__.py (which now just imports from the separate files)
- put MozMill, MozMillRestart, MozMillThunderbird and command line interfaces in main.py, restart.py, and tbird.py, respectively
- added an __all__ so that import * makes sense
- added the new locations to setup.py [console_script] entry points
I've tested `mozmill` and `mozmill-restart` which seem to work fine. I made sure `mozmill-thunderbird` ran, but did not run any tests with it
Assignee: nobody → jhammel
Updated•16 years ago
|
OS: Linux → All
| Reporter | ||
Updated•16 years ago
|
Whiteboard: [mozmill-2.0?][CLI]
| Reporter | ||
Updated•15 years ago
|
Summary: Mozmill should contain separate files for easier uninstalled running → [CLI] Mozmill should contain separate files for easier uninstalled running
| Reporter | ||
Comment 2•15 years ago
|
||
I'm deassigning myself from this; its not a huge priority right now and doesn't strictly affect functionality
Assignee: jhammel → nobody
| Reporter | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Whiteboard: [mozmill-2.0?][CLI] → [CLI]
| Assignee | ||
Updated•10 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•