mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
dev/ bumped pybind11 version and added setuptools on host (#1049)
* bumped pybind11 version and added setuptools on host * updated pybind11 tarball to 2.13 and in cmakefile to get 2.13 frpm github, also updated documentation about pybind 2.13 * updated client versioing, doc * updating readme --------- Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
parent
ffd7cd1070
commit
0123169e35
@ -309,14 +309,15 @@ if (SLS_USE_PYTHON)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
pybind11
|
pybind11
|
||||||
GIT_REPOSITORY https://github.com/pybind/pybind11
|
GIT_REPOSITORY https://github.com/pybind/pybind11
|
||||||
GIT_TAG v2.11.0
|
GIT_TAG v2.13.0
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
# https://github.com/pybind/pybind11/releases
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
pybind11
|
pybind11
|
||||||
URL ${CMAKE_SOURCE_DIR}/libs/pybind11/v2.11.0.tar.gz
|
URL ${CMAKE_SOURCE_DIR}/libs/pybind11/v2.13.0.tar.gz
|
||||||
URL_HASH MD5=90c4946e87c64d8d8fc0ae4edf35d780
|
URL_HASH MD5=10cb1efba3aca997389d08bceb0ea767
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
FetchContent_MakeAvailable(pybind11)
|
FetchContent_MakeAvailable(pybind11)
|
||||||
|
120
README.md
120
README.md
@ -2,7 +2,11 @@
|
|||||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
||||||
|
|
||||||
## Documentaion
|
## Documentaion
|
||||||
Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
||||||
|
|
||||||
|
Different releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
||||||
|
|
||||||
|
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -42,33 +46,20 @@ conda search slsdet
|
|||||||
conda search slsdetgui
|
conda search slsdetgui
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Build from source
|
## 2. Build from source
|
||||||
|
|
||||||
##### 2.1 Download Source Code from github
|
### 2.1 Download Source Code from github
|
||||||
```
|
```
|
||||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
**Pybind for Python**<br>
|
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
||||||
* **v7.0.0+**:
|
|
||||||
pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
|
||||||
|
|
||||||
* **Older versions**:
|
|
||||||
pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
|
||||||
|
|
||||||
```
|
|
||||||
# clone using recursive to get pybind11 submodule
|
|
||||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
|
||||||
|
|
||||||
# update submodule when switching between releases
|
|
||||||
cd slsDetectorPackage
|
|
||||||
git submodule update --init
|
|
||||||
```
|
|
||||||
|
|
||||||
##### 2.2 Build from source
|
|
||||||
|
|
||||||
|
|
||||||
###### Build using CMake
|
### 2.2 Build from source
|
||||||
|
|
||||||
|
|
||||||
|
### Build using CMake
|
||||||
|
|
||||||
```
|
```
|
||||||
# outside slsDetecorPackage folder
|
# outside slsDetecorPackage folder
|
||||||
@ -94,26 +85,28 @@ Instead of the cmake command, one can use ccmake to get a list of options to con
|
|||||||
ccmake ..
|
ccmake ..
|
||||||
|
|
||||||
# choose the options
|
# choose the options
|
||||||
# first press [c] - configure
|
# first press [c] - configure (unil you see [g])
|
||||||
# then press [g] - generate
|
# then press [g] - generate
|
||||||
```
|
```
|
||||||
|
|
||||||
|Example cmake options|Comment|
|
|Example cmake options|Comment|
|
||||||
|---|---|
|
|---|---|
|
||||||
| -DSLS_USE_PYTHON=ON | Python |
|
| -DSLS_USE_PYTHON=ON | Python |
|
||||||
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment |
|
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda env |
|
||||||
| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead |
|
|
||||||
| -DSLS_USE_GUI=ON | GUI |
|
| -DSLS_USE_GUI=ON | GUI |
|
||||||
|
| -DSLS_USE_HDF5=ON | HDF5 |
|
||||||
|
| -DSLS_USE_SIMULATOR=ON | Simulator |
|
||||||
|
|
||||||
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
###### Build using in-built cmk.sh script
|
### Build using in-built cmk.sh script
|
||||||
|
|
||||||
```
|
```
|
||||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||||
|
|
||||||
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
|
Usage: $0 [-b] [-c] [-d <HDF5 directory>] [-e] [-g] [-h] [-i]
|
||||||
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
|
[-j <Number of threads>] [-k <CMake command>] [-l <Install directory>]
|
||||||
[r] [s] [t] [u] [z]
|
[-m] [-n] [-p] [-r] [-s] [-t] [-u] [-z]
|
||||||
-[no option]: only make
|
-[no option]: only make
|
||||||
-b: Builds/Rebuilds CMake files normal mode
|
-b: Builds/Rebuilds CMake files normal mode
|
||||||
-c: Clean
|
-c: Clean
|
||||||
@ -128,7 +121,6 @@ Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of
|
|||||||
-m: Manuals
|
-m: Manuals
|
||||||
-n: Manuals without compiling doxygen (only rst)
|
-n: Manuals without compiling doxygen (only rst)
|
||||||
-p: Builds/Rebuilds Python API
|
-p: Builds/Rebuilds Python API
|
||||||
-q: Zmq hint directory
|
|
||||||
-r: Build/Rebuilds only receiver
|
-r: Build/Rebuilds only receiver
|
||||||
-s: Simulator
|
-s: Simulator
|
||||||
-t: Build/Rebuilds only text client
|
-t: Build/Rebuilds only text client
|
||||||
@ -145,11 +137,14 @@ Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of
|
|||||||
# new build, python and compile in parallel:
|
# new build, python and compile in parallel:
|
||||||
./cmk.sh -cbpj5
|
./cmk.sh -cbpj5
|
||||||
|
|
||||||
#To use the system zmq (/usr/lib64) instead
|
#For rebuilding only certain sections
|
||||||
./cmk.sh -cbj5 -q /usr/lib64
|
./cmk.sh -tg #only text client and gui
|
||||||
|
./cmk.sh -r #only receiver
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Build on old distributions
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
### Build on old distributions
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
@ -166,7 +161,10 @@ cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
|||||||
make -j12
|
make -j12
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Build slsDetectorGui (Qt5)
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
|
||||||
|
### Build slsDetectorGui (Qt5)
|
||||||
|
|
||||||
1. Using pre-built binary on conda
|
1. Using pre-built binary on conda
|
||||||
```
|
```
|
||||||
@ -180,7 +178,14 @@ yum install qt5-qtbase-devel.x86_64
|
|||||||
yum install qt5-qtsvg-devel.x86_64
|
yum install qt5-qtsvg-devel.x86_64
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Using conda
|
3. Using system installation on RHEL8
|
||||||
|
```
|
||||||
|
yum install qt5-qtbase-devel.x86_64
|
||||||
|
yum install qt5-qtsvg-devel.x86_64
|
||||||
|
yum install expat-devel.x86_64
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Using conda
|
||||||
```
|
```
|
||||||
#Add channels for dependencies and our library
|
#Add channels for dependencies and our library
|
||||||
conda config --add channels conda-forge
|
conda config --add channels conda-forge
|
||||||
@ -208,13 +213,15 @@ cd slsDetectorPackage
|
|||||||
./cmk.sh -cbgj9
|
./cmk.sh -cbgj9
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Build documentation from package
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
### Build documentation from package
|
||||||
The documentation for the slsDetectorPackage is build using a combination
|
The documentation for the slsDetectorPackage is build using a combination
|
||||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||||
is to use conda
|
is to use conda
|
||||||
|
|
||||||
```
|
```
|
||||||
conda create -n myenv python sphinx_rtd_theme breathe
|
conda create -n myenv python=3.12 sphinx sphinx_rtd_theme breathe doxygen numpy
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -228,6 +235,47 @@ make rst # rst only, saves time in case the API did not change
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Pybind and Zeromq
|
||||||
|
|
||||||
|
### Pybind11 for Python
|
||||||
|
**v8.0.0+**:
|
||||||
|
pybind11 is built
|
||||||
|
* by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz)
|
||||||
|
* or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [link].
|
||||||
|
* v9.0.0+: pybind11 (v2.13.0)
|
||||||
|
* v8.x.x : pybind11 (v2.11.0)
|
||||||
|
|
||||||
|
**v7.x.x**:
|
||||||
|
pybind11 packaged into ‘libs/pybind’. No longer a submodule. No need for “recursive” or “submodule update”.
|
||||||
|
|
||||||
|
**Older versions**:
|
||||||
|
pybind11 is a submodule. Must be cloned using “recursive” and updated when switching between versions using the following commands.
|
||||||
|
|
||||||
|
```
|
||||||
|
# Note: Only for v6.x.x versions and older
|
||||||
|
|
||||||
|
# clone using recursive to get pybind11 submodule
|
||||||
|
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||||
|
|
||||||
|
# update submodule when switching between releases
|
||||||
|
cd slsDetectorPackage
|
||||||
|
git submodule update --init
|
||||||
|
```
|
||||||
|
|
||||||
|
### Zeromq
|
||||||
|
**v8.0.0+**:
|
||||||
|
zeromq (v4.3.4) is built
|
||||||
|
* by default from tar file in repo (libs/libzmq/libzmq-4.3.4.tar.gz)
|
||||||
|
* or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [link].
|
||||||
|
|
||||||
|
**v7.x.x and older**:
|
||||||
|
zeromq-devel must be installed and one can hint its location using
|
||||||
|
* cmake option:’-DZeroMQ_HINT=/usr/lib64’ or
|
||||||
|
* option ‘-q’ in cmk.sh script: : ./cmk.sh -cbj5 -q /usr/lib64
|
||||||
|
* ‘zeromq’ dependency added when installing using conda
|
||||||
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
dhanya.thattil@psi.ch
|
dhanya.thattil@psi.ch
|
||||||
erik.frojdh@psi.ch
|
erik.frojdh@psi.ch
|
@ -79,12 +79,13 @@ outputs:
|
|||||||
- {{compiler('cxx')}}
|
- {{compiler('cxx')}}
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
- setuptools
|
- setuptools
|
||||||
- pybind11=2.11
|
- pybind11=2.13
|
||||||
|
|
||||||
host:
|
host:
|
||||||
- python
|
- python
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
- pybind11=2.11
|
- setuptools
|
||||||
|
- pybind11=2.13
|
||||||
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
@ -21,7 +21,7 @@ Python bindings
|
|||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
* Python > 3.6
|
* Python > 3.6
|
||||||
* pybind11 2.11.0 (packaged in libs)
|
* pybind11 2.13.0 (packaged in libs)
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ Instead of the cmake command, one can use ccmake to get a list of options to con
|
|||||||
ccmake ..
|
ccmake ..
|
||||||
|
|
||||||
# choose the options
|
# choose the options
|
||||||
# first press [c] - configure (maybe multiple times till you see [g])
|
# first press [c] - configure (until you see [g])
|
||||||
# then press [g] - generate
|
# then press [g] - generate
|
||||||
|
|
||||||
|
|
||||||
@ -287,11 +287,13 @@ Pybind and Zeromq
|
|||||||
.. _pybind for different slsDetectorPackage versions:
|
.. _pybind for different slsDetectorPackage versions:
|
||||||
|
|
||||||
|
|
||||||
| **Pybind for Python**
|
| **Pybind11 for Python**
|
||||||
| v8.0.0+:
|
| v8.0.0+:
|
||||||
| pybind11 (v2.11.0) is built
|
| pybind11 is built
|
||||||
| * by default from tar file in repo (libs/pybind/v2.11.0.tar.gz)
|
| * by default from tar file in repo (libs/pybind/v2.1x.0.tar.gz)
|
||||||
| * or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [`link <https://github.com/pybind/pybind11>`__].
|
| * or use advanced option SLS_FETCH_PYBIND11_FROM_GITHUB [`link <https://github.com/pybind/pybind11>`__].
|
||||||
|
| * v9.0.0+: pybind11 (v2.13.0)
|
||||||
|
| * v8.x.x : pybind11 (v2.11.0)
|
||||||
|
|
|
|
||||||
| v7.x.x:
|
| v7.x.x:
|
||||||
| pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
| pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||||
|
Binary file not shown.
BIN
libs/pybind11/v2.13.0.tar.gz
Normal file
BIN
libs/pybind11/v2.13.0.tar.gz
Normal file
Binary file not shown.
@ -1,8 +1,6 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
/** API versions */
|
/** API versions */
|
||||||
#define APIRECEIVER "developer 0x241014"
|
|
||||||
#define APILIB "developer 0x241021"
|
|
||||||
#define APICTB "developer 0x241107"
|
#define APICTB "developer 0x241107"
|
||||||
#define APIGOTTHARD "developer 0x241107"
|
#define APIGOTTHARD "developer 0x241107"
|
||||||
#define APIGOTTHARD2 "developer 0x241107"
|
#define APIGOTTHARD2 "developer 0x241107"
|
||||||
@ -10,4 +8,6 @@
|
|||||||
#define APIXILINXCTB "developer 0x241107"
|
#define APIXILINXCTB "developer 0x241107"
|
||||||
#define APIEIGER "developer 0x241107"
|
#define APIEIGER "developer 0x241107"
|
||||||
#define APIJUNGFRAU "developer 0x241120"
|
#define APIJUNGFRAU "developer 0x241120"
|
||||||
#define APIMYTHEN3 "developer 0x241121"
|
#define APIMYTHEN3 "developer 0x241121"
|
||||||
|
#define APILIB "developer 0x241122"
|
||||||
|
#define APIRECEIVER "developer 0x241122"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user