summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2015-07-22 21:21:46 +1200
committerSimon Glass <sjg@chromium.org>2015-07-28 10:36:25 -0600
commit488d19cbcace0b87a2d08881eab7356088198903 (patch)
treef9281221aab01bd319535e2c9f2b24d892c93e67 /tools
parent1ed6648be08e4da76a08a09317932c73db0745ff (diff)
downloadu-boot-imx-488d19cbcace0b87a2d08881eab7356088198903.zip
u-boot-imx-488d19cbcace0b87a2d08881eab7356088198903.tar.gz
u-boot-imx-488d19cbcace0b87a2d08881eab7356088198903.tar.bz2
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/patman/README11
-rw-r--r--tools/patman/__init__.py3
-rwxr-xr-xtools/patman/patman.py20
-rw-r--r--tools/patman/setup.py13
4 files changed, 39 insertions, 8 deletions
diff --git a/tools/patman/README b/tools/patman/README
index 27ec90a..5bd74c4 100644
--- a/tools/patman/README
+++ b/tools/patman/README
@@ -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.
+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
===============
diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py
new file mode 100644
index 0000000..7cbe5fa
--- /dev/null
+++ b/tools/patman/__init__.py
@@ -0,0 +1,3 @@
+__all__ = ['checkpatch', 'command', 'commit', 'cros_subprocess',
+ 'get_maintainer', 'gitutil', 'patchstream', 'project',
+ 'series', 'settings', 'terminal', 'test']
diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 6c6473e..e76fc42 100755
--- a/tools/patman/patman.py
+++ b/tools/patman/patman.py
@@ -14,14 +14,18 @@ import sys
import unittest
# Our modules
-import checkpatch
-import command
-import gitutil
-import patchstream
-import project
-import settings
-import terminal
-import test
+try:
+ from patman import checkpatch, command, gitutil, patchstream, \
+ project, settings, terminal, test
+except ImportError:
+ import checkpatch
+ import command
+ import gitutil
+ import patchstream
+ import project
+ import settings
+ import terminal
+ import test
parser = OptionParser()
diff --git a/tools/patman/setup.py b/tools/patman/setup.py
new file mode 100644
index 0000000..e61804f
--- /dev/null
+++ b/tools/patman/setup.py
@@ -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'])