mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-06-22 22:03:20 +00:00
Compare commits
6 commits
620b5809ee
...
449c56c85e
Author | SHA1 | Date | |
---|---|---|---|
|
449c56c85e | ||
|
0e9c48f426 | ||
|
ff86d8ebff | ||
|
4e95820658 | ||
|
8dc3d32fed | ||
|
3d54fc30af |
15
.github/workflows/python-publish.yml
vendored
15
.github/workflows/python-publish.yml
vendored
|
@ -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
16
build_wheel.sh
Executable 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
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue