diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..0ec6694 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,61 @@ +name: package into static linked wheel + +on: + push: + tags: + - 'v*' # + +jobs: + package: + name: package up into a nice wheel + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.7' + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.9.0 + + - name: Build wheels for linux python versions + run: | + python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: '{cp,pp}3*-*' + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_BEFORE_ALL_LINUX: yum -y install epel-release hdf hdf-devel && ln -s /usr/lib64/hdf/lib* /usr/lib64/ + CIBW_ARCHS_LINUX: 'x86_64' + + - name: purge old _linux_wheels + run: | + mkdir wheelhouse + cp dist/*manylinux* wheelhouse/ + + - uses: actions/upload-artifact@v2 + with: + name: wheelhouse + path: wheelhouse + + - name: Publish a Python distribution to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_TEST_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + packages_dir: wheelhouse/ + verbose: true + + - name: Publish a Python distribution to PyPI + if: github.event.base_ref == 'refs/heads/master' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + packages_dir: wheelhouse/ + + diff --git a/LICENSE b/LICENSE index 0426e5e..e641f40 100644 --- a/LICENSE +++ b/LICENSE @@ -19,3 +19,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Built distributions of pyhdf also include: +Libary | License +- hdf | BSD-3 +- jpeg | Custom BSD-like +- zlib | zlib diff --git a/doc/install.rst b/doc/install.rst index 81b1d04..ab08c59 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -16,7 +16,10 @@ Once you're in the conda environment, install `pyhdf from conda-forge conda install -c conda-forge pyhdf If you don't want to use conda, the instructions below describes how you -can compile pyhdf from source. +can compile pyhdf from source. Version 0.10.3 also includes static linked wheels for +linux with cpython 3.6-3.9. If compatible, `pip install pyhdf` will include the neccessary +libraries for you. If you don't want to use the built manylinux distribution, follow instructions +below to build from source downloading from pypi with `pip install pyhdf --no-binary :all:`. Download the source