Skip to content

Commit c4994d9

Browse files
committed
update build.yml to only build 3.11
1 parent 808adb2 commit c4994d9

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
strategy:
2323
fail-fast: False
2424
matrix:
25-
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
25+
# python-version: [ 3.8, 3.9, '3.10', '3.11' ]
26+
python-version: [ '3.11' ]
2627
steps:
2728
- name: Checkout repository
2829
uses: actions/checkout@v2
@@ -39,8 +40,9 @@ jobs:
3940

4041
- name: Build wheels
4142
run: |
42-
python -m pip install -U pip numpy wheel
43+
python -m pip install -U pip numpy wheel setuptools
4344
python setup.py bdist_wheel -d dist
45+
ls -al ./dist
4446
4547
- name: Place wheels in artifacts folder
4648
uses: actions/upload-artifact@v2
@@ -60,15 +62,16 @@ jobs:
6062
with:
6163
submodules: true
6264

63-
- name: Setup Python 3.10
65+
- name: Setup Python 3.11
6466
uses: actions/setup-python@v2
6567
with:
66-
python-version: '3.10'
68+
python-version: '3.11'
6769

6870
- name: Build wheels
6971
env:
70-
# only build CPython-3.6 and later and skip 32-bit builds and skip windows
71-
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
72+
# only build CPython-3.8 and later and skip 32-bit builds and skip windows
73+
# CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
74+
CIBW_BUILD: cp311-*
7275
CIBW_SKIP: "*-win* *-manylinux_i686 *-musllinux*"
7376
# use latest build
7477
CIBW_MANYLINUX_X86_64_IMAGE: danielbok/nlopt_manylinux2014_x86_64:latest
@@ -91,7 +94,7 @@ jobs:
9194
strategy:
9295
matrix:
9396
os: [ windows-latest, ubuntu-latest, macos-latest ]
94-
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
97+
python-version: [ '3.11' ]
9598

9699
steps:
97100
- name: Checkout repository

extensions.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
import os
23
import platform
34
import shutil
@@ -80,6 +81,12 @@ def build_extension(self, ext: Extension):
8081

8182
# Copy over the important bits
8283
nlopt_py = build_dir / "extern" / "nlopt" / "src" / "swig" / "nlopt.py"
84+
85+
logging.info(f"Ext Dir - {ext_dir}\n" + '\n'.join(f' - {file.as_posix()}' for file in ext_dir.rglob('*')))
86+
for folder in [ext_dir, nlopt_py.parent]:
87+
logging.info(f'Files in {folder.as_posix()}\n' + '\n'.join(f' - {f.name}' for f in folder.iterdir()))
88+
89+
logging.info(f"Attempting to copy nlopt.py file from {nlopt_py.parent.as_posix()} to {ext_dir.as_posix()}")
8390
if not nlopt_py.exists():
8491
raise RuntimeError("swig python file was not generated")
8592

@@ -100,5 +107,5 @@ def create_directory(path: Path):
100107

101108

102109
def execute_command(cmd: List[str], cwd: Path, env: Dict[str, str] = os.environ):
103-
print(cwd.as_posix(), ':', ' '.join(cmd))
104-
check_call(cmd, cwd=cwd, env=env)
110+
logging.info(f"Running Command: {cwd.as_posix()}: {' '.join(cmd)}")
111+
check_call(cmd, cwd=cwd.as_posix(), env=env)

0 commit comments

Comments
 (0)