Closed Bug 620987 Opened 9 years ago Closed 9 years ago

setuptools-ify tools

Categories

(Release Engineering :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

Details

Attachments

(1 file)

I'd like to add some extra utilities to tools, and the easiest way to do that is to install into a virtualenv using setuptools.

This will let us install shell scripts, too.  Hopefully tools can become the releng swiss army knife.
This adds a setup.py that can install the modules under lib/python into a virtualenv.  If you want to edit them:

  cd tools/
  virtualenv --distribute sandbox
  . sandbox/bin/activate
  pip install -e.
  python
  >>> import util.hg

Note that you can also test it with
  python setup.py test
although at the moment a few tests fail for me (hg problems, not Python problems)

I'd like to put new functionality under the 'buildtools' package, but I don't see a huge reason to move the existing build, release, test, and util packages there.
Attachment #499330 - Flags: review?(aki)
Comment on attachment 499330 [details] [diff] [review]
m620987-tools-r1.patch

*stamp*
Attachment #499330 - Flags: review?(aki) → review+
with a comment that chmoding it and making it #!able might be nice.
Landed in a1e1ad0610bd, with a #! line and chmod +x
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
It's not a big deal, but I'm curious why the 'test' module was moved, can you explain?
Because otherwise you're making a toplevel package named 'test', which conflicts with the standard library's package of the same name.  Ideally, everything would end up under the 'buildtools' package, but we can work on that slowly.  Moving tests should have minimal impact.
aaah ok, thanks for the explanation!
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.