Skip to content

Commit 9a731ad

Browse files
committed
Fix PEP 517 build
1 parent 4a5f342 commit 9a731ad

9 files changed

+80
-63
lines changed

.github/workflows/build_linux_wheels.yml .github/workflows/build_wheels.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Manylinux Wheels
1+
name: Build Wheels
22

33
on:
44
workflow_dispatch:
@@ -57,7 +57,8 @@ jobs:
5757
- name: Build wheels
5858
run: python -m cibuildwheel --output-dir wheelhouse
5959
env:
60-
CIBW_SKIP: "${{ github.event.inputs.skip }}" # skip Python 2.7 wheels
60+
CIBW_BUILD_FRONTEND: build
61+
CIBW_SKIP: "${{ github.event.inputs.skip }}"
6162
CIBW_MANYLINUX_X86_64_IMAGE: ${{ github.event.inputs.manylinux }}
6263
CIBW_MANYLINUX_I686_IMAGE: ${{ github.event.inputs.manylinux }}
6364
CIBW_ARCHS: ${{ github.event.inputs.archs }}

.github/workflows/compile_test.yml .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: So, does it work?
1+
name: CI
22

33
on: [push]
44

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Changelog
22

3+
**1.6.1**
4+
5+
* 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))
6+
37
**1.6.0**
48

5-
* Fallback to encode `vars(obj)` if `obj` is not stringifyable, e.g. to serialize [dataclasses](https://docs.python.org/3/library/dataclasses.html).
6-
* Update documentation to use newer [sphinx](https://www.sphinx-doc.org/) version.
7-
* Use [dependabot](https://github.com/dependabot) to keep dependencies current.
8-
* Update [fast_double_parser](https://github.com/lemire/fast_double_parser).
9+
* Fallback to encode `vars(obj)` if `obj` is not stringifyable, e.g. to serialize [dataclasses](https://docs.python.org/3/library/dataclasses.html)
10+
* Update documentation to use newer [sphinx](https://www.sphinx-doc.org/) version
11+
* Use [dependabot](https://github.com/dependabot) to keep dependencies current
12+
* Update [fast_double_parser](https://github.com/lemire/fast_double_parser)
913

1014
**1.5.3**
1115

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ include sha512sum.py
44
include Makefile
55
include pyjson5.cpp
66
include pyjson5.pyx
7+
include pyproject.toml
78
include requires.txt
9+
include setup.cfg
810
include third-party/fast_double_parser/include/fast_double_parser.h
911
recursive-include docs **
1012
recursive-include src **

pyproject.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[build-system]
2+
requires = [
3+
"Cython",
4+
"setuptools",
5+
"wheel",
6+
]
7+
build-backend = "setuptools.build_meta"

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
build
12
cibuildwheel == 2.*
23
colorama == 0.4.*
34
docutils == 0.17.*
45
cython == 0.*
56
more_itertools == 8.*
67
myst-parser == 0.16.*
8+
setuptools
79
sphinx == 4.*
810
sphinx_autodoc_typehints == 1.*
911
sphinx_rtd_theme == 1.*

setup.cfg

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[metadata]
2+
version = 1.6.1
3+
4+
name = pyjson5
5+
description = JSON5 serializer and parser for Python 3 written in Cython.
6+
url = https://github.com/Kijewski/pyjson5
7+
8+
author = René Kijewski
9+
maintainer = René Kijewski
10+
author_email = [email protected]
11+
maintainer_email = [email protected]
12+
13+
long_description = file: README.rst
14+
long_description_content_type = text/x-rst
15+
16+
license = Apache License 2.0
17+
license_files = LICENSE
18+
19+
classifiers =
20+
Development Status :: 5 - Production/Stable
21+
Intended Audience :: Developers
22+
Intended Audience :: System Administrators
23+
License :: OSI Approved :: Apache Software License
24+
Operating System :: OS Independent
25+
Programming Language :: Cython
26+
Programming Language :: JavaScript
27+
Programming Language :: Python :: 3
28+
Programming Language :: Python :: 3.5
29+
Programming Language :: Python :: 3.6
30+
Programming Language :: Python :: 3.7
31+
Programming Language :: Python :: 3.8
32+
Programming Language :: Python :: 3.9
33+
Programming Language :: Python :: 3.10
34+
Programming Language :: Python :: 3 :: Only
35+
Programming Language :: Python :: Implementation :: CPython
36+
Topic :: Text Processing :: General
37+
38+
[options]
39+
zip_safe = False
40+
41+
python_requires = ~= 3.5
42+
setup_requires =
43+
Cython
44+
setuptools
45+
wheel
46+
47+
include_package_data = True
48+
packages = pyjson5
49+
package_dir =
50+
= src
51+
52+
[options.package_data]
53+
pyjson5 = __init__.pyi, py.typed

setup.py

+3-55
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,19 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
from setuptools import setup, Extension
4-
from os.path import dirname, join, abspath
5-
6-
7-
def get_text(name):
8-
root = abspath(dirname(__file__))
9-
with open(join(root, 'src', name), 'rt') as f:
10-
return eval(f.read().strip())
11-
124

135
extra_compile_args = [
146
'-std=c++11', '-O3', '-fPIC', '-ggdb1', '-pipe',
157
'-fomit-frame-pointer', '-fstack-protector-strong',
168
]
179

18-
name = 'pyjson5'
19-
2010
setup(
21-
name=name,
22-
version=get_text('VERSION.inc'),
23-
long_description=get_text('DESCRIPTION.inc'),
24-
description='JSON5 serializer and parser for Python 3 written in Cython.',
25-
author='René Kijewski',
26-
author_email='[email protected]',
27-
maintainer='René Kijewski',
28-
maintainer_email='[email protected]',
29-
url='https://github.com/Kijewski/pyjson5',
30-
python_requires='~= 3.5',
31-
zip_safe=False,
3211
ext_modules=[Extension(
33-
name + '.' + name,
34-
sources=[name + '.pyx'],
12+
'pyjson5.pyjson5',
13+
sources=['pyjson5.pyx'],
3514
include_dirs=['src'],
3615
extra_compile_args=extra_compile_args,
3716
extra_link_args=extra_compile_args,
3817
language='c++',
3918
)],
40-
platforms=['any'],
41-
license='Apache 2.0',
42-
classifiers=[
43-
'Development Status :: 5 - Production/Stable',
44-
'Intended Audience :: Developers',
45-
'Intended Audience :: System Administrators',
46-
'License :: OSI Approved :: Apache Software License',
47-
'Operating System :: OS Independent',
48-
'Programming Language :: Cython',
49-
'Programming Language :: JavaScript',
50-
'Programming Language :: Python :: 3',
51-
'Programming Language :: Python :: 3.5',
52-
'Programming Language :: Python :: 3.6',
53-
'Programming Language :: Python :: 3.7',
54-
'Programming Language :: Python :: 3.8',
55-
'Programming Language :: Python :: 3.9',
56-
'Programming Language :: Python :: 3.10',
57-
'Programming Language :: Python :: 3 :: Only',
58-
'Programming Language :: Python :: Implementation :: CPython',
59-
'Topic :: Text Processing :: General',
60-
],
61-
packages=[name],
62-
package_dir={
63-
'': 'src',
64-
},
65-
package_data = {
66-
name: [
67-
'__init__.pyi',
68-
'py.typed',
69-
],
70-
},
7119
)

src/VERSION.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"1.6.0"
1+
"1.6.1"

0 commit comments

Comments
 (0)