Re: [PATCH v3 2/4] pylibfdt: fix build lib location

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



Hi

On Fri, Sep 25, 2020 at 2:40 PM David Gibson
<david@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Sep 21, 2020 at 12:09:16PM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Mon, Sep 21, 2020 at 10:46 AM David Gibson
> > <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Tue, Sep 15, 2020 at 11:27:03PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> > > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > > >
> > > > setup.py build_ext is run from top_srcdir with Makefile.
> > > >
> > > > ../pylibfdt will produce output files in parent directory.
> > >
> > > Uh.. can you elaborate a bit on what exactly ends up where, and why
> > > the new behaviour you're setting up is better.
> >
> >
> >  ~/src/dtc $  make
> > ...
> > ~/src/dtc $  ls ../pylibfdt
> > _libfdt.cpython-38-x86_64-linux-gnu.so
> >
> >
> > It "escapes" the source directory
>
> Sorry, still not clear to me.  Is that the old behaviour or the new?

It's the current/old behaviour.

> How does it differ from the other one?

What I propose will put it again under $(curdir)/pylibfdt instead.

Apparently this was a regression from commit
1e4a0928f3b3b827824222572e551a60935607e3.

Since setup.py is invoked from top-level Makefile location, you
shouldn't have added ../ I guess.

>
> > > > Note that setup.py install will rebuild it with the default 'build'
> > > > directory. There doesn't seem to be a way to override that.
> > > That rings a bell.  ISTR it being a real PITA.
> >
> > It's a minor inconvenience imho. You just end up with an extra build/
> > directory during install.
> >
> > > >
> > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > >
> > > > ---
> > > >  pylibfdt/Makefile.pylibfdt | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt
> > > > index 32ae1c5..1b5f236 100644
> > > > --- a/pylibfdt/Makefile.pylibfdt
> > > > +++ b/pylibfdt/Makefile.pylibfdt
> > > > @@ -18,7 +18,7 @@ endif
> > > >
> > > >  $(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
> > > >       @$(VECHO) PYMOD $@
> > > > -     $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_dir)
> > > > +     $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=$(PYLIBFDT_dir)
> > > >
> > > >  install_pylibfdt: $(PYMODULE)
> > > >       @$(VECHO) INSTALL-PYLIB
> > >
> >
>
> --
> David Gibson                    | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
>                                 | _way_ _around_!
> http://www.ozlabs.org/~dgibson





[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