From be019b97695ea22739ba25203c4050fe8d5610be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 30 Oct 2024 10:26:53 +0100 Subject: [PATCH] updated readme --- CMakeLists.txt | 1 + README.md | 48 ++++++++++++++++++++++++++++++++++--------- python/CMakeLists.txt | 2 +- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2013993..fd7c3fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if(AARE_FETCH_ZMQ) # Fetchcontent_Declare is deprecated need to find a way to update this # for now setting the policy to old is enough + if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30") cmake_policy(SET CMP0169 OLD) FetchContent_Declare( libzmq diff --git a/README.md b/README.md index a78e533..3e02199 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,14 @@ Data analysis library for PSI hybrid detectors +## Build and install -## Development install (for Python) +Prerequisites +- cmake >= 3.14 +- C++17 compiler (gcc >= 8) +- python >= 3.10 + +### Development install (for Python) ```bash git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http... @@ -21,18 +27,40 @@ Now you can use the Python module from your build directory ```python import aare - f = aare.File('Some/File/I/Want_to_open_master_0.json') ``` - -## Project structure - -include/aare - public headers +To run form other folders either add the path to your conda environment using conda-build or add it to your PYTHONPATH -## Open questions +### Install using conda/mamba + +```bash +#enable your env first! +conda install aare=2024.10.29.dev0 -c slsdetectorgroup +``` + +### Install to a custom location and use in your project + +Working example in: https://github.com/slsdetectorgroup/aare-examples + +```bash +#build and install aare +git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http... +mkdir build +cd build + +#configure using cmake +cmake ../aare -DCMAKE_INSTALL_PREFIX=/where/to/put/aare + +#build (replace 4 with the number of threads you want to use) +make -j4 + +#install +make install + + +#Now configure your project + cmake .. -DCMAKE_PREFIX_PATH=SOME_PATH +``` -- How many sub libraries? -- Where to place test data? This data is also needed for github actions... -- What to return to numpy? Our NDArray or a numpy ndarray? Lifetime? \ No newline at end of file diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 446860b..a2247f7 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,5 +1,5 @@ -find_package (Python 3.6 COMPONENTS Interpreter Development) +find_package (Python 3.10 COMPONENTS Interpreter Development) # Download or find pybind11 depending on configuration if(AARE_FETCH_PYBIND11)