mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
import ports/textproc/py-pyjson5, sparc64 tests/ok tb@
JSON5 serializer and parser library for Python 3 written in Cython. The serializer returns ASCII data that can safely be used in an HTML template. Apostrophes, ampersands, greater-than, and less-then signs are encoded as unicode escaped sequences. Unless the input contains infinite or NaN values, the result will be valid JSON data. The parser can handle all valid JSON5 1.0.0 and JSON data can be read, unless the nesting level is absurdly high.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
COMMENT= json5 serializer and parser written in Cython
|
||||
|
||||
MODPY_DISTV= 2.0.0
|
||||
DISTNAME= pyjson5-${MODPY_DISTV}
|
||||
PKGNAME= py-${DISTNAME}
|
||||
|
||||
# https://pyjson5.readthedocs.io/en/latest/changelog.html
|
||||
# https://github.com/Kijewski/pyjson5
|
||||
HOMEPAGE= https://pyjson5.readthedocs.io/
|
||||
|
||||
CATEGORIES= textproc
|
||||
|
||||
# Apache 2.0
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} m
|
||||
|
||||
COMPILER= base-clang ports-gcc
|
||||
|
||||
MODULES= lang/python
|
||||
MODPY_PYBUILD= setuptools
|
||||
MODPY_PI= Yes
|
||||
|
||||
BUILD_DEPENDS= lang/cython
|
||||
|
||||
# not in sdist; needs submodules to run from git
|
||||
NO_TEST= Yes
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,2 @@
|
||||
SHA256 (pyjson5-2.0.0.tar.gz) = fMyYWGz4ff6t+nbejfTJyww9IdG1WeKIEt2WM3SNbiU=
|
||||
SIZE (pyjson5-2.0.0.tar.gz) = 305865
|
||||
@@ -0,0 +1,11 @@
|
||||
Index: setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -4,7 +4,6 @@ from setuptools import setup, Extension
|
||||
|
||||
extra_compile_args = [
|
||||
"-std=c++11",
|
||||
- "-O3",
|
||||
"-fPIC",
|
||||
"-g0",
|
||||
"-pipe",
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
Index: third-party/fast_double_parser/include/fast_double_parser.h
|
||||
--- third-party/fast_double_parser/include/fast_double_parser.h.orig
|
||||
+++ third-party/fast_double_parser/include/fast_double_parser.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <locale.h>
|
||||
-#if (defined(sun) || defined(__sun))
|
||||
+#if (defined(sun) || defined(__sun) || defined(__OpenBSD__))
|
||||
#define FAST_DOUBLE_PARSER_SOLARIS
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
JSON5 serializer and parser library for Python 3 written in Cython.
|
||||
|
||||
The serializer returns ASCII data that can safely be used in an HTML
|
||||
template. Apostrophes, ampersands, greater-than, and less-then signs are
|
||||
encoded as unicode escaped sequences.
|
||||
|
||||
Unless the input contains infinite or NaN values, the result will be
|
||||
valid JSON data.
|
||||
|
||||
The parser can handle all valid JSON5 1.0.0 and JSON data can be read,
|
||||
unless the nesting level is absurdly high.
|
||||
@@ -0,0 +1,16 @@
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/METADATA
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/RECORD
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/WHEEL
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/licenses/
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/licenses/LICENSE.Apache
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/licenses/LICENSE.MIT
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5-${MODPY_DISTV}.dist-info/top_level.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/__init__.py
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/__init__.pyi
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/${MODPY_PYCACHE}/
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/pyjson5/py.typed
|
||||
@so lib/python${MODPY_VERSION}/site-packages/pyjson5/pyjson5.${MODPY_PYC_MAGIC_TAG}so
|
||||
Reference in New Issue
Block a user