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)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 568998

People

(Reporter: k0scist, Unassigned)

Details

(Whiteboard: [CLI])

Attachments

(1 file)

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
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
OS: Linux → All
Whiteboard: [mozmill-2.0?][CLI]
Summary: Mozmill should contain separate files for easier uninstalled running → [CLI] Mozmill should contain separate files for easier uninstalled running
I'm deassigning myself from this; its not a huge priority right now and doesn't strictly affect functionality
Assignee: jhammel → nobody
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Whiteboard: [mozmill-2.0?][CLI] → [CLI]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: