diff mbox

[v2,1/1] Build Python with tzset support

Message ID 1404902339-25481-1-git-send-email-henry.margies@gmail.com
State Accepted
Headers show

Commit Message

Henry Margies July 9, 2014, 10:38 a.m. UTC
This patch adds support for time.tzset() in Python2.7 and Python3.

The Python configure script sets ac_cv_working_tzset to 'no' when
cross compiling, although it should be available and work with all 
toolchains supported by Buildroot (?).
The patch below pre-sets the variable so that time.tzset() works.


Signed-off-by: Henry Margies <henry.margies@gmail.com>
---
Changes v1 -> v2:
 - added similar patch for Python3

 package/python/python.mk   |    3 ++-
 package/python3/python3.mk |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

Comments

Henry Margies July 11, 2014, 4:47 p.m. UTC | #1
Hi all,

any comments on my patch? Please let me know if there is something wrong with it or whether I sent it the wrong way?


Best regards & a nice weekend,

Henry


On 9 Jul 2014, at 11:38, Henry Margies <henry.margies@gmail.com> wrote:

> This patch adds support for time.tzset() in Python2.7 and Python3.
> 
> The Python configure script sets ac_cv_working_tzset to 'no' when
> cross compiling, although it should be available and work with all 
> toolchains supported by Buildroot (?).
> The patch below pre-sets the variable so that time.tzset() works.
> 
> 
> Signed-off-by: Henry Margies <henry.margies@gmail.com>
> ---
> Changes v1 -> v2:
> - added similar patch for Python3
> 
> package/python/python.mk   |    3 ++-
> package/python3/python3.mk |    1 +
> 2 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/package/python/python.mk b/package/python/python.mk
> index cb54e3e..b237848 100644
> --- a/package/python/python.mk
> +++ b/package/python/python.mk
> @@ -121,7 +121,8 @@ endif
> PYTHON_CONF_ENV += \
> 	ac_cv_have_long_long_format=yes \
> 	ac_cv_file__dev_ptmx=yes \
> -	ac_cv_file__dev_ptc=yes
> +	ac_cv_file__dev_ptc=yes \
> +	ac_cv_working_tzset=yes
> 
> PYTHON_CONF_OPT += \
> 	--without-cxx-main 	\
> diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> index 98fc31b..1591ac9 100644
> --- a/package/python3/python3.mk
> +++ b/package/python3/python3.mk
> @@ -96,6 +96,7 @@ PYTHON3_CONF_ENV += \
> 	ac_cv_have_long_long_format=yes \
> 	ac_cv_file__dev_ptmx=yes \
> 	ac_cv_file__dev_ptc=yes \
> +	ac_cv_working_tzset=yes
> 
> PYTHON3_CONF_OPT += \
> 	--without-ensurepip	\
> -- 
> 1.7.2.5
>
Thomas Petazzoni July 15, 2014, 6:40 p.m. UTC | #2
Dear Henry Margies,

On Wed,  9 Jul 2014 11:38:59 +0100, Henry Margies wrote:
> This patch adds support for time.tzset() in Python2.7 and Python3.
> 
> The Python configure script sets ac_cv_working_tzset to 'no' when
> cross compiling, although it should be available and work with all 
> toolchains supported by Buildroot (?).
> The patch below pre-sets the variable so that time.tzset() works.
> 
> 
> Signed-off-by: Henry Margies <henry.margies@gmail.com>
> ---
> Changes v1 -> v2:
>  - added similar patch for Python3

Applied, thanks. I've adjusted a bit the commit title, as the normal
format is:

	<package>: <what's happening>

Ideally, two separate patches, one for Python 2 and one for Python 3
would have been better, but ok for this time.

Thanks for your contribution!

Thomas
diff mbox

Patch

diff --git a/package/python/python.mk b/package/python/python.mk
index cb54e3e..b237848 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -121,7 +121,8 @@  endif
 PYTHON_CONF_ENV += \
 	ac_cv_have_long_long_format=yes \
 	ac_cv_file__dev_ptmx=yes \
-	ac_cv_file__dev_ptc=yes
+	ac_cv_file__dev_ptc=yes \
+	ac_cv_working_tzset=yes
 
 PYTHON_CONF_OPT += \
 	--without-cxx-main 	\
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 98fc31b..1591ac9 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -96,6 +96,7 @@  PYTHON3_CONF_ENV += \
 	ac_cv_have_long_long_format=yes \
 	ac_cv_file__dev_ptmx=yes \
 	ac_cv_file__dev_ptc=yes \
+	ac_cv_working_tzset=yes
 
 PYTHON3_CONF_OPT += \
 	--without-ensurepip	\