Patchwork [1,of,3,py3] packaging: allow to run make with python3

login
register
mail settings
Submitter Philippe Pepiot
Date April 4, 2019, 5:09 p.m.
Message ID <c9030c811fdff7190834.1554397791@euler.in.philpep.org>
Download mbox | patch
Permalink /patch/39478/
State Accepted
Headers show

Comments

Philippe Pepiot - April 4, 2019, 5:09 p.m.
# HG changeset patch
# User Philippe Pepiot <philippe.pepiot@logilab.fr>
# Date 1554397608 -7200
#      Thu Apr 04 19:06:48 2019 +0200
# Node ID c9030c811fdff71908344bb17f05bb71d314acc7
# Parent  4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c
[py3] packaging: allow to run make with python3

Use "?=", otherwise the variable cannot be set from environment.
Gregory Szorc - April 4, 2019, 10:35 p.m.
On Thu, Apr 4, 2019 at 10:12 AM Philippe Pepiot <philippe.pepiot@logilab.fr>
wrote:

> # HG changeset patch
> # User Philippe Pepiot <philippe.pepiot@logilab.fr>
> # Date 1554397608 -7200
> #      Thu Apr 04 19:06:48 2019 +0200
> # Node ID c9030c811fdff71908344bb17f05bb71d314acc7
> # Parent  4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c
> [py3] packaging: allow to run make with python3
>

Queued this series, thanks.


>
> Use "?=", otherwise the variable cannot be set from environment.
>
> diff --git a/Makefile b/Makefile
> --- a/Makefile
> +++ b/Makefile
> @@ -5,7 +5,7 @@
>  # % make PREFIX=/opt/ install
>
>  export PREFIX=/usr/local
> -PYTHON=python
> +PYTHON?=python
>  $(eval HGROOT := $(shell pwd))
>  HGPYTHONS ?= $(HGROOT)/build/pythons
>  PURE=
> diff --git a/doc/Makefile b/doc/Makefile
> --- a/doc/Makefile
> +++ b/doc/Makefile
> @@ -6,7 +6,7 @@ GENDOC=gendoc.py ../mercurial/commands.p
>  PREFIX=/usr/local
>  MANDIR=$(PREFIX)/share/man
>  INSTALL=install -c -m 644
> -PYTHON=python
> +PYTHON?=python
>  RSTARGS=
>
>  export HGENCODING=UTF-8
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Yuya Nishihara - April 6, 2019, 12:52 a.m.
On Thu, 04 Apr 2019 19:09:51 +0200, Philippe Pepiot wrote:
> # HG changeset patch
> # User Philippe Pepiot <philippe.pepiot@logilab.fr>
> # Date 1554397608 -7200
> #      Thu Apr 04 19:06:48 2019 +0200
> # Node ID c9030c811fdff71908344bb17f05bb71d314acc7
> # Parent  4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c
> [py3] packaging: allow to run make with python3
> 
> Use "?=", otherwise the variable cannot be set from environment.
> 
> diff --git a/Makefile b/Makefile
> --- a/Makefile
> +++ b/Makefile
> @@ -5,7 +5,7 @@
>  # % make PREFIX=/opt/ install
>  
>  export PREFIX=/usr/local
> -PYTHON=python
> +PYTHON?=python

For the record, make variables can be explicitly overridden by command line
in 'make FOO=bar' form.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ 
 # % make PREFIX=/opt/ install
 
 export PREFIX=/usr/local
-PYTHON=python
+PYTHON?=python
 $(eval HGROOT := $(shell pwd))
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=
diff --git a/doc/Makefile b/doc/Makefile
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,7 +6,7 @@  GENDOC=gendoc.py ../mercurial/commands.p
 PREFIX=/usr/local
 MANDIR=$(PREFIX)/share/man
 INSTALL=install -c -m 644
-PYTHON=python
+PYTHON?=python
 RSTARGS=
 
 export HGENCODING=UTF-8