git: bc8de8b649af - main - lang/py-lupa: Update to 2.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 May 2023 04:27:48 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=bc8de8b649afdc602e98522e334164f3c96683bd commit bc8de8b649afdc602e98522e334164f3c96683bd Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-05-27 04:09:19 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-05-27 04:09:19 +0000 lang/py-lupa: Update to 2.0 - Convert to USE_PYTHON=unittest Changes: https://github.com/scoder/lupa/blob/master/CHANGES.rst --- lang/py-lupa/Makefile | 10 ++++------ lang/py-lupa/distinfo | 6 +++--- lang/py-lupa/files/patch-lupa-tests-test.py | 14 ++++++++++++++ lang/py-lupa/files/patch-setup.py | 28 ++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/lang/py-lupa/Makefile b/lang/py-lupa/Makefile index 39226b1b737c..0c997478550e 100644 --- a/lang/py-lupa/Makefile +++ b/lang/py-lupa/Makefile @@ -1,5 +1,5 @@ PORTNAME= lupa -PORTVERSION= 1.14.1 +PORTVERSION= 2.0 CATEGORIES= lang python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,9 +12,10 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.txt USES= lua pkgconfig python:3.6+ -USE_PYTHON= autoplist concurrent distutils +USE_PYTHON= autoplist concurrent cython distutils unittest -MAKE_ARGS= --no-bundle +MAKE_ARGS= --no-bundle --with-cython --with-lua-checks +TEST_ARGS= lupa.tests.test post-patch: # Clean up bundled libraries @@ -23,7 +24,4 @@ post-patch: post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + -do-test: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py test - .include <bsd.port.mk> diff --git a/lang/py-lupa/distinfo b/lang/py-lupa/distinfo index 8411b545a3df..3a6e93a8477a 100644 --- a/lang/py-lupa/distinfo +++ b/lang/py-lupa/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1681052954 -SHA256 (lupa-1.14.1.tar.gz) = d0fd4e60ad149fe25c90530e2a0e032a42a6f0455f29ca0edb8170d6ec751c6e -SIZE (lupa-1.14.1.tar.gz) = 1061109 +TIMESTAMP = 1684104502 +SHA256 (lupa-2.0.tar.gz) = ad3fef486be7adddd349fe9a9c393789061312cf98ebc533b489be34f484cb79 +SIZE (lupa-2.0.tar.gz) = 6278066 diff --git a/lang/py-lupa/files/patch-lupa-tests-test.py b/lang/py-lupa/files/patch-lupa-tests-test.py new file mode 100644 index 000000000000..e55fbee71c13 --- /dev/null +++ b/lang/py-lupa/files/patch-lupa-tests-test.py @@ -0,0 +1,14 @@ +Obtained from: https://github.com/scoder/lupa/commit/9fecb31fd368043699b8a88310f2718858b18a5f + +--- lupa/tests/test.py.orig 2023-04-04 07:12:27 UTC ++++ lupa/tests/test.py +@@ -52,6 +52,9 @@ class TestLuaRuntimeRefcounting(LupaTestCase): + if off_by_one and old_count == new_count + 1: + # FIXME: This happens in test_attrgetter_refcycle - need to investigate why! + self.assertEqual(old_count, new_count + 1) ++ elif off_by_one and old_count == new_count + 2 and sys.version_info >= (3,11): ++ # FIXME: This happens in test_attrgetter_refcycle - need to investigate why! ++ self.assertEqual(old_count, new_count + 2) + else: + self.assertEqual(old_count, new_count) + diff --git a/lang/py-lupa/files/patch-setup.py b/lang/py-lupa/files/patch-setup.py new file mode 100644 index 000000000000..24288085b463 --- /dev/null +++ b/lang/py-lupa/files/patch-setup.py @@ -0,0 +1,28 @@ +Obtained from: https://github.com/scoder/lupa/commit/19279acda1ad7e7a536adafe399b183701287bc1 + +--- setup.py.orig 2023-04-04 07:12:27 UTC ++++ setup.py +@@ -365,10 +365,11 @@ if not configs and not option_no_bundle: + or (get_machine() != "x86_64" and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep))) + ) + ] +-if not configs and not option_use_bundle: +- configs = find_lua_build(no_luajit=option_no_luajit) + if not configs: +- configs = no_lua_error() ++ configs = [ ++ (find_lua_build(no_luajit=option_no_luajit) if not option_use_bundle else {}) ++ or no_lua_error() ++ ] + + + # check if Cython is installed, and use it if requested or necessary +@@ -484,7 +485,7 @@ setup( + ], + + packages=['lupa'], +- build_requires=['Cython>=0.29.28'], ++ setup_requires=['Cython>=0.29.28'], + ext_modules=ext_modules, + libraries=ext_libraries, + **extra_setup_args