File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 3535 with :
3636 package-dir : ./PythonAPI
3737
38+ - name : Run abi3audit
39+ run : uvx abi3audit --report ./wheelhouse/*-abi3-*.whl
40+
3841 - uses : actions/upload-artifact@v4
3942 with :
4043 name : pycocotools-${{ matrix.os }}-${{ matrix.cibw_archs }}-${{ strategy.job-index }}
Original file line number Diff line number Diff line change 11"""To compile and install locally run "python setup.py build_ext --inplace".
22To install library to Python site-packages run "python -m pip install --use-feature=in-tree-build ."
33"""
4+ import platform
5+ import sys
6+ import sysconfig
47from pathlib import Path
58from setuptools import setup , Extension
69
710import numpy as np
811from Cython .Build import cythonize
912
13+ py_gil_disabled = sysconfig .get_config_var ('Py_GIL_DISABLED' )
14+ use_limited_api = not py_gil_disabled and platform .python_implementation () == 'CPython' and sys .version_info >= (3 , 12 )
15+ if use_limited_api :
16+ limited_api_args = {
17+ "py_limited_api" : True ,
18+ "define_macros" : [("Py_LIMITED_API" , "0x030C0000" )],
19+ }
20+ options = {"bdist_wheel" : {"py_limited_api" : "cp312" }}
21+ else :
22+ limited_api_args = {}
23+ options = {}
24+
1025ext_modules = [
1126 Extension (
1227 'pycocotools._mask' ,
1328 sources = ['./common/maskApi.c' , 'pycocotools/_mask.pyx' ],
1429 include_dirs = [np .get_include (), './common' ],
30+ ** limited_api_args
1531 )
1632 ]
1733
3652 extras_require = {
3753 'all' : ['matplotlib>=2.1.0' ],
3854 },
39- version = '2.0.9 ' ,
55+ version = '2.0.10 ' ,
4056 ext_modules = cythonize (ext_modules ),
57+ options = options ,
4158)
You can’t perform that action at this time.
0 commit comments