Re: [PATCH 2/2] python-pkg: Fix lirc version detection when cross compiling
Baruch Siach <[email protected]>
| Newsgroups | gmane.comp.hardware.lirc |
|---|---|
| Message-ID | <20170831051626.na4mca2t42j6hvdu@tarshish> |
Hi Alec,
On Wed, Aug 30, 2017 at 10:29:10PM +0200, Alec Leamas wrote:
> 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?
I'll try that.
Another option is to parse the generated VERSION file.
With this in place the lirc.config import is no longer needed, is that
correct?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot