On Tue, Oct 06, 2020 at 12:27:09PM +0400, marcandre.lureau@xxxxxxxxxx wrote: > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > setup.py build_ext is run from top_srcdir with the Makefile > build-system, due to Makefile.pylibfdt inclusion in top_srcdir/Makefile. > > --build-lib=../pylibfdt will produce output files in the parent > directory of the current directory. Ex: > > ~/src/dtc$ make && ls ../pylibfdt > _libfdt.cpython-38-x86_64-linux-gnu.so So... this doesn't happen for me $ git rev-parse HEAD cbca977ea121d7483b0c2351b17dca08a21cb1ca $ make [...] $ ls ../pylibfdt ls: cannot access '../pylibfdt': No such file or directory $ ls pylibfdt/ build/ _libfdt.cpython-38-x86_64-linux-gnu.so* libfdt.i libfdt.py libfdt_wrap.c Makefile.pylibfdt pylibfdt/ setup.py* If I apply your patch, then the module ends up in $topdir/pylibfdt/pylibfdt instead, and make check no longer runs the python tests. So.. why it's behaving incorrectly for you but not me, I don't know :/ > Fix it by changing the build-lib directory to $(cwd)/pylibfdt instead. > > (note that setup.py install will rebuild it with the default 'build' > directory, there doesn't seem to be a way to override that) > > Fixes: 1e4a0928f3b3b827824222572e551a60935607e3 ("pylibfdt: Don't have > setup.py depend on where it's invoked from") > 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 6866a0b..0c07224 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
Attachment:
signature.asc
Description: PGP signature