Skip to content

Commit df5baa8

Browse files
jschuellerDanielBok
authored andcommitted
Cancel abi3 changes
1 parent 4ccde87 commit df5baa8

3 files changed

Lines changed: 10 additions & 32 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: False
2424
matrix:
25-
# python-version: [ 3.8, 3.9, '3.10', '3.11' ]
26-
python-version: [ '3.11' ]
25+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
2726
steps:
2827
- name: Checkout repository
2928
uses: actions/checkout@v4
@@ -35,12 +34,9 @@ jobs:
3534
with:
3635
python-version: ${{ matrix.python-version }}
3736

38-
- name: Install SWIG
39-
run: choco install swig -y
40-
4137
- name: Build wheels
4238
run: |
43-
python -m pip install -U pip numpy wheel setuptools
39+
python -m pip install -U pip numpy swig wheel setuptools
4440
python setup.py bdist_wheel -d dist
4541
ls -al ./dist
4642
@@ -62,16 +58,16 @@ jobs:
6258
with:
6359
submodules: true
6460

65-
- name: Setup Python 3.6
61+
- name: Setup Python ${{ matrix.python-version }}
6662
uses: actions/setup-python@v2
6763
with:
68-
python-version: '3.6'
64+
python-version: '3.11'
6965

7066
- name: Build wheels
7167
env:
72-
# only build CPython-3.6+ and skip 32-bit builds and skip windows
73-
CIBW_BUILD: cp36-*
74-
CIBW_SKIP: "*-win* *-manylinux_i686 *-musllinux*"
68+
# only build CPython-3.8+ and skip 32-bit builds
69+
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
70+
CIBW_SKIP: "*-manylinux_i686 *-musllinux*"
7571
# use latest build
7672
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64
7773
CIBW_BEFORE_ALL_MACOS: brew install swig
@@ -93,7 +89,7 @@ jobs:
9389
strategy:
9490
matrix:
9591
os: [ windows-latest, ubuntu-latest, macos-latest ]
96-
python-version: [ '3.11' ]
92+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
9793

9894
steps:
9995
- name: Checkout repository

extensions.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ def build_extension(self, ext: Extension):
5757
ext.source_dir.as_posix()
5858
]
5959

60-
if platform.system() == "Windows":
61-
cmd += "-DPYTHON_EXTENSION_MODULE_SUFFIX=.abi3.so"
62-
else:
63-
cmd += "-DPYTHON_EXTENSION_MODULE_SUFFIX=.abi3.pyd"
64-
abi3_flag = "-DPy_LIMITED_API=0x03060000"
65-
6660
if platform.system() == "Windows":
6761
cmd.insert(2, f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{self.config.upper()}={_ed}")
6862

@@ -71,7 +65,7 @@ def build_extension(self, ext: Extension):
7165
cwd=build_dir,
7266
env={
7367
**os.environ.copy(),
74-
"CXXFLAGS": f'{os.environ.get("CXXFLAGS", "")} -DVERSION_INFO="{self.distribution.get_version()}" {abi3_flag}'
68+
"CXXFLAGS": f'{os.environ.get("CXXFLAGS", "")} -DVERSION_INFO="{self.distribution.get_version()}"'
7569
})
7670

7771
# build the DLL

setup.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,10 @@
1919
version = ".".join(version)
2020

2121

22-
class bdist_wheel_abi3(bdist_wheel):
23-
def get_tag(self):
24-
python, abi, plat = super().get_tag()
25-
26-
if python.startswith("cp"):
27-
# on CPython, our wheels are abi3 and compatible back to 3.6
28-
return "cp36", "abi3", plat
29-
30-
return python, abi, plat
31-
32-
3322
setup(
3423
version=version,
3524
install_requires=["numpy >=1.18.5"],
3625
ext_modules=[NLOptBuildExtension("nlopt._nlopt", version)],
37-
cmdclass={"build_ext": NLOptBuild,
38-
"bdist_wheel": bdist_wheel_abi3},
26+
cmdclass={"build_ext": NLOptBuild},
3927
zip_safe=False,
4028
)

0 commit comments

Comments
 (0)