From 085509042bba964aa9d73bccf4e32c72a1458707 Mon Sep 17 00:00:00 2001 From: Pablo Wesley Date: Wed, 29 Nov 2023 13:49:01 -0300 Subject: [PATCH] build: include pipy upload and multiple python versions (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: setup workflow for windows wheel building * update residues lists pointer memory allocation * add workflow build trigger * build: include pipy upload and multiple python versions * Update deploy.yml * Update pyKVFinder version --------- Co-authored-by: João Victor Guerra --- .github/workflows/deploy.yml | 3 ++- C/pyKVFinder.c | 4 +++- pyKVFinder/__init__.py | 2 +- pyproject.toml | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed1474d1..5c225e8e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ name: Build and deploy on: release: types: [published] + workflow_dispatch: jobs: build_sdist: @@ -35,7 +36,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v3 diff --git a/C/pyKVFinder.c b/C/pyKVFinder.c index 7fee958b..ac7fcf17 100644 --- a/C/pyKVFinder.c +++ b/C/pyKVFinder.c @@ -2091,7 +2091,8 @@ char **interface(int *cavities, int nx, int ny, int nz, char **pdb, char **residues; // Allocate memory for reslist structure - res *reslist[ncav], *new, *old; + res **reslist = malloc(ncav * sizeof(res *)); + res *new, *old; // Initialize linked list for (i = 0; i < ncav; i++) @@ -2155,6 +2156,7 @@ char **interface(int *cavities, int nx, int ny, int nz, char **pdb, residues[j++] = "-1"; } residues[j] = NULL; + free(reslist); return residues; } diff --git a/pyKVFinder/__init__.py b/pyKVFinder/__init__.py index c3f81b82..bd8e0e23 100644 --- a/pyKVFinder/__init__.py +++ b/pyKVFinder/__init__.py @@ -31,7 +31,7 @@ """ __name__ = "pyKVFinder" -__version__ = "0.6.9" +__version__ = "0.6.10" license = "GNU GPL-3.0 License" from .utils import * diff --git a/pyproject.toml b/pyproject.toml index 4ccbeed8..ce9b8f89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,3 +96,6 @@ before-build = ["brew install gcc@9"] archs = ["native"] repair-wheel-command = "" test-skip = "*-macosx_arm64" + +[tool.cibuildwheel.windows] +archs = ["native"] \ No newline at end of file