py-jsonrpc-server: convert to wheel.mk

Fix build with Python 3.12.

Bump PKGREVISION.
This commit is contained in:
wiz 2023-11-05 20:43:15 +00:00
parent 0baa45f5f0
commit 2193fb4db0
4 changed files with 33 additions and 19 deletions

View File

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.5 2022/01/04 20:54:57 wiz Exp $
# $NetBSD: Makefile,v 1.6 2023/11/05 20:43:15 wiz Exp $
DISTNAME= python-jsonrpc-server-0.4.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/python-//}
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= textproc net devel
MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-jsonrpc-server/}
@ -11,19 +11,14 @@ HOMEPAGE= https://github.com/palantir/python-jsonrpc-server
COMMENT= Asynchronous JSON RPC server for Python
LICENSE= mit
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27 # textproc/py-ujson
TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
DEPENDS+= ${PYPKGPREFIX}-ujson>=3:../../textproc/py-ujson
TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
PYTHON_VERSIONED_DEPENDENCIES= test:test
USE_LANGUAGES= # none
# does not work either
#do-test:
# cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} py.test-${PYVERSSUFFIX}
PYTHON_VERSIONS_INCOMPATIBLE= 27
.include "../../lang/python/versioned_dependencies.mk"
.include "../../lang/python/egg.mk"
.include "../../lang/python/wheel.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -1,9 +1,4 @@
@comment $NetBSD: PLIST,v 1.1 2020/05/18 13:34:30 wiz Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
@comment $NetBSD: PLIST,v 1.2 2023/11/05 20:43:15 wiz Exp $
${PYSITELIB}/pyls_jsonrpc/__init__.py
${PYSITELIB}/pyls_jsonrpc/__init__.pyc
${PYSITELIB}/pyls_jsonrpc/__init__.pyo
@ -22,3 +17,8 @@ ${PYSITELIB}/pyls_jsonrpc/exceptions.pyo
${PYSITELIB}/pyls_jsonrpc/streams.py
${PYSITELIB}/pyls_jsonrpc/streams.pyc
${PYSITELIB}/pyls_jsonrpc/streams.pyo
${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt

View File

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.4 2021/10/26 11:23:06 nia Exp $
$NetBSD: distinfo,v 1.5 2023/11/05 20:43:15 wiz Exp $
BLAKE2s (python-jsonrpc-server-0.4.0.tar.gz) = c63be918889faa907f01af7c10e2f2e9d1e7eaf859b854ebb93d620806d9c41d
SHA512 (python-jsonrpc-server-0.4.0.tar.gz) = 062e5b75253b95e64918a9da86ad7e29d8a29019670e451b9a28d44cde064339953004c343be0e7dd40968ec9fc2420b5722265f56c2db8057d0f1eaf088dacc
Size (python-jsonrpc-server-0.4.0.tar.gz) = 26491 bytes
SHA1 (patch-versioneer.py) = 3c11ae4453797a434f74999a5f1d5eb9f140a4de

View File

@ -0,0 +1,18 @@
$NetBSD: patch-versioneer.py,v 1.1 2023/11/05 20:43:15 wiz Exp $
Fix build with Python 3.12.
--- versioneer.py.orig 2020-09-08 19:22:45.000000000 +0000
+++ versioneer.py
@@ -339,9 +339,9 @@ def get_config_from_root(root):
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
# the top of versioneer.py for instructions on writing your setup.cfg .
setup_cfg = os.path.join(root, "setup.cfg")
- parser = configparser.SafeConfigParser()
+ parser = configparser.ConfigParser()
with open(setup_cfg, "r") as f:
- parser.readfp(f)
+ parser.read_file(f)
VCS = parser.get("versioneer", "VCS") # mandatory
def get(parser, name):