patman: add distutils based installer

To make it easier to use patman on other projects add a distutils style
installer. Now patman can be installed with

  cd u-boot/tools/patman && python setup.py install

There are also the usual distutils options for creating source/binary
distributions of patman.

Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Chris Packham 2015-07-22 21:21:46 +12:00 committed by Simon Glass
parent 1ed6648be0
commit 488d19cbca
4 changed files with 39 additions and 8 deletions

View file

@ -135,6 +135,17 @@ Similar to the above, but skip the first commit and take the next 5. This
is useful if your top commit is for setting up testing. is useful if your top commit is for setting up testing.
How to install it
=================
The most up to date version of patman can be found in the U-boot sources.
However to use it on other projects it may be more convenient to install it as
a standalone application. A distutils installer is included, this can be used
to install patman:
$ cd tools/patman && python setup.py install
How to add tags How to add tags
=============== ===============

3
tools/patman/__init__.py Normal file
View file

@ -0,0 +1,3 @@
__all__ = ['checkpatch', 'command', 'commit', 'cros_subprocess',
'get_maintainer', 'gitutil', 'patchstream', 'project',
'series', 'settings', 'terminal', 'test']

View file

@ -14,14 +14,18 @@ import sys
import unittest import unittest
# Our modules # Our modules
import checkpatch try:
import command from patman import checkpatch, command, gitutil, patchstream, \
import gitutil project, settings, terminal, test
import patchstream except ImportError:
import project import checkpatch
import settings import command
import terminal import gitutil
import test import patchstream
import project
import settings
import terminal
import test
parser = OptionParser() parser = OptionParser()

13
tools/patman/setup.py Normal file
View file

@ -0,0 +1,13 @@
#
# SPDX-License-Identifier: GPL-2.0+
#
from distutils.core import setup
setup(name='patman',
version='1.0',
license='GPL-2.0+',
scripts=['patman'],
packages=['patman'],
package_dir={'patman': ''},
package_data={'patman': ['README']},
classifiers=['Environment :: Console',
'Topic :: Software Development'])