Skip to content

Commit

Permalink
Add h5py
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxn committed May 26, 2020
1 parent e7c2b14 commit 36ba428
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/h5py.yaml
@@ -0,0 +1,25 @@
name: Build HDF5

on:
push:
branches:
- master
paths:
- h5py/build.sh
- h5py/VERSION
- trigger.sh
- .github/workflows/h5py.yaml
- .github/workflows/build.yaml

jobs:
build_h5py:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Trigger build
run: bash trigger.sh
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
NAME: h5py
DISPLAY_NAME: HDF5 for Python
30 changes: 30 additions & 0 deletions h5py/LICENSE
@@ -0,0 +1,30 @@
Copyright (c) 2008 Andrew Collette and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions h5py/VERSION
@@ -0,0 +1 @@
2.10.0
27 changes: 27 additions & 0 deletions h5py/build.sh
@@ -0,0 +1,27 @@
#!/bin/bash

set -ex

# Install dependencies
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential gfortran pkg-config \
curl ca-certificates \
libhdf5-dev \
python3-dev python3-setuptools python3-wheel python3-pip python3-numpy
pip3 install Cython
export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/hdf5/serial:$LD_LIBRARY_PATH

# Download source code
VERSION=`cat VERSION`
curl -OL https://github.com/h5py/h5py/releases/download/${VERSION}/h5py-${VERSION}.tar.gz
tar -zxvf h5py-${VERSION}.tar.gz
cd h5py-${VERSION}

# Multi core build
export NPY_NUM_BUILD_JOBS=`nproc --all`

python3 setup.py bdist_wheel

# Move out wheel
mv dist/*.whl ../

0 comments on commit 36ba428

Please sign in to comment.