From 7f51aaaa114eab9a8da9a6a5e9d6bd7048e67352 Mon Sep 17 00:00:00 2001 From: Lauri Himanen <6513318+lauri-codes@users.noreply.github.com> Date: Tue, 14 May 2024 11:42:12 +0300 Subject: [PATCH] V0.1.5 (#2) * Updated wheel build action. * Updated readme. --- .github/workflows/wheels.yml | 22 ++++++++------------ README.md | 39 ++++++++++++++++++++++-------------- setup.py | 4 +++- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 922d93e..6994bd0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,4 +1,4 @@ -name: Build +name: wheels on: [workflow_dispatch] @@ -8,23 +8,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] + os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - - uses: actions/checkout@v3 - - # Used to host cibuildwheel - - uses: actions/setup-python@v3 - - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.13.1 + - uses: actions/checkout@v4 - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse - # to supply options, put them in 'env', like: - # env: - # CIBW_SOME_OPTION: value + uses: pypa/cibuildwheel@v2.18.0 + env: + CIBW_SKIP: cp36-* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl diff --git a/README.md b/README.md index 58ec8de..78630bd 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ # pyzeo + Python wrapper for the [Zeo++ library](http://zeoplusplus.org). Based on the latest released version 0.3. ## Installation -### pip +We provide pre-built wheels for most platforms (including Apple Silicon). So in most cases you will want to install the package with `pip`: + ```sh pip install pyzeo ``` -### From source +### Installing from source + +If you wish to install the package directly from the source code, you can do so with: ```sh git clone https://github.com/nomad-coe/pyzeo @@ -16,19 +20,8 @@ cd pyzeo pip install . ``` -### Cython -By default the package comes with pre-built Cython binding code. The cython -wrapper definitions live inside src/pyzeo. These bindings can be recreated -by first setting `USE_CYTHON=True` in setup.py, and then recreating the bindings -with: - -```sh -python setup.py build_ext --inplace --force -``` - -Remember to disable cython afterwards by setting `USE_CYTHON=False` in setup.py. - -### Common issues +Note that this type of installation will require a separate, platfrom-dependent +compilation step. These are some common problems you may encounter in the compilation step: - **fatal error: Python.h: No such file or directory**: The package depends on C/C++ extensions that are compiled during the setup. For the compilation to @@ -49,13 +42,28 @@ Remember to disable cython afterwards by setting `USE_CYTHON=False` in setup.py. xcode-select --install +### Cython + +By default the package comes with pre-built Cython binding code. The cython +wrapper definitions live inside src/pyzeo. These bindings can be recreated +by first setting `USE_CYTHON=True` in setup.py, and then recreating the bindings +with: + +```sh +python setup.py build_ext --inplace --force +``` + +Remember to disable cython afterwards by setting `USE_CYTHON=False` in setup.py. + ### License + The python wrapper code is licensed under Apache 2.0. [Zeo++ library](http://zeoplusplus.org) and [Voro++ library](https://math.lbl.gov/voro++/) which are included in the source code have the following license: #### Zeo++ + > Zeo++ Copyright (c) 2011, The Regents of the University > of California, through Lawrence Berkeley National Laboratory (subject > to receipt of any required approvals from the U.S. Dept. of Energy). @@ -102,6 +110,7 @@ have the following license: > form. #### Voro++ + > Voro++ Copyright (c) 2008, The Regents of the University of California, through > Lawrence Berkeley National Laboratory (subject to receipt of any required > approvals from the U.S. Dept. of Energy). All rights reserved. diff --git a/setup.py b/setup.py index 65b4304..b42aebf 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def using_clang(): setup( name='pyzeo', - version='0.1.4', + version='0.1.5', description="Python interface to Zeo++", long_description="Python interface to Zeo++", url="https://github.com/nomad-coe/pyzeo", @@ -106,6 +106,8 @@ def using_clang(): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering"