[U-Boot] [PATCH v3] patman: add distutils based installer

Chris Packham judge.packham at gmail.com
Thu Jul 23 11:20:09 CEST 2015


On Thu, Jul 23, 2015 at 2:10 PM, Simon Glass <sjg at chromium.org> wrote:
> Hi Chris,
>
> On 22 July 2015 at 03:21, Chris Packham <judge.packham at gmail.com> wrote:
>> 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 at chromium.org>
>> Signed-off-by: Chris Packham <judge.packham at gmail.com>
>>
>> ---
>> This gives us something that can be distributed separately as well as
>> in-tree. The import trick allows the python module "patman" to be
>> distributed and enables in-tree use without moving things around. An
>> alternative would be to move the files into a sub directory
>> (unfortunately a directory called "patman" would clash with the existing
>> symlink).
>>
>> Thanks,
>> Chris
>>
>> Changes in v3:
>> - Add installation instructions to tools/patman/README
>> - Drop RFC, Add sign-off
>> - Collect tested tag from Simon
>>
>> Changes in v2:
>> - Install as "patman" package
>> - Allow running in-tree or out-of-tree
>>
>>  tools/patman/README      | 11 +++++++++++
>>  tools/patman/__init__.py |  3 +++
>>  tools/patman/patman.py   | 20 ++++++++++++--------
>>  tools/patman/setup.py    | 13 +++++++++++++
>>  4 files changed, 39 insertions(+), 8 deletions(-)
>>  create mode 100644 tools/patman/__init__.py
>>  create mode 100644 tools/patman/setup.py
>
> Acked-by: Simon Glass <sjg at chromium.org>
>
> BTW in the README it should be U-Boot with a capital b. I can fix that
> up when I apply it if you like.

Yes thanks.

> For me I needed 'sudo' on the python
> command. Is that expected?

Depending on your OS and where you want to install it yes. You could also use

 $ python setup.py install --user

or

 $ python setup.py install --home=~

or even

 $ python setup.py bdist_rpm
 $ sudo rpm -i dist/patman-1.0-1.noarch.rpm

distutils[1] provides lots of knobs for how you might want to install
packages (except for .deb, I have no idea why bdist_deb isn't a
thing).

--
[1] - https://docs.python.org/2/install/index.html#install-index


More information about the U-Boot mailing list