diff mbox series

[i2c-tools] py-smbus/Module.mk: Install with PREFIX defined

Message ID 20210919100851.2890107-1-morten@linderud.pw
State Accepted
Headers show
Series [i2c-tools] py-smbus/Module.mk: Install with PREFIX defined | expand

Commit Message

Morten Linderud Sept. 19, 2021, 10:08 a.m. UTC
If we are building to a defined destdir py-smbus is going to ignore this
and try install to the actual root. This breaks packaging setups as the
install section would fail.

Signed-off-by: Morten Linderud <morten@linderud.pw>
---
 py-smbus/Module.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wolfram Sang Oct. 2, 2021, 6:43 a.m. UTC | #1
On Sun, Sep 19, 2021 at 12:08:51PM +0200, Morten Linderud wrote:
> If we are building to a defined destdir py-smbus is going to ignore this
> and try install to the actual root. This breaks packaging setups as the
> install section would fail.
> 
> Signed-off-by: Morten Linderud <morten@linderud.pw>

Looks good to me, adding Jean.

> ---
>  py-smbus/Module.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/py-smbus/Module.mk b/py-smbus/Module.mk
> index 04ceb64..1e2ded1 100644
> --- a/py-smbus/Module.mk
> +++ b/py-smbus/Module.mk
> @@ -22,7 +22,7 @@ clean-python:
>  	rm -rf py-smbus/build
>  
>  install-python:
> -	$(DISTUTILS) install
> +	$(DISTUTILS) install --prefix="$(PREFIX)"
>  
>  all: all-python
>  
> -- 
> 2.33.0
Jean Delvare Oct. 4, 2021, 6:02 p.m. UTC | #2
Hi Morten,

On Sun, 19 Sep 2021 12:08:51 +0200, Morten Linderud wrote:
> If we are building to a defined destdir py-smbus is going to ignore this
> and try install to the actual root. This breaks packaging setups as the
> install section would fail.
> 
> Signed-off-by: Morten Linderud <morten@linderud.pw>
> ---
>  py-smbus/Module.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/py-smbus/Module.mk b/py-smbus/Module.mk
> index 04ceb64..1e2ded1 100644
> --- a/py-smbus/Module.mk
> +++ b/py-smbus/Module.mk
> @@ -22,7 +22,7 @@ clean-python:
>  	rm -rf py-smbus/build
>  
>  install-python:
> -	$(DISTUTILS) install
> +	$(DISTUTILS) install --prefix="$(PREFIX)"
>  
>  all: all-python
>  

Thanks for catching and fixing this. Applied.
diff mbox series

Patch

diff --git a/py-smbus/Module.mk b/py-smbus/Module.mk
index 04ceb64..1e2ded1 100644
--- a/py-smbus/Module.mk
+++ b/py-smbus/Module.mk
@@ -22,7 +22,7 @@  clean-python:
 	rm -rf py-smbus/build
 
 install-python:
-	$(DISTUTILS) install
+	$(DISTUTILS) install --prefix="$(PREFIX)"
 
 all: all-python