Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port TZPATH patch from CPython 3.9 #108

Merged
merged 4 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 11 additions & 48 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/logging_utils.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 112 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ source:
- patches/pypy_107660.patch # [name_suffix == "3.9"]
- patches/pypy_107661.patch
- patches/pypy_107668.patch # [name_suffix == "3.9"]
- patches/0001-Fix-TZPATH-on-windows.patch # [name_suffix == "3.9"]


- url: https://downloads.python.org/pypy/pypy2.7-v7.3.6-win64.zip # [win]
sha256: fcc8f6b3b472a77eaa754951f288fe234b4953bfba845888dd839b9b862cb891 # [win]
folder: pypy2-binary # [win]

build:
number: 4
number: 5
skip_compile_pyc:
- lib*

Expand Down Expand Up @@ -114,6 +115,8 @@ test:
- pypy3 -m test.test_ssl
# make sure Scripts dir exists so downstream entry_points are created successfully
- if not exist %PREFIX%\Scripts\ exit 1 # [win]
# Check that zoneinfo works from Python 3.9 onwards, see upstream issue: https://foss.heptapod.net/pypy/pypy/-/issues/3653
- python -c "from zoneinfo import ZoneInfo; from datetime import datetime; dt = datetime(2020, 10, 31, 12, tzinfo=ZoneInfo('America/Los_Angeles')); print(dt.tzname())" # [name_suffix!="3.8"]

about:
home: http://pypy.org/
Expand Down
25 changes: 25 additions & 0 deletions recipe/patches/0001-Fix-TZPATH-on-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
recipe/patches/0001-Fix-TZPATH-on-windows.patchFrom a9d9b98f645ed67923d299c5e03537abe50951df Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Wed, 7 Oct 2020 10:08:30 -0500
Subject: [PATCH] Fix TZPATH on windows

---
lib-python/3/sysconfig.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib-python/3/sysconfig.py b/lib-python/3/sysconfig.py
index a2eb52f..7dbb90c 100644
--- a/lib-python/3/sysconfig.py
+++ b/lib-python/3/sysconfig.py
@@ -585,7 +585,7 @@ def get_config_vars(*args):

if os.name == 'nt':
_init_non_posix(_CONFIG_VARS)
- _CONFIG_VARS['TZPATH'] = ''
+ _CONFIG_VARS['TZPATH'] = os.path.join(_PREFIX, "share", "zoneinfo")
if os.name == 'posix':
_init_posix(_CONFIG_VARS)
# For backward compatibility, see issue19555
--
2.42.0