Re: [PATCH 7/9] pylibfdt: Improved version extraction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 9 September 2018 at 22:59, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Currently setup.py expects the library version in a VERSION environment
> variable, or it exctracts the version from the Makefile.  The latter is
> for the case where the script is run standalone, rather than from make.
> But parsing the Makefile is ugly and fragile, and won't always get the
> same version we put into the C code.
>
> This changes to instead extracting the version from the trivial .h file we
> already generate to put the version into C code.  It's still slightly ugly,
> but it's simpler and since we can control the precise format of that .h,
> not as fragile.
>
> This lets us remove the remains of the makefile parsing code from setup.py.
>
> Signed-off-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  pylibfdt/Makefile.pylibfdt |  3 +-
>  pylibfdt/setup.py          | 78 ++++----------------------------------
>  2 files changed, 8 insertions(+), 73 deletions(-)

Reviewed-by: Simon Glass <sjg@xxxxxxxxxxxx>



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux