mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-11-05 10:10:03 +00:00
Compare commits
6 commits
620b5809ee
...
449c56c85e
Author | SHA1 | Date | |
---|---|---|---|
|
449c56c85e | ||
|
0e9c48f426 | ||
|
ff86d8ebff | ||
|
4e95820658 | ||
|
8dc3d32fed | ||
|
3d54fc30af |
4 changed files with 36 additions and 15 deletions
15
.github/workflows/python-publish.yml
vendored
15
.github/workflows/python-publish.yml
vendored
|
@ -39,20 +39,25 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Prepare Python environment
|
- name: Prepare Python environment
|
||||||
run: |
|
run: |
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
. ./venv/bin/activate
|
. ./venv/bin/activate
|
||||||
pip install --upgrade pip h5py setuptools wheel build
|
pip install -U twine cibuildwheel
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Build wheels
|
||||||
run: |
|
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
|
- name: Publish to PyPI
|
||||||
run: |
|
run: |
|
||||||
pip install -U twine cibuildwheel
|
. ./venv/bin/activate
|
||||||
python -m cibuildwheel .
|
|
||||||
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
|
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
|
||||||
env:
|
env:
|
||||||
PYPI: ${{ secrets.PYPI }}
|
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 = [
|
dependencies = [
|
||||||
"h5py",
|
"h5py",
|
||||||
"matplotlib",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
@ -24,7 +23,6 @@ requires = [
|
||||||
"Cython",
|
"Cython",
|
||||||
"h5py",
|
"h5py",
|
||||||
"numpy",
|
"numpy",
|
||||||
'matplotlib',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
@ -53,3 +51,12 @@ convention = "google"
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[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 h5py
|
||||||
import numpy as np
|
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 for accessing data of stored HDF5 file this is from the limr program by andrin doll
|
||||||
class HDF():
|
class HDF():
|
||||||
|
@ -131,12 +130,6 @@ class HDF():
|
||||||
|
|
||||||
print('{:<5}: {:>50} {:<25}'.format(key, val, self.parsoutp[key][1]))
|
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
|
# empty class to store dynamic attributes, basically for the attributes in HDF keys
|
||||||
class dynclass:
|
class dynclass:
|
||||||
pass
|
pass
|
Loading…
Reference in a new issue