Re: [PATCH 3/7] pylibfdt: Use environment to pass C flags and files

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



On 26 Mar 2017 13:06, Simon Glass wrote:
> --- a/pylibfdt/Makefile.pylibfdt
> +++ b/pylibfdt/Makefile.pylibfdt
> @@ -7,7 +7,8 @@ PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
>  
>  $(PYMODULE): $(PYLIBFDT_srcs) $(WRAP)
>  	@$(VECHO) PYMOD $@
> -	python $(PYLIBFDT_objdir)/setup.py "$(CPPFLAGS)" $^
> +	SOURCES="$^" CPPFLAGS="$(CPPFLAGS)" \
> +	python $(PYLIBFDT_objdir)/setup.py --quiet build_ext --inplace

you should make setup.py executable and drop the `python` call here

> +files = os.environ['SOURCES'].split()

you could parse this from the Makefile

> +cflags = os.environ['CPPFLAGS'].split()

this should be:
cflags = os.environ.get('CPPFLAGS', '').split()

>  libfdt_module = Extension(
>      '_libfdt',
>      sources = files,

python style says to not put spaces around = when it comes to args
-mike

Attachment: signature.asc
Description: Digital signature


[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