Skip to content

Commit

Permalink
Merge pull request #116 from mattip/pypy7.3.15
Browse files Browse the repository at this point in the history
Pypy7.3.15
  • Loading branch information
mattip authored Jan 30, 2024
2 parents b7b8e0b + e108878 commit d57c623
Show file tree
Hide file tree
Showing 21 changed files with 359 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

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

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

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

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

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

2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
- '10.13'
bzip2:
- '1'
c_compiler:
Expand Down
25 changes: 23 additions & 2 deletions .gitignore

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

9 changes: 6 additions & 3 deletions .scripts/build_steps.sh

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

9 changes: 9 additions & 0 deletions .scripts/run_docker_build.sh

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

13 changes: 10 additions & 3 deletions .scripts/run_osx_build.sh

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

10 changes: 9 additions & 1 deletion .scripts/run_win_build.bat

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

2 changes: 1 addition & 1 deletion README.md

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

2 changes: 1 addition & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ PY_VERSION=$(echo $PKG_NAME | cut -c 5-)

# Make sure the site-packages dir match with cpython
mkdir -p $PREFIX/lib/python${PY_VERSION}/site-packages
mv $PREFIX/lib/pypy${PY_VERSION}/site-packages/README $PREFIX/lib/python${PY_VERSION}/site-packages/
mv $PREFIX/lib/pypy${PY_VERSION}/site-packages/README* $PREFIX/lib/python${PY_VERSION}/site-packages/
rm -rf $PREFIX/lib/pypy${PY_VERSION}/site-packages
ln -sf $PREFIX/lib/python${PY_VERSION}/site-packages $PREFIX/lib/pypy${PY_VERSION}/site-packages
pushd $PREFIX
Expand Down
3 changes: 3 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
name_suffix:
- 3.9
# - 3.10
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 10.13 # [osx]
28 changes: 19 additions & 9 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
{% set name_suffix = "3.9" %}
{% endif %}
{% set name = "pypy" ~ name_suffix %}
{% set version = "7.3.15" %}

package:
name: {{ name }}
version: 7.3.13 # [name_suffix == "3.9"]
version: {{ version }}

source:
- folder: pypy3
url: https://downloads.python.org/pypy/{{ name }}-v7.3.13-src.tar.bz2 # [name_suffix == "3.9"]
sha256: bc6147268105e7cb3bd57b401e6d97f66aa4ede269104b2712a7cdd9f02f68cd
url: https://downloads.python.org/pypy/{{ name }}-v{{ version }}-src.tar.bz2
sha256: 6bb9537d85aa7ad13c0aad2e41ff7fd55080bc9b4d1361b8f502df51db816e18 # [name_suffix == "3.9"]
sha256: 837622130b36603a1893899bd9f529961a8e4a56c9eb67268d72ddf8920c9579 # [name_suffix == "3.10"]
patches:
- patches/fficurses.patch
- patches/tklib_build.patch
Expand All @@ -21,24 +23,29 @@ source:
- patches/0021-Adapt-platform-to-patch-0001.patch
- patches/0023b-Fix-LIBDIR.patch
- patches/0030-Swap-libffi8-for-7.patch
# Patches by @mingwandroid from python-feedstock
# Patches from python-feedstock
- patches/0009-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
- patches/0012-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
- patches/0013-Disable-new-dtags-in-unixccompiler.py.patch
- patches/0014-Add-CondaEcosystemModifyDllSearchPath.patch
- patches/0020-Use-ranlib-from-env-if-env-variable-is-set.patch
- patches/0024-Fix-LDSHARED-when-CC-is-overriden-on-Linux-too.patch
- patches/0032-Copy-dependent-libs-for-venvs.patch
- patches/0001-Fix-TZPATH-on-windows.patch
# Patches to be removed in the next version
- patches/pypy_107825.patch
- patches/0001-Fix-TZPATH-on-windows.patch # [name_suffix == "3.9"]
- patches/0001-Fix-TZPATH-on-windows-py3.10.patch # [name_suffix == "3.10"]
# Patches since the release
- patches/0001-fix-os.scandir-for-unicode-filenames-on-windows.patch
- patches/0003-add-coding-to-test-file-for-cpython2-pypy2-does-not-.patch
- patches/0004-PyPy-is-not-affected-by-bpo-35797.patch
- patches/0005-underlying-_putwch-on-windows-accepts-a-chr-not-an-i.patch
- patches/0006-refactor-to-properly-create-ppc64-import-suffixes.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: 1
number: 0
skip_compile_pyc:
- lib*

Expand Down Expand Up @@ -76,11 +83,14 @@ requirements:
- xz
- zlib
- tzdata
- __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
run_constrained:
- pypy3.5 ==99999999999
- pypy3.6 ==99999999999
- pypy3.7 ==99999999999
- pypy3.8 ==99999999999 # [name_suffix=="3.9"]
- pypy3.8 ==99999999999
- pypy3.9 ==99999999999 # [name_suffix=="3.10"]
- pypy3.10 ==99999999999 # [name_suffix=="3.9"]
- python {{ name_suffix }}.* *_73_pypy

test:
Expand Down
25 changes: 25 additions & 0 deletions recipe/patches/0001-Fix-TZPATH-on-windows-py3.10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From e0c2b1bee5ab709c777aa80061ab90122987d635 Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Mon, 29 Jan 2024 22:54:22 +0200
Subject: [PATCH] Fix TZPATH on windows py3.10

---
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 71d9eff79aa..d0b38747834 100644
--- a/lib-python/3/sysconfig.py
+++ b/lib-python/3/sysconfig.py
@@ -510,7 +510,7 @@ def _init_non_posix(vars):
vars['EXE'] = '.exe'
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
- vars['TZPATH'] = ''
+ vars['TZPATH'] = os.path.join(_PREFIX, "share", "zoneinfo")
# pypy: give us control over the ABI tag in a wheel name
so_ext = _imp.extension_suffixes()[0]
vars['SOABI']= '-'.join(so_ext.split('.')[1].split('-')[:2])
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From f98fef2741780bfcb1870ad61b6a66ae4400a2e4 Mon Sep 17 00:00:00 2001
From: Matti Picus <matti.picus@gmail.com>
Date: Mon, 15 Jan 2024 21:59:18 +0200
Subject: [PATCH 1/6] fix os.scandir for unicode filenames on windows

---
pypy/module/posix/interp_scandir.py | 10 +++++-----
pypy/module/posix/test/test_scandir.py | 10 +++++++++-
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/pypy/module/posix/interp_scandir.py b/pypy/module/posix/interp_scandir.py
index 027be819ba2..e1e9ac44af8 100644
--- a/pypy/module/posix/interp_scandir.py
+++ b/pypy/module/posix/interp_scandir.py
@@ -13,7 +13,7 @@ from pypy.interpreter.buffer import BufferInterfaceNotFound
from pypy.objspace.std.util import generic_alias_class_getitem

from pypy.module.posix.interp_posix import (path_or_fd, build_stat_result,
- _WIN32, dup)
+ _WIN32, dup, FileEncoder)


# XXX: update os.supports_fd when fd support is implemented
@@ -335,8 +335,8 @@ class W_DirEntry(W_Root):
def get_lstat(self):
"""Get the lstat() of the direntry."""
if (self.flags & FLAG_LSTAT) == 0:
- w_path = self.space.utf8_0_w(self.fget_path(self.space))
- st = rposix_stat.lstat(w_path)
+ path = FileEncoder(self.space, self.fget_path(self.space))
+ st = rposix_stat.lstat(path)
self.d_lstat = st
self.flags |= FLAG_LSTAT
return self.d_lstat
@@ -356,8 +356,8 @@ class W_DirEntry(W_Root):
must_call_stat = stat.S_ISLNK(self.d_lstat.st_mode)

if must_call_stat:
- w_path = self.space.utf8_0_w(self.fget_path(self.space))
- st = rposix_stat.stat(w_path)
+ path = FileEncoder(self.space, self.fget_path(self.space))
+ st = rposix_stat.stat(path)
else:
st = self.d_lstat

diff --git a/pypy/module/posix/test/test_scandir.py b/pypy/module/posix/test/test_scandir.py
index 45f3abe7bab..619ccd47680 100644
--- a/pypy/module/posix/test/test_scandir.py
+++ b/pypy/module/posix/test/test_scandir.py
@@ -41,9 +41,11 @@ class AppTestScandir(object):
cls.w_dir_empty = space.wrap(_make_dir('empty', {}))
cls.w_dir0 = space.wrap(_make_dir('dir0', {'f1': 'file',
'f2': 'file',
- 'f3': 'file'}))
+ 'f3': 'file',
+ }))
cls.w_dir1 = space.wrap(_make_dir('dir1', {'file1': 'file'}))
cls.w_dir2 = space.wrap(_make_dir('dir2', {'subdir2': 'dir'}))
+ cls.w_dir4860 = space.wrap(_make_dir('dir4860', {'ünicode': 'dir'}))
if has_os_symlink:
cls.w_dir3 = space.wrap(_make_dir('dir3', {'sfile3': 'symlink-file'}))
cls.w_dir4 = space.wrap(_make_dir('dir4', {'sdir4': 'symlink-dir'}))
@@ -255,3 +257,9 @@ class AppTestScandir(object):
with open(d) as fp:
length = len(fp.read())
assert posix.lstat(d).st_size == length
+
+ def test_unicode_dir(self):
+ # issue 4860: windows and scandir
+ posix = self.posix
+ files = list(posix.scandir(self.dir4860))
+ assert files[0].is_dir()
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From c8fe69d6ce20016ae12114fd4b67ab0920832562 Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Fri, 19 Jan 2024 09:20:05 +0200
Subject: [PATCH 3/6] add coding to test file for cpython2, pypy2 does not need
this (?)

---
pypy/module/posix/test/test_scandir.py | 1 +
1 file changed, 1 insertion(+)

diff --git a/pypy/module/posix/test/test_scandir.py b/pypy/module/posix/test/test_scandir.py
index 619ccd47680..19db5927bbe 100644
--- a/pypy/module/posix/test/test_scandir.py
+++ b/pypy/module/posix/test/test_scandir.py
@@ -1,3 +1,4 @@
+# coding=utf-8
import sys, os
import py
from rpython.tool.udir import udir
--
2.34.1

Loading

0 comments on commit d57c623

Please sign in to comment.