Re: [PATCH 2/2] python-pkg: Fix lirc version detection when cross compiling
Alec Leamas <[email protected]>
| Newsgroups | gmane.comp.hardware.lirc |
|---|---|
| Message-ID | <[email protected]> |
On 29/08/17 10:57, Baruch Siach wrote:
> The setup.py script that run on the host can't use the client library
> built for target. So setup.py falls back to a hard-coded VERSION value.
> Correct this hard-coded value, so that the generated tarball gets named
> correctly.
>
> Fixes build failure:
>
> /usr/bin/install -c -m 644 ./python-pkg/dist/lirc-0.10.0.tar.gz '.../output/host/arm-buildroot-linux-musleabihf/sysroot/usr/share/lirc'
> /usr/bin/install: cannot stat './python-pkg/dist/lirc-0.10.0.tar.gz': No such file or directory
> ---
> python-pkg/setup.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/python-pkg/setup.py b/python-pkg/setup.py
> index e9b33690f828..6c580cc8eb9e 100644
> --- a/python-pkg/setup.py
> +++ b/python-pkg/setup.py
> @@ -10,7 +10,7 @@ try:
> import lirc.config
> VERSION = lirc.config.VERSION.replace('-devel','')
> except ImportError:
> - VERSION='0.0.0'
> + VERSION='0.10.0'
>
> from setuptools import setup, Extension
Yet another place with a hard-coded version number is basically a no-no.
Perhaps it could be fixed using setup.py.in + autoconf setting the
version; a bit clumsy, but should work.
Thoughts?
--alec
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot