Compare commits

...

6 commits

Author SHA1 Message Date
jupfi 449c56c85e Removed matplotlib dependency. 2024-04-21 19:47:58 +02:00
jupfi 0e9c48f426 Typo. 2024-04-21 12:50:35 +02:00
jupfi ff86d8ebff Set up QEMU 2024-04-21 12:50:00 +02:00
jupfi 4e95820658 Activated venv again. 2024-04-21 12:24:43 +02:00
jupfi 8dc3d32fed Fixed typo. 2024-04-21 12:18:23 +02:00
jupfi 3d54fc30af Updated automatic deployment. 2024-04-21 12:16:39 +02:00
4 changed files with 36 additions and 15 deletions

View file

@ -39,20 +39,25 @@ jobs:
with:
python-version: "3.10"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Prepare Python environment
run: |
python -m venv venv
. ./venv/bin/activate
pip install --upgrade pip h5py setuptools wheel build
pip install -U twine cibuildwheel
- name: Install dependencies
- name: Build wheels
run: |
sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
. ./venv/bin/activate
python -m cibuildwheel --output-dir dist
env:
CIBW_BEFORE_BUILD: ./build_wheel.sh
- name: Publish to PyPI
run: |
pip install -U twine cibuildwheel
python -m cibuildwheel .
. ./venv/bin/activate
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
env:
PYPI: ${{ secrets.PYPI }}

16
build_wheel.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
set -ex # will exit on any error and print all commands
yum install -y epel-release
yum update -y # Update the system
yum groupinstall -y "Development Tools"
yum install -y cmake3 git libusb-devel hdf5-devel
# Clone and build LimeSuite
rm -rf LimeSuite
git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite/build || exit
cmake3 ../ -DENABLE_GUI=OFF
make -j$(nproc)
make install
ldconfig

View file

@ -14,7 +14,6 @@ classifiers = [
]
dependencies = [
"h5py",
"matplotlib",
]
[build-system]
@ -24,7 +23,6 @@ requires = [
"Cython",
"h5py",
"numpy",
'matplotlib',
]
build-backend = "setuptools.build_meta"
@ -52,4 +50,13 @@ convention = "google"
"Source Code" = "https://github.com/nqrduck/limedriverbindings"
[tool.hatch.build.targets.wheel]
packages = ["src/limedriver"]
packages = ["src/limedriver"]
[tool.cibuildwheel]
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
manylinux-ppc64le-image = "quay.io/pypa/manylinux_2_28_ppc64le"
manylinux-s390x-image = "quay.io/pypa/manylinux_2_28_s390x"
[tool.cibuildwheel.linux]
archs = ["aarch64", "x86_64", "ppc64le", "s390x"]

View file

@ -1,6 +1,5 @@
import h5py
import numpy as np
import matplotlib.pyplot as plt
# class for accessing data of stored HDF5 file this is from the limr program by andrin doll
class HDF():
@ -131,12 +130,6 @@ class HDF():
print('{:<5}: {:>50} {:<25}'.format(key, val, self.parsoutp[key][1]))
def plot_dta(self):
plt.plot(self.tdx, self.tdy.real)
plt.xlabel('$t$ [$\mu$s]')
plt.ylabel('$y$ [Counts]')
plt.show()
# empty class to store dynamic attributes, basically for the attributes in HDF keys
class dynclass:
pass