Skip to content

Commit

Permalink
V0.1.5 (#2)
Browse files Browse the repository at this point in the history
* Updated wheel build action.

* Updated readme.
  • Loading branch information
lauri-codes authored May 14, 2024
1 parent ffc29a9 commit 7f51aaa
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 30 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: wheels

on: [workflow_dispatch]

Expand All @@ -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/[email protected]
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
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
# 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
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
Expand All @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 7f51aaa

Please sign in to comment.