Skip to content

Commit

Permalink
Add 312 metadata and example cythonize command
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Nov 2, 2023
1 parent 2f7aa28 commit 5d0f253
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 14 additions & 2 deletions line_profiler/_line_profiler.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#cython: language_level=3
"""
# cython: language_level=3
# cython: infer_types=True
# distutils: language=c++
# distutils: include_dirs = python25.pxd
r"""
This is the Cython backend used in :py:mod:`line_profiler.line_profiler`.
Ignore:
# Standalone compile instructions for developers
# Assuming the cwd is the repo root.
cythonize --annotate --inplace \
./line_profiler/_line_profiler.pyx \
./line_profiler/timers.c \
./line_profiler/unset_trace.c
"""
from .python25 cimport PyFrameObject, PyObject, PyStringObject
from sys import byteorder
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools>=41.0.1",
"Cython==3.0.0a11 ; python_version < '4.0' and python_version >= '3.12' ",
"Cython>=3.0.3; python_version < '4.0' and python_version >= '3.12' ",
"Cython>=0.29.24,<=3.0.0a11 ; python_version < '3.12' ",
]
build-backend = "setuptools.build_meta" # comment out to disable pep517
Expand Down Expand Up @@ -32,7 +32,8 @@ omit =[
]

[tool.cibuildwheel]
build = "cp36-* cp37-* cp38-* cp39-* cp310-* cp311-*"
#build = "cp36-* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*"
build = "cp312-*"
build-frontend = "build"
build-verbosity = 1
test-requires = [ "-r requirements/tests.txt",]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def run_cythonize(force=False):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development',
]
Expand Down

0 comments on commit 5d0f253

Please sign in to comment.