pybind11-jsoncons 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pybind11-jsoncons-0.1.0/.github/workflows/format.yml +22 -0
- pybind11-jsoncons-0.1.0/.github/workflows/pip.yml +32 -0
- pybind11-jsoncons-0.1.0/.github/workflows/wheels.yml +102 -0
- pybind11-jsoncons-0.1.0/.gitignore +144 -0
- pybind11-jsoncons-0.1.0/.pre-commit-config.yaml +71 -0
- pybind11-jsoncons-0.1.0/CMakeLists.txt +55 -0
- pybind11-jsoncons-0.1.0/LICENSE +36 -0
- pybind11-jsoncons-0.1.0/Makefile +107 -0
- pybind11-jsoncons-0.1.0/PKG-INFO +26 -0
- pybind11-jsoncons-0.1.0/README.md +5 -0
- pybind11-jsoncons-0.1.0/noxfile.py +41 -0
- pybind11-jsoncons-0.1.0/pyproject.toml +92 -0
- pybind11-jsoncons-0.1.0/src/include/README +1 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/allocator_holder.hpp +37 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/allocator_set.hpp +67 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/basic_json.hpp +4749 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/config/compiler_support.hpp +563 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/config/jsoncons_config.hpp +245 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/config/version.hpp +40 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/conv_error.hpp +222 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/decode_json.hpp +214 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/decode_traits.hpp +668 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/endian.hpp +44 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/grisu3.hpp +312 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/optional.hpp +488 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/parse_number.hpp +1052 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/span.hpp +193 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/string_view.hpp +557 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/detail/write_number.hpp +572 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/encode_json.hpp +291 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/encode_traits.hpp +385 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/item_event_visitor.hpp +2047 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json.hpp +17 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_array.hpp +288 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_cursor.hpp +491 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_decoder.hpp +384 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_encoder.hpp +1619 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_error.hpp +152 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_exception.hpp +228 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_filter.hpp +1075 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_fwd.hpp +23 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_object.hpp +1716 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_options.hpp +727 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_parser.hpp +2825 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_reader.hpp +438 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_traits_macros.hpp +1068 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_type.hpp +296 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_type_traits.hpp +1922 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/json_visitor.hpp +1001 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/pretty_print.hpp +85 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/semantic_tag.hpp +197 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/ser_context.hpp +47 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/sink.hpp +295 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/source.hpp +794 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/source_adaptor.hpp +143 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/staj_cursor.hpp +774 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/staj_event.hpp +588 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/staj_event_reader.hpp +762 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/staj_iterator.hpp +461 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/text_source_adaptor.hpp +138 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/typed_array_view.hpp +248 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/bigint.hpp +1645 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/binary.hpp +223 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/byte_string.hpp +805 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/heap_string.hpp +201 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/more_type_traits.hpp +923 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/unicode_traits.hpp +1335 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/utility/uri.hpp +1725 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons/value_converter.hpp +345 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson.hpp +16 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_cursor.hpp +284 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_decimal128.hpp +874 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_encoder.hpp +591 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_error.hpp +106 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_oid.hpp +244 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_options.hpp +74 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_parser.hpp +711 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_reader.hpp +88 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/bson_type.hpp +44 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/decode_bson.hpp +208 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/bson/encode_bson.hpp +150 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor.hpp +18 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_cursor.hpp +321 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_detail.hpp +87 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_encoder.hpp +1839 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_error.hpp +102 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_event_reader.hpp +285 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_options.hpp +105 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_parser.hpp +2045 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/cbor_reader.hpp +115 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/decode_cbor.hpp +207 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/cbor/encode_cbor.hpp +152 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv.hpp +17 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_cursor.hpp +363 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_encoder.hpp +1422 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_error.hpp +87 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_options.hpp +978 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_parser.hpp +2343 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/csv_reader.hpp +182 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/decode_csv.hpp +217 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/csv/encode_csv.hpp +131 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jmespath/jmespath.hpp +5491 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jmespath/jmespath_error.hpp +227 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpatch/jsonpatch.hpp +591 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpatch/jsonpatch_error.hpp +127 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/flatten.hpp +382 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/json_location.hpp +979 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/json_query.hpp +226 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath.hpp +14 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath_error.hpp +259 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp +261 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath_parser.hpp +2492 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath_selector.hpp +1268 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/jsonpath_utilities.hpp +73 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/path_node.hpp +327 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpath/token_evaluator.hpp +3486 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpointer/jsonpointer.hpp +1468 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonpointer/jsonpointer_error.hpp +124 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/compilation_context.hpp +125 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/eval_context.hpp +167 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/format.hpp +1213 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/keyword_validator.hpp +4127 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/keyword_validator_factory.hpp +854 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/schema_validator.hpp +489 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/schema_validator_factory_base.hpp +343 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/uri_wrapper.hpp +179 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/common/validator.hpp +253 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft201909/schema_draft201909.hpp +334 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft201909/schema_validator_factory_201909.hpp +558 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft202012/schema_draft202012.hpp +362 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft202012/schema_validator_factory_202012.hpp +654 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft4/schema_draft4.hpp +180 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft4/schema_validator_factory_4.hpp +475 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft6/schema_draft6.hpp +183 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft6/schema_validator_factory_6.hpp +422 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft7/schema_draft7.hpp +198 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/draft7/schema_validator_factory_7.hpp +456 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/evaluation_options.hpp +125 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/json_schema.hpp +236 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/json_schema_factory.hpp +283 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/jsonschema.hpp +12 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/jsonschema_error.hpp +50 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/jsonschema/validation_message.hpp +96 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/mergepatch/mergepatch.hpp +98 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/decode_msgpack.hpp +206 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/encode_msgpack.hpp +148 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack.hpp +17 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_cursor.hpp +304 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_encoder.hpp +757 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_error.hpp +97 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_event_reader.hpp +278 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_options.hpp +74 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_parser.hpp +808 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_reader.hpp +114 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/msgpack/msgpack_type.hpp +62 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/decode_ubjson.hpp +206 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/encode_ubjson.hpp +143 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson.hpp +16 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_cursor.hpp +270 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_encoder.hpp +510 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_error.hpp +105 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_options.hpp +88 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_parser.hpp +944 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_reader.hpp +91 -0
- pybind11-jsoncons-0.1.0/src/include/jsoncons_ext/ubjson/ubjson_type.hpp +44 -0
- pybind11-jsoncons-0.1.0/src/main.cpp +447 -0
- pybind11-jsoncons-0.1.0/src/pybind11_jsoncons/__init__.py +21 -0
- pybind11-jsoncons-0.1.0/src/pybind11_jsoncons/__init__.pyi +245 -0
- pybind11-jsoncons-0.1.0/src/pybind11_jsoncons/__main__.py +32 -0
- pybind11-jsoncons-0.1.0/tests/test_basic.py +137 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This is a format job. Pre-commit has a first-party GitHub action, so we use
|
|
2
|
+
# that: https://github.com/pre-commit/action
|
|
3
|
+
|
|
4
|
+
name: Format
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
pull_request:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- master
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
pre-commit:
|
|
15
|
+
name: Format
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v3
|
|
19
|
+
- uses: actions/setup-python@v4
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.x"
|
|
22
|
+
- uses: pre-commit/action@v3.0.0
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: "Pip"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- master
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build with Pip
|
|
13
|
+
runs-on: ${{ matrix.platform }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
platform: [windows-latest, macos-latest, ubuntu-latest]
|
|
18
|
+
python-version: ["3.9", "3.12"]
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
allow-prereleases: true
|
|
27
|
+
|
|
28
|
+
- name: Build and install
|
|
29
|
+
run: pip install --verbose .[test]
|
|
30
|
+
|
|
31
|
+
- name: Test
|
|
32
|
+
run: pytest
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: Wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- master
|
|
9
|
+
release:
|
|
10
|
+
types:
|
|
11
|
+
- published
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
FORCE_COLOR: 3
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build_sdist:
|
|
22
|
+
name: Build SDist
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
submodules: true
|
|
28
|
+
|
|
29
|
+
- name: Build SDist
|
|
30
|
+
run: pipx run build --sdist
|
|
31
|
+
|
|
32
|
+
- name: Check metadata
|
|
33
|
+
run: pipx run twine check dist/*
|
|
34
|
+
|
|
35
|
+
- uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: cibw-sdist
|
|
38
|
+
path: dist/*.tar.gz
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
build_wheels:
|
|
42
|
+
name: Wheels on ${{ matrix.os }}
|
|
43
|
+
runs-on: ${{ matrix.os }}
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
with:
|
|
52
|
+
submodules: true
|
|
53
|
+
|
|
54
|
+
- uses: astral-sh/setup-uv@v4
|
|
55
|
+
|
|
56
|
+
- uses: pypa/cibuildwheel@v2.22
|
|
57
|
+
env:
|
|
58
|
+
CIBW_ENABLE: cpython-prerelease
|
|
59
|
+
CIBW_ARCHS_WINDOWS: auto ARM64
|
|
60
|
+
CIBW_SKIP: pp* *i686
|
|
61
|
+
CIBW_TEST_SKIP: "*macosx* *win* *aarch64"
|
|
62
|
+
|
|
63
|
+
- name: Verify clean directory
|
|
64
|
+
run: git diff --exit-code
|
|
65
|
+
shell: bash
|
|
66
|
+
|
|
67
|
+
- uses: actions/upload-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: cibw-wheels-${{ matrix.os }}
|
|
70
|
+
path: wheelhouse/*.whl
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
upload_all:
|
|
74
|
+
name: Upload if release
|
|
75
|
+
needs: [build_wheels, build_sdist]
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
78
|
+
environment: pypi
|
|
79
|
+
permissions:
|
|
80
|
+
id-token: write
|
|
81
|
+
attestations: write
|
|
82
|
+
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/setup-python@v5
|
|
85
|
+
with:
|
|
86
|
+
python-version: "3.x"
|
|
87
|
+
|
|
88
|
+
- uses: actions/download-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
pattern: cibw-*
|
|
91
|
+
merge-multiple: true
|
|
92
|
+
path: dist
|
|
93
|
+
|
|
94
|
+
- name: Generate artifact attestation for sdist and wheels
|
|
95
|
+
uses: actions/attest-build-provenance@v1
|
|
96
|
+
with:
|
|
97
|
+
subject-path: "dist/*"
|
|
98
|
+
|
|
99
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
100
|
+
with:
|
|
101
|
+
attestations: true
|
|
102
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Using https://github.com/github/gitignore/blob/master/Python.gitignore
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib/
|
|
20
|
+
lib64/
|
|
21
|
+
parts/
|
|
22
|
+
sdist/
|
|
23
|
+
var/
|
|
24
|
+
wheels/
|
|
25
|
+
share/python-wheels/
|
|
26
|
+
*.egg-info/
|
|
27
|
+
.installed.cfg
|
|
28
|
+
*.egg
|
|
29
|
+
MANIFEST
|
|
30
|
+
|
|
31
|
+
# PyInstaller
|
|
32
|
+
# Usually these files are written by a python script from a template
|
|
33
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
34
|
+
*.manifest
|
|
35
|
+
*.spec
|
|
36
|
+
|
|
37
|
+
# Installer logs
|
|
38
|
+
pip-log.txt
|
|
39
|
+
pip-delete-this-directory.txt
|
|
40
|
+
|
|
41
|
+
# Unit test / coverage reports
|
|
42
|
+
htmlcov/
|
|
43
|
+
.tox/
|
|
44
|
+
.nox/
|
|
45
|
+
.coverage
|
|
46
|
+
.coverage.*
|
|
47
|
+
.cache
|
|
48
|
+
nosetests.xml
|
|
49
|
+
coverage.xml
|
|
50
|
+
*.cover
|
|
51
|
+
*.py,cover
|
|
52
|
+
.hypothesis/
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
cover/
|
|
55
|
+
|
|
56
|
+
# Translations
|
|
57
|
+
*.mo
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
# Django stuff:
|
|
61
|
+
*.log
|
|
62
|
+
local_settings.py
|
|
63
|
+
db.sqlite3
|
|
64
|
+
db.sqlite3-journal
|
|
65
|
+
|
|
66
|
+
# Flask stuff:
|
|
67
|
+
instance/
|
|
68
|
+
.webassets-cache
|
|
69
|
+
|
|
70
|
+
# Scrapy stuff:
|
|
71
|
+
.scrapy
|
|
72
|
+
|
|
73
|
+
# Sphinx documentation
|
|
74
|
+
docs/_build/
|
|
75
|
+
docs/_generate/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
101
|
+
__pypackages__/
|
|
102
|
+
|
|
103
|
+
# Celery stuff
|
|
104
|
+
celerybeat-schedule
|
|
105
|
+
celerybeat.pid
|
|
106
|
+
|
|
107
|
+
# SageMath parsed files
|
|
108
|
+
*.sage.py
|
|
109
|
+
|
|
110
|
+
# Environments
|
|
111
|
+
.env
|
|
112
|
+
.venv
|
|
113
|
+
env/
|
|
114
|
+
venv/
|
|
115
|
+
ENV/
|
|
116
|
+
env.bak/
|
|
117
|
+
venv.bak/
|
|
118
|
+
|
|
119
|
+
# Spyder project settings
|
|
120
|
+
.spyderproject
|
|
121
|
+
.spyproject
|
|
122
|
+
|
|
123
|
+
# Rope project settings
|
|
124
|
+
.ropeproject
|
|
125
|
+
|
|
126
|
+
# mkdocs documentation
|
|
127
|
+
/site
|
|
128
|
+
|
|
129
|
+
# mypy
|
|
130
|
+
.mypy_cache/
|
|
131
|
+
.dmypy.json
|
|
132
|
+
dmypy.json
|
|
133
|
+
|
|
134
|
+
# Pyre type checker
|
|
135
|
+
.pyre/
|
|
136
|
+
|
|
137
|
+
# pytype static type analyzer
|
|
138
|
+
.pytype/
|
|
139
|
+
|
|
140
|
+
# Cython debug symbols
|
|
141
|
+
cython_debug/
|
|
142
|
+
|
|
143
|
+
_skbuild/
|
|
144
|
+
.pyodide-xbuildenv/
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# To use:
|
|
2
|
+
#
|
|
3
|
+
# pre-commit run -a
|
|
4
|
+
#
|
|
5
|
+
# Or:
|
|
6
|
+
#
|
|
7
|
+
# pre-commit install # (runs every time you commit in git)
|
|
8
|
+
#
|
|
9
|
+
# To update this file:
|
|
10
|
+
#
|
|
11
|
+
# pre-commit autoupdate
|
|
12
|
+
#
|
|
13
|
+
# See https://github.com/pre-commit/pre-commit
|
|
14
|
+
|
|
15
|
+
ci:
|
|
16
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
17
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
18
|
+
|
|
19
|
+
exclude: |
|
|
20
|
+
(?x)^(
|
|
21
|
+
src/include/.*
|
|
22
|
+
)$
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
repos:
|
|
26
|
+
# Standard hooks
|
|
27
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
28
|
+
rev: v5.0.0
|
|
29
|
+
hooks:
|
|
30
|
+
- id: check-added-large-files
|
|
31
|
+
- id: check-case-conflict
|
|
32
|
+
- id: check-merge-conflict
|
|
33
|
+
- id: check-symlinks
|
|
34
|
+
- id: check-yaml
|
|
35
|
+
exclude: ^conda\.recipe/meta\.yaml$
|
|
36
|
+
- id: debug-statements
|
|
37
|
+
- id: end-of-file-fixer
|
|
38
|
+
- id: mixed-line-ending
|
|
39
|
+
- id: requirements-txt-fixer
|
|
40
|
+
- id: trailing-whitespace
|
|
41
|
+
|
|
42
|
+
# Check linting and style issues
|
|
43
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
44
|
+
rev: "v0.7.3"
|
|
45
|
+
hooks:
|
|
46
|
+
- id: ruff
|
|
47
|
+
args: ["--fix", "--show-fixes"]
|
|
48
|
+
- id: ruff-format
|
|
49
|
+
exclude: ^(docs)
|
|
50
|
+
|
|
51
|
+
# Changes tabs to spaces
|
|
52
|
+
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
53
|
+
rev: v1.5.5
|
|
54
|
+
hooks:
|
|
55
|
+
- id: remove-tabs
|
|
56
|
+
exclude: ^(Makefile)
|
|
57
|
+
|
|
58
|
+
# CMake formatting
|
|
59
|
+
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
|
60
|
+
rev: v0.6.13
|
|
61
|
+
hooks:
|
|
62
|
+
- id: cmake-format
|
|
63
|
+
additional_dependencies: [pyyaml]
|
|
64
|
+
types: [file]
|
|
65
|
+
files: (\.cmake|CMakeLists.txt)(.in)?$
|
|
66
|
+
|
|
67
|
+
# Suggested hook if you add a .clang-format file
|
|
68
|
+
# - repo: https://github.com/pre-commit/mirrors-clang-format
|
|
69
|
+
# rev: v13.0.0
|
|
70
|
+
# hooks:
|
|
71
|
+
# - id: clang-format
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Require CMake 3.15+ (matching scikit-build-core) Use new versions of all
|
|
2
|
+
# policies up to CMake 3.27
|
|
3
|
+
cmake_minimum_required(VERSION 3.15...3.27)
|
|
4
|
+
|
|
5
|
+
# set(CMAKE_BUILD_TYPE "Debug")
|
|
6
|
+
if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
|
|
7
|
+
set(CMAKE_BUILD_TYPE
|
|
8
|
+
"Release"
|
|
9
|
+
CACHE STRING "" FORCE)
|
|
10
|
+
message(STATUS "Set build type to default: ${CMAKE_BUILD_TYPE}")
|
|
11
|
+
else()
|
|
12
|
+
message(STATUS "Your build type: ${CMAKE_BUILD_TYPE}")
|
|
13
|
+
endif()
|
|
14
|
+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
15
|
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
|
|
16
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb")
|
|
17
|
+
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
18
|
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
|
19
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
|
20
|
+
endif()
|
|
21
|
+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
22
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragma-once-outside-header")
|
|
23
|
+
endif()
|
|
24
|
+
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
25
|
+
add_definitions(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
|
|
26
|
+
add_definitions(-DPROJECT_BINARY_DIR="${PROJECT_BINARY_DIR}")
|
|
27
|
+
|
|
28
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
29
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
30
|
+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
31
|
+
|
|
32
|
+
# Scikit-build-core sets these values for you, or you can just hard-code the
|
|
33
|
+
# name and version.
|
|
34
|
+
project(
|
|
35
|
+
${SKBUILD_PROJECT_NAME}
|
|
36
|
+
VERSION ${SKBUILD_PROJECT_VERSION}
|
|
37
|
+
LANGUAGES CXX)
|
|
38
|
+
|
|
39
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
40
|
+
# Find the module development requirements (requires FindPython from 3.17 or
|
|
41
|
+
# scikit-build-core's built-in backport)
|
|
42
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
43
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
44
|
+
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/src/include)
|
|
45
|
+
|
|
46
|
+
# Add a library using FindPython's tooling (pybind11 also provides a helper like
|
|
47
|
+
# this)
|
|
48
|
+
python_add_library(_core MODULE src/main.cpp WITH_SOABI)
|
|
49
|
+
target_link_libraries(_core PRIVATE pybind11::headers)
|
|
50
|
+
|
|
51
|
+
# This is passing in the version as a define just as an example
|
|
52
|
+
target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
|
|
53
|
+
|
|
54
|
+
# The install directory is the output (wheel) directory
|
|
55
|
+
install(TARGETS _core DESTINATION pybind11_jsoncons)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Copyright (c) 2016 The Pybind Development Team, All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
|
11
|
+
and/or other materials provided with the distribution.
|
|
12
|
+
|
|
13
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
14
|
+
may be used to endorse or promote products derived from this software
|
|
15
|
+
without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
18
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
19
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
20
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
21
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
22
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
23
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
24
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
25
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
You are under no obligation whatsoever to provide any bug fixes, patches, or
|
|
29
|
+
upgrades to the features, functionality or performance of the source code
|
|
30
|
+
("Enhancements") to anyone; however, if you choose to make your Enhancements
|
|
31
|
+
available either publicly, or directly to the author of this software, without
|
|
32
|
+
imposing a separate written license agreement for such Enhancements, then you
|
|
33
|
+
hereby grant the following license: a non-exclusive, royalty-free perpetual
|
|
34
|
+
license to install, use, modify, prepare derivative works, incorporate into
|
|
35
|
+
other computer software, distribute, and sublicense such enhancements or
|
|
36
|
+
derivative works thereof, in binary and source code form.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
PROJECT_SOURCE_DIR ?= $(abspath ./)
|
|
2
|
+
PROJECT_NAME ?= $(shell basename $(PROJECT_SOURCE_DIR))
|
|
3
|
+
NUM_JOBS ?= 8
|
|
4
|
+
|
|
5
|
+
all:
|
|
6
|
+
@echo nothing special
|
|
7
|
+
|
|
8
|
+
lint:
|
|
9
|
+
pre-commit run -a
|
|
10
|
+
lint_install:
|
|
11
|
+
pre-commit install
|
|
12
|
+
.PHONY: lint
|
|
13
|
+
|
|
14
|
+
reset_submodules:
|
|
15
|
+
git submodule update --init --recursive
|
|
16
|
+
|
|
17
|
+
clean:
|
|
18
|
+
rm -rf build *.egg-info dist
|
|
19
|
+
force_clean:
|
|
20
|
+
docker run --rm -v `pwd`:`pwd` -w `pwd` -it alpine/make make clean
|
|
21
|
+
|
|
22
|
+
pytest:
|
|
23
|
+
python3 -m pip install pytest
|
|
24
|
+
pytest tests # --capture=tee-sys
|
|
25
|
+
.PHONY: test pytest
|
|
26
|
+
|
|
27
|
+
docs_build:
|
|
28
|
+
mkdocs build
|
|
29
|
+
docs_serve:
|
|
30
|
+
mkdocs serve -a 0.0.0.0:8088
|
|
31
|
+
|
|
32
|
+
DOCKER_TAG_WINDOWS ?= ghcr.io/cubao/build-env-windows-x64:v0.0.1
|
|
33
|
+
DOCKER_TAG_LINUX ?= ghcr.io/cubao/build-env-manylinux2014-x64:v0.0.4
|
|
34
|
+
DOCKER_TAG_MACOS ?= ghcr.io/cubao/build-env-macos-arm64:v0.0.1
|
|
35
|
+
|
|
36
|
+
test_in_win:
|
|
37
|
+
docker run --rm -w `pwd` -v `pwd`:`pwd` -v `pwd`/build/win:`pwd`/build -it $(DOCKER_TAG_WINDOWS) bash
|
|
38
|
+
test_in_mac:
|
|
39
|
+
docker run --rm -w `pwd` -v `pwd`:`pwd` -v `pwd`/build/mac:`pwd`/build -it $(DOCKER_TAG_MACOS) bash
|
|
40
|
+
test_in_linux:
|
|
41
|
+
docker run --rm -w `pwd` -v `pwd`:`pwd` -v `pwd`/build/linux:`pwd`/build -it $(DOCKER_TAG_LINUX) bash
|
|
42
|
+
|
|
43
|
+
DEV_CONTAINER_NAME ?= $(USER)_$(subst /,_,$(PROJECT_NAME)____$(PROJECT_SOURCE_DIR))
|
|
44
|
+
DEV_CONTAINER_IMAG ?= $(DOCKER_TAG_LINUX)
|
|
45
|
+
test_in_dev_container:
|
|
46
|
+
docker ps | grep $(DEV_CONTAINER_NAME) \
|
|
47
|
+
&& docker exec -it $(DEV_CONTAINER_NAME) bash \
|
|
48
|
+
|| docker run --rm --name $(DEV_CONTAINER_NAME) \
|
|
49
|
+
--network host --security-opt seccomp=unconfined \
|
|
50
|
+
-v `pwd`:`pwd` -w `pwd` -it $(DEV_CONTAINER_IMAG) bash
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
PYTHON ?= python3
|
|
54
|
+
build:
|
|
55
|
+
$(PYTHON) -m pip install scikit_build_core pyproject_metadata pathspec pybind11
|
|
56
|
+
CMAKE_BUILD_PARALLEL_LEVEL=$(NUM_JOBS) $(PYTHON) -m pip install --no-build-isolation -Ceditable.rebuild=true -Cbuild-dir=build -ve.
|
|
57
|
+
python_install:
|
|
58
|
+
$(PYTHON) -m pip install . --verbose
|
|
59
|
+
python_wheel:
|
|
60
|
+
$(PYTHON) -m pip wheel . -w build --verbose
|
|
61
|
+
python_sdist:
|
|
62
|
+
$(PYTHON) -m pip sdist . --verbose
|
|
63
|
+
python_test: pytest
|
|
64
|
+
.PHONY: build
|
|
65
|
+
|
|
66
|
+
# conda create -y -n py36 python=3.6
|
|
67
|
+
# conda create -y -n py37 python=3.7
|
|
68
|
+
# conda create -y -n py38 python=3.8
|
|
69
|
+
# conda create -y -n py39 python=3.9
|
|
70
|
+
# conda create -y -n py310 python=3.10
|
|
71
|
+
# conda env list
|
|
72
|
+
python_build_py36:
|
|
73
|
+
PYTHON=python conda run --no-capture-output -n py36 make python_build
|
|
74
|
+
python_build_py37:
|
|
75
|
+
PYTHON=python conda run --no-capture-output -n py37 make python_build
|
|
76
|
+
python_build_py38:
|
|
77
|
+
PYTHON=python conda run --no-capture-output -n py38 make python_build
|
|
78
|
+
python_build_py39:
|
|
79
|
+
PYTHON=python conda run --no-capture-output -n py39 make python_build
|
|
80
|
+
python_build_py310:
|
|
81
|
+
PYTHON=python conda run --no-capture-output -n py310 make python_build
|
|
82
|
+
python_build_all: python_build_py36 python_build_py37 python_build_py38 python_build_py39 python_build_py310
|
|
83
|
+
python_build_all_in_linux:
|
|
84
|
+
docker run --rm -w `pwd` -v `pwd`:`pwd` -v `pwd`/build/linux:`pwd`/build -it $(DOCKER_TAG_LINUX) make python_build_all
|
|
85
|
+
make repair_wheels && rm -rf dist/*.whl && mv wheelhouse/*.whl dist && rm -rf wheelhouse
|
|
86
|
+
python_build_all_in_macos: python_build_py38 python_build_py39 python_build_py310
|
|
87
|
+
python_build_all_in_windows: python_build_all
|
|
88
|
+
|
|
89
|
+
repair_wheels:
|
|
90
|
+
python -m pip install auditwheel # sudo apt install patchelf
|
|
91
|
+
ls dist/*-linux_x86_64.whl | xargs -n1 auditwheel repair --plat manylinux2014_x86_64
|
|
92
|
+
rm -rf dist/*-linux_x86_64.whl && cp wheelhouse/*.whl dist && rm -rf wheelhouse
|
|
93
|
+
|
|
94
|
+
pypi_remote ?= pypi
|
|
95
|
+
upload_wheels:
|
|
96
|
+
python -m pip install twine
|
|
97
|
+
twine upload dist/*.whl -r $(pypi_remote)
|
|
98
|
+
|
|
99
|
+
tar.gz:
|
|
100
|
+
tar -cvz --exclude .git -f ../$(PROJECT_NAME).tar.gz .
|
|
101
|
+
ls -alh ../$(PROJECT_NAME).tar.gz
|
|
102
|
+
|
|
103
|
+
# https://stackoverflow.com/a/25817631
|
|
104
|
+
echo-% : ; @echo -n $($*)
|
|
105
|
+
Echo-% : ; @echo $($*)
|
|
106
|
+
ECHO-% : ; @echo $* = $($*)
|
|
107
|
+
echo-Tab: ; @echo -n ' '
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pybind11-jsoncons
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: python binding for jsoncons (only what I needed for now)
|
|
5
|
+
Author-Email: "zhixiong.tang" <dvorak4tzx@email.com>
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Project-URL: Homepage, https://github.com/cubao/jsoncons
|
|
17
|
+
Requires-Python: >=3.7
|
|
18
|
+
Provides-Extra: test
|
|
19
|
+
Requires-Dist: pytest; extra == "test"
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# pybind11-jsoncons
|
|
23
|
+
|
|
24
|
+
I'm using this [jsoncon](https://github.com/danielaparker/jsoncon) python binding to filter & transform json data.
|
|
25
|
+
|
|
26
|
+
See `test_json_query`, `test_json_query_json`.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
import nox
|
|
6
|
+
|
|
7
|
+
nox.options.sessions = ["lint", "tests"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@nox.session
|
|
11
|
+
def lint(session: nox.Session) -> None:
|
|
12
|
+
"""
|
|
13
|
+
Run the linter.
|
|
14
|
+
"""
|
|
15
|
+
session.install("pre-commit")
|
|
16
|
+
session.run("pre-commit", "run", "--all-files", *session.posargs)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@nox.session
|
|
20
|
+
def tests(session: nox.Session) -> None:
|
|
21
|
+
"""
|
|
22
|
+
Run the unit and regular tests.
|
|
23
|
+
"""
|
|
24
|
+
session.install(".[test]")
|
|
25
|
+
session.run("pytest", *session.posargs)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@nox.session(venv_backend="none")
|
|
29
|
+
def dev(session: nox.Session) -> None:
|
|
30
|
+
"""
|
|
31
|
+
Prepare a .venv folder.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
session.run(sys.executable, "-m", "venv", ".venv")
|
|
35
|
+
session.run(
|
|
36
|
+
".venv/bin/pip",
|
|
37
|
+
"install",
|
|
38
|
+
"-e.",
|
|
39
|
+
"-Ccmake.define.CMAKE_EXPORT_COMPILE_COMMANDS=1",
|
|
40
|
+
"-Cbuild-dir=build",
|
|
41
|
+
)
|