git: ed1981f6adae - main - devel/py-google-pasta: Update 0.1.7 => 0.2.0, take maintainership

From: Yusuf Yaman <nxjoseph_at_FreeBSD.org>
Date: Sun, 06 Sep 2026 13:43:47 UTC
The branch main has been updated by nxjoseph:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ed1981f6adae8d3daa7dc45130dc0f3533629da4

commit ed1981f6adae8d3daa7dc45130dc0f3533629da4
Author:     Christos Longros <chris.longros@gmail.com>
AuthorDate: 2026-08-23 09:51:30 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-09-06 13:43:09 +0000

    devel/py-google-pasta: Update 0.1.7 => 0.2.0, take maintainership
    
    The project is archived upstream and 0.2.0 is the final release.
    
    While here:
    - Switch to pep517.
    - Switch to DISTVERSION.
    - Remove obsolete patch files/patch-setup.py.
    - Add patch to fix one of the tests.
    - Add unittest to USE_PYTHON.
    
    Commit log:
    https://github.com/google/pasta/compare/v0.1.7...v0.2.0
    
    PR:             297803
    Approved by:    osa, vvd (Mentors, implicit)
---
 devel/py-google-pasta/Makefile                     |  9 ++---
 devel/py-google-pasta/distinfo                     |  6 ++--
 .../files/patch-pasta_augment_inline__test.py      | 39 ++++++++++++++++++++++
 devel/py-google-pasta/files/patch-setup.py         | 27 ---------------
 4 files changed, 47 insertions(+), 34 deletions(-)

diff --git a/devel/py-google-pasta/Makefile b/devel/py-google-pasta/Makefile
index ba2f7f51465e..6f94263107ad 100644
--- a/devel/py-google-pasta/Makefile
+++ b/devel/py-google-pasta/Makefile
@@ -1,20 +1,21 @@
 PORTNAME=	google-pasta
-PORTVERSION=	0.1.7
-PORTREVISION=	2
+DISTVERSION=	0.2.0
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	chris.longros@gmail.com
 COMMENT=	Library to refactor python code through AST manipulation
 WWW=		https://github.com/google/pasta
 
 LICENSE=	APACHE20
 
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
 
 USES=		python
-USE_PYTHON=	distutils autoplist
+USE_PYTHON=	autoplist pep517 unittest
 
 NO_ARCH=	yes
 
diff --git a/devel/py-google-pasta/distinfo b/devel/py-google-pasta/distinfo
index a2c7ba131c63..2fd11a527c63 100644
--- a/devel/py-google-pasta/distinfo
+++ b/devel/py-google-pasta/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1564217403
-SHA256 (google-pasta-0.1.7.tar.gz) = 79d1ce28b381d68e98ef7707d19909adb58912f8dae8734402454424fc76b8fe
-SIZE (google-pasta-0.1.7.tar.gz) = 37090
+TIMESTAMP = 1787478588
+SHA256 (google-pasta-0.2.0.tar.gz) = c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e
+SIZE (google-pasta-0.2.0.tar.gz) = 40430
diff --git a/devel/py-google-pasta/files/patch-pasta_augment_inline__test.py b/devel/py-google-pasta/files/patch-pasta_augment_inline__test.py
new file mode 100644
index 000000000000..a827ab7774c4
--- /dev/null
+++ b/devel/py-google-pasta/files/patch-pasta_augment_inline__test.py
@@ -0,0 +1,39 @@
+This failure is caused by a Python 3.12 compatibility break: assertRaisesRegexp was deprecated in Python 3.2 and fully removed in Python 3.12. It has been replaced by assertRaisesRegex.
+
+--- pasta/augment/inline_test.py.orig	2026-09-06 13:29:54 UTC
++++ pasta/augment/inline_test.py
+@@ -60,7 +60,7 @@ class InlineTest(test_utils.TestCase):
+         NOT_A_CONSTANT += "bar"
+         ''')
+     t = ast.parse(src)
+-    with self.assertRaisesRegexp(inline.InlineError,
++    with self.assertRaisesRegex(inline.InlineError,
+                                  '\'NOT_A_CONSTANT\' is not a constant'):
+       inline.inline_name(t, 'NOT_A_CONSTANT')
+ 
+@@ -68,7 +68,7 @@ class InlineTest(test_utils.TestCase):
+     src = 'def func(): pass\nfunc()\n'
+     t = ast.parse(src)
+ 
+-    with self.assertRaisesRegexp(
++    with self.assertRaisesRegex(
+         inline.InlineError,
+         '\'func\' is not a constant; it has type %r' % ast.FunctionDef):
+       inline.inline_name(t, 'func')
+@@ -76,14 +76,14 @@ class InlineTest(test_utils.TestCase):
+   def test_inline_conditional_fails(self):
+     src = 'if define:\n  x = 1\na = x\n'
+     t = ast.parse(src)
+-    with self.assertRaisesRegexp(inline.InlineError,
++    with self.assertRaisesRegex(inline.InlineError,
+                                  '\'x\' is not a top-level name'):
+       inline.inline_name(t, 'x')
+ 
+   def test_inline_non_assign_fails(self):
+     src = 'CONSTANT1, CONSTANT2 = values'
+     t = ast.parse(src)
+-    with self.assertRaisesRegexp(
++    with self.assertRaisesRegex(
+         inline.InlineError, '\'CONSTANT1\' is not declared in an assignment'):
+       inline.inline_name(t, 'CONSTANT1')
+ 
diff --git a/devel/py-google-pasta/files/patch-setup.py b/devel/py-google-pasta/files/patch-setup.py
deleted file mode 100644
index 7a0c0d70be25..000000000000
--- a/devel/py-google-pasta/files/patch-setup.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Fix tests running twice
-# TODO: Upstream
-
-# Register six dependency
-# https://github.com/google/pasta/pull/77
-
---- setup.py.orig	2019-05-29 17:07:01 UTC
-+++ setup.py
-@@ -26,7 +26,8 @@ def all_tests():
-     test_suite = test_loader.discover('.', pattern='*_test.py')
-     return test_suite
- 
--setup(
-+if __name__ == '__main__':
-+  setup(
-     name="google-pasta",
-     version="0.1.7",
-     packages=find_packages(),
-@@ -43,4 +44,7 @@ setup(
-         "Development Status :: 2 - Pre-Alpha",
-         "License :: OSI Approved :: Apache Software License",
-     ],
--)
-+    install_requires=[
-+        'six',
-+    ],
-+  )