From 404ce491e3d62f9206917e67ddd2cc00831176f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Sat, 8 Oct 2022 07:48:43 -0300 Subject: [PATCH 1/6] added action to build wheelsfor other platforms --- .github/workflows/wheels.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/wheels.py diff --git a/.github/workflows/wheels.py b/.github/workflows/wheels.py new file mode 100644 index 0000000..c618c44 --- /dev/null +++ b/.github/workflows/wheels.py @@ -0,0 +1,32 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, windows-2019, macOS-11] + + steps: + - uses: actions/checkout@v3 + + # Used to host cibuildwheel + - uses: actions/setup-python@v3 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.10.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + # to supply options, put them in 'env', like: + # env: + # CIBW_SOME_OPTION: value + env: + CIBW_BUILD: cp39-* + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl \ No newline at end of file From e056804e5b486fd0088f14247733e9ec620367bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Sat, 8 Oct 2022 07:55:40 -0300 Subject: [PATCH 2/6] added py310 build --- .github/workflows/wheels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.py b/.github/workflows/wheels.py index c618c44..215a202 100644 --- a/.github/workflows/wheels.py +++ b/.github/workflows/wheels.py @@ -25,7 +25,7 @@ # env: # CIBW_SOME_OPTION: value env: - CIBW_BUILD: cp39-* + CIBW_BUILD: cp39-* cp310-* - uses: actions/upload-artifact@v3 with: From 5ac1d1cd6c90a3c794e7cfc00e2cb3c2812de1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Sat, 8 Oct 2022 07:58:37 -0300 Subject: [PATCH 3/6] renamed --- .github/workflows/{wheels.py => wheels.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{wheels.py => wheels.yaml} (100%) diff --git a/.github/workflows/wheels.py b/.github/workflows/wheels.yaml similarity index 100% rename from .github/workflows/wheels.py rename to .github/workflows/wheels.yaml From f0a8a2878cd2ba1524169e329d3132d719f855f0 Mon Sep 17 00:00:00 2001 From: fccoelho Date: Mon, 10 Oct 2022 16:35:07 -0300 Subject: [PATCH 4/6] added cibuildwheel configuration to pyproject --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7844a0f..132f5c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,3 +57,7 @@ line-length = 79 skip-string-normalization = true target-version = ["py37", "py38", "py39"] exclude = "docs/" + +[tool.cibuildwheel.windows] +before-build = "bash {project}/tools/wheels/cibw_before_build_win.sh {project}" +repair-wheel-command = "bash ./tools/wheels/repair_windows.sh {wheel} {dest_dir}" \ No newline at end of file From d294d1fb1237e40fe4c87f850f76ab32eeff88c4 Mon Sep 17 00:00:00 2001 From: fccoelho Date: Mon, 10 Oct 2022 17:02:52 -0300 Subject: [PATCH 5/6] commented the unistd include line as it does not seem to be required to build for linux --- main | 0 pyproject.toml | 4 ---- pyreaddbc/_readdbc.c | 2 +- pyreaddbc/c-src/dbc2dbf.c | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 main diff --git a/main b/main new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index 132f5c6..7844a0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,3 @@ line-length = 79 skip-string-normalization = true target-version = ["py37", "py38", "py39"] exclude = "docs/" - -[tool.cibuildwheel.windows] -before-build = "bash {project}/tools/wheels/cibw_before_build_win.sh {project}" -repair-wheel-command = "bash ./tools/wheels/repair_windows.sh {wheel} {dest_dir}" \ No newline at end of file diff --git a/pyreaddbc/_readdbc.c b/pyreaddbc/_readdbc.c index e2d49a7..5232d51 100644 --- a/pyreaddbc/_readdbc.c +++ b/pyreaddbc/_readdbc.c @@ -597,7 +597,7 @@ static void (*_cffi_call_python_org)(struct _cffi_externpy_s *, char *); #include #include -#include +//#include #include #include #include diff --git a/pyreaddbc/c-src/dbc2dbf.c b/pyreaddbc/c-src/dbc2dbf.c index 91fae03..92b0355 100644 --- a/pyreaddbc/c-src/dbc2dbf.c +++ b/pyreaddbc/c-src/dbc2dbf.c @@ -29,7 +29,7 @@ #include #include -#include +//#include #include #include #include From 9caf23e67f90084bc28388d37e4e37cf1bc95809 Mon Sep 17 00:00:00 2001 From: fccoelho Date: Mon, 10 Oct 2022 17:18:36 -0300 Subject: [PATCH 6/6] skipping build for win32 --- .github/workflows/wheels.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 215a202..39f2c29 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -26,6 +26,7 @@ jobs: # CIBW_SOME_OPTION: value env: CIBW_BUILD: cp39-* cp310-* + CIBW_SKIP: cp*-win32 - uses: actions/upload-artifact@v3 with: