Fix PEP 517 build
diff --git a/.github/workflows/build_linux_wheels.yml b/.github/workflows/build_wheels.yml similarity index 94% rename from .github/workflows/build_linux_wheels.yml rename to .github/workflows/build_wheels.yml index 3c31896..2197070 100644 --- a/.github/workflows/build_linux_wheels.yml +++ b/.github/workflows/build_wheels.yml
@@ -1,4 +1,4 @@ -name: Build Manylinux Wheels +name: Build Wheels on: workflow_dispatch: @@ -57,7 +57,8 @@ - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_SKIP: "${{ github.event.inputs.skip }}" # skip Python 2.7 wheels + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: "${{ github.event.inputs.skip }}" CIBW_MANYLINUX_X86_64_IMAGE: ${{ github.event.inputs.manylinux }} CIBW_MANYLINUX_I686_IMAGE: ${{ github.event.inputs.manylinux }} CIBW_ARCHS: ${{ github.event.inputs.archs }}
diff --git a/.github/workflows/compile_test.yml b/.github/workflows/ci.yml similarity index 97% rename from .github/workflows/compile_test.yml rename to .github/workflows/ci.yml index 9f70b04..8aa91fd 100644 --- a/.github/workflows/compile_test.yml +++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@ -name: So, does it work? +name: CI on: [push]
diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f75d2..7ec58a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,11 +1,15 @@ # Changelog +**1.6.1** + +* Fix [PEP 517](https://www.python.org/dev/peps/pep-0517/)-like installation using [build](https://github.com/pypa/build) (by [Tomasz Kłoczko](https://github.com/kloczek)) + **1.6.0** -* Fallback to encode `vars(obj)` if `obj` is not stringifyable, e.g. to serialize [dataclasses](https://docs.python.org/3/library/dataclasses.html). -* Update documentation to use newer [sphinx](https://www.sphinx-doc.org/) version. -* Use [dependabot](https://github.com/dependabot) to keep dependencies current. -* Update [fast_double_parser](https://github.com/lemire/fast_double_parser). +* Fallback to encode `vars(obj)` if `obj` is not stringifyable, e.g. to serialize [dataclasses](https://docs.python.org/3/library/dataclasses.html) +* Update documentation to use newer [sphinx](https://www.sphinx-doc.org/) version +* Use [dependabot](https://github.com/dependabot) to keep dependencies current +* Update [fast_double_parser](https://github.com/lemire/fast_double_parser) **1.5.3**
diff --git a/MANIFEST.in b/MANIFEST.in index 7d750fb..3364e20 100644 --- a/MANIFEST.in +++ b/MANIFEST.in
@@ -4,7 +4,9 @@ include Makefile include pyjson5.cpp include pyjson5.pyx +include pyproject.toml include requires.txt +include setup.cfg include third-party/fast_double_parser/include/fast_double_parser.h recursive-include docs ** recursive-include src **
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..638634f --- /dev/null +++ b/pyproject.toml
@@ -0,0 +1,7 @@ +[build-system] +requires = [ + "Cython", + "setuptools", + "wheel", +] +build-backend = "setuptools.build_meta"
diff --git a/requirements.txt b/requirements.txt index 12f20c4..8658864 100644 --- a/requirements.txt +++ b/requirements.txt
@@ -1,9 +1,11 @@ +build cibuildwheel == 2.* colorama == 0.4.* docutils == 0.17.* cython == 0.* more_itertools == 8.* myst-parser == 0.16.* +setuptools sphinx == 4.* sphinx_autodoc_typehints == 1.* sphinx_rtd_theme == 1.*
diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..29036ca --- /dev/null +++ b/setup.cfg
@@ -0,0 +1,53 @@ +[metadata] +version = 1.6.1 + +name = pyjson5 +description = JSON5 serializer and parser for Python 3 written in Cython. +url = https://github.com/Kijewski/pyjson5 + +author = René Kijewski +maintainer = René Kijewski +author_email = pypi.org@k6i.de +maintainer_email = pypi.org@k6i.de + +long_description = file: README.rst +long_description_content_type = text/x-rst + +license = Apache License 2.0 +license_files = LICENSE + +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Programming Language :: Cython + Programming Language :: JavaScript + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython + Topic :: Text Processing :: General + +[options] +zip_safe = False + +python_requires = ~= 3.5 +setup_requires = + Cython + setuptools + wheel + +include_package_data = True +packages = pyjson5 +package_dir = + = src + +[options.package_data] +pyjson5 = __init__.pyi, py.typed
diff --git a/setup.py b/setup.py index fee4337..cc5276d 100755 --- a/setup.py +++ b/setup.py
@@ -1,71 +1,19 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from setuptools import setup, Extension -from os.path import dirname, join, abspath - - -def get_text(name): - root = abspath(dirname(__file__)) - with open(join(root, 'src', name), 'rt') as f: - return eval(f.read().strip()) - extra_compile_args = [ '-std=c++11', '-O3', '-fPIC', '-ggdb1', '-pipe', '-fomit-frame-pointer', '-fstack-protector-strong', ] -name = 'pyjson5' - setup( - name=name, - version=get_text('VERSION.inc'), - long_description=get_text('DESCRIPTION.inc'), - description='JSON5 serializer and parser for Python 3 written in Cython.', - author='René Kijewski', - author_email='pypi.org@k6i.de', - maintainer='René Kijewski', - maintainer_email='pypi.org@k6i.de', - url='https://github.com/Kijewski/pyjson5', - python_requires='~= 3.5', - zip_safe=False, ext_modules=[Extension( - name + '.' + name, - sources=[name + '.pyx'], + 'pyjson5.pyjson5', + sources=['pyjson5.pyx'], include_dirs=['src'], extra_compile_args=extra_compile_args, extra_link_args=extra_compile_args, language='c++', )], - platforms=['any'], - license='Apache 2.0', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Programming Language :: Cython', - 'Programming Language :: JavaScript', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: Implementation :: CPython', - 'Topic :: Text Processing :: General', - ], - packages=[name], - package_dir={ - '': 'src', - }, - package_data = { - name: [ - '__init__.pyi', - 'py.typed', - ], - }, )
diff --git a/src/VERSION.inc b/src/VERSION.inc index 16c1dd0..5885723 100644 --- a/src/VERSION.inc +++ b/src/VERSION.inc
@@ -1 +1 @@ -"1.6.0" +"1.6.1"