From 4f62b1a05ccf24aafd202e2a984d2467afbbd5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=B6jd=20Lars=20Erik?= Date: Wed, 19 Mar 2025 21:49:12 +0100 Subject: [PATCH] separated the recipes --- conda-recipe/build_pylib.sh | 11 -- conda-recipe/conda_build_config.yaml | 16 --- conda-recipe/copy_ctbgui.sh | 11 -- conda-recipe/copy_lib.sh | 23 ---- conda-recipe/meta.yaml | 128 ------------------ conda-recipe/run_test.sh | 3 - .../main-library}/build.sh | 2 +- .../main-library/conda_build_config.yaml | 26 ++++ .../main-library}/copy_gui.sh | 0 conda-recipes/main-library/copy_lib.sh | 23 ++++ .../main-library}/copy_moench.sh | 0 conda-recipes/main-library/meta.yaml | 104 ++++++++++++++ .../python-client/conda_build_config.yaml | 26 ++++ conda-recipes/python-client/meta.yaml | 46 +++++++ pyproject.toml | 2 +- 15 files changed, 227 insertions(+), 194 deletions(-) delete mode 100755 conda-recipe/build_pylib.sh delete mode 100644 conda-recipe/conda_build_config.yaml delete mode 100644 conda-recipe/copy_ctbgui.sh delete mode 100755 conda-recipe/copy_lib.sh delete mode 100755 conda-recipe/meta.yaml delete mode 100755 conda-recipe/run_test.sh rename {conda-recipe => conda-recipes/main-library}/build.sh (96%) create mode 100644 conda-recipes/main-library/conda_build_config.yaml rename {conda-recipe => conda-recipes/main-library}/copy_gui.sh (100%) create mode 100755 conda-recipes/main-library/copy_lib.sh rename {conda-recipe => conda-recipes/main-library}/copy_moench.sh (100%) create mode 100755 conda-recipes/main-library/meta.yaml create mode 100644 conda-recipes/python-client/conda_build_config.yaml create mode 100644 conda-recipes/python-client/meta.yaml diff --git a/conda-recipe/build_pylib.sh b/conda-recipe/build_pylib.sh deleted file mode 100755 index 18b0615ab..000000000 --- a/conda-recipe/build_pylib.sh +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -echo "|<-------- starting python build" - -cd python - -# copy VERSION into slsdet for installation -cp ../VERSION slsdet/VERSION - -${PYTHON} setup.py install diff --git a/conda-recipe/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml deleted file mode 100644 index c953a95ed..000000000 --- a/conda-recipe/conda_build_config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -python: - # - 3.8 - # - 3.9 - # - 3.10 - # - 3.11 - # - 3.12 - - 3.13 - -c_compiler_version: # [unix] - - 11 # [linux] - -cxx_compiler_version: - - 11 # [linux] - -c_stdlib_version: # [linux] - - 2.17 # [linux] \ No newline at end of file diff --git a/conda-recipe/copy_ctbgui.sh b/conda-recipe/copy_ctbgui.sh deleted file mode 100644 index b4f52efce..000000000 --- a/conda-recipe/copy_ctbgui.sh +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package -mkdir $PREFIX/lib -mkdir $PREFIX/bin -mkdir $PREFIX/include - - - -cp build/bin/ctbGui $PREFIX/bin/. -cp build/bin/libctbRootLib.so $PREFIX/lib/. - diff --git a/conda-recipe/copy_lib.sh b/conda-recipe/copy_lib.sh deleted file mode 100755 index 5836146f6..000000000 --- a/conda-recipe/copy_lib.sh +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package - -mkdir -p $PREFIX/lib -mkdir -p $PREFIX/bin -mkdir -p $PREFIX/include/sls -# mkdir $PREFIX/include/slsDetectorPackage - -#Shared and static libraries -cp build/install/lib/* $PREFIX/lib/ - -#Binaries -cp build/install/bin/sls_detector_acquire $PREFIX/bin/. -cp build/install/bin/sls_detector_acquire_zmq $PREFIX/bin/. -cp build/install/bin/sls_detector_get $PREFIX/bin/. -cp build/install/bin/sls_detector_put $PREFIX/bin/. -cp build/install/bin/sls_detector_help $PREFIX/bin/. -cp build/install/bin/slsReceiver $PREFIX/bin/. -cp build/install/bin/slsMultiReceiver $PREFIX/bin/. - - -cp build/install/include/sls/* $PREFIX/include/sls -cp -rv build/install/share $PREFIX diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100755 index a83d42fa2..000000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,128 +0,0 @@ -package: - name: sls_detector_software - version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} - - -source: - path: .. - -build: - number: 0 - binary_relocation: True - rpaths: - - lib/ - -requirements: - build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - cmake - - ninja - - qt 5.* - - xorg-libx11 - - xorg-libice - - xorg-libxext - - xorg-libsm - - xorg-libxau - - xorg-libxrender - - xorg-libxfixes - - {{ cdt('mesa-libgl-devel') }} # [linux] - - {{ cdt('mesa-libegl-devel') }} # [linux] - - {{ cdt('mesa-dri-drivers') }} # [linux] - - {{ cdt('libselinux') }} # [linux] - - {{ cdt('libxdamage') }} # [linux] - - {{ cdt('libxxf86vm') }} # [linux] - - expat - - host: - # - libstdcxx-ng - # - libgcc-ng - - xorg-libx11 - - xorg-libice - - xorg-libxext - - xorg-libsm - - xorg-libxau - - xorg-libxrender - - xorg-libxfixes - - expat - - libtiff - - libpng - - run: - # - libstdcxx-ng - # - libgcc-ng - - -outputs: - - name: slsdetlib - script: copy_lib.sh - - requirements: - build: - - {{ compiler('c') }} - - {{compiler('cxx')}} - # - libstdcxx-ng - # - libgcc-ng - - run: - # - libstdcxx-ng - # - libgcc-ng - - # - name: slsdet - # script: build_pylib.sh - - # requirements: - # build: - # - python - # - {{ compiler('c') }} - # - {{compiler('cxx')}} - # - {{ pin_subpackage('slsdetlib', exact=True) }} - # - setuptools - # - pybind11=2.13 - - # host: - # - python - # - {{ pin_subpackage('slsdetlib', exact=True) }} - # - setuptools - # - pybind11=2.13 - - - # run: - # - libstdcxx-ng - # - libgcc-ng - # - python - # - numpy - # - {{ pin_subpackage('slsdetlib', exact=True) }} - - # test: - # imports: - # - slsdet - - - # - name: slsdetgui - # script: copy_gui.sh - # requirements: - - # build: - # - {{ compiler('c') }} - # - {{compiler('cxx')}} - # - {{ pin_subpackage('slsdetlib', exact=True) }} - - # run: - # - {{ pin_subpackage('slsdetlib', exact=True) }} - # - qt 5.* - # - expat - - # - name: moenchzmq - # script: copy_moench.sh - # requirements: - - # build: - # - {{ compiler('c') }} - # - {{compiler('cxx')}} - # - {{ pin_subpackage('slsdetlib', exact=True) }} - - - # run: - # - {{ pin_subpackage('slsdetlib', exact=True) }} - # - expat \ No newline at end of file diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh deleted file mode 100755 index 24068d625..000000000 --- a/conda-recipe/run_test.sh +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other -# Copyright (C) 2021 Contributors to the SLS Detector Package -ctest -j2 \ No newline at end of file diff --git a/conda-recipe/build.sh b/conda-recipes/main-library/build.sh similarity index 96% rename from conda-recipe/build.sh rename to conda-recipes/main-library/build.sh index 5c3995d91..f2505361a 100755 --- a/conda-recipe/build.sh +++ b/conda-recipes/main-library/build.sh @@ -13,7 +13,7 @@ cmake .. -G Ninja \ -DCMAKE_INSTALL_PREFIX=install \ -DSLS_USE_TEXTCLIENT=ON \ -DSLS_USE_RECEIVER=ON \ - -DSLS_USE_GUI=OFF \ + -DSLS_USE_GUI=ON \ -DSLS_USE_MOENCH=ON\ -DSLS_USE_TESTS=ON \ -DSLS_USE_PYTHON=OFF \ diff --git a/conda-recipes/main-library/conda_build_config.yaml b/conda-recipes/main-library/conda_build_config.yaml new file mode 100644 index 000000000..46fa5230e --- /dev/null +++ b/conda-recipes/main-library/conda_build_config.yaml @@ -0,0 +1,26 @@ +python: + # - 3.8 + # - 3.9 + # - 3.10 + # - 3.11 + # - 3.12 + - 3.13 + +c_compiler: + - gcc # [linux] + +c_compiler_version: + - 13 # [linux] + +c_stdlib: + - sysroot # [linux] + +cxx_compiler: + - gxx # [linux] + + +cxx_compiler_version: + - 13 # [linux] + +c_stdlib_version: # [linux] + - 2.17 # [linux] \ No newline at end of file diff --git a/conda-recipe/copy_gui.sh b/conda-recipes/main-library/copy_gui.sh similarity index 100% rename from conda-recipe/copy_gui.sh rename to conda-recipes/main-library/copy_gui.sh diff --git a/conda-recipes/main-library/copy_lib.sh b/conda-recipes/main-library/copy_lib.sh new file mode 100755 index 000000000..ad5de9f47 --- /dev/null +++ b/conda-recipes/main-library/copy_lib.sh @@ -0,0 +1,23 @@ +# # SPDX-License-Identifier: LGPL-3.0-or-other +# # Copyright (C) 2021 Contributors to the SLS Detector Package + +# mkdir -p $PREFIX/lib +# mkdir -p $PREFIX/bin +# mkdir -p $PREFIX/include/sls +# # mkdir $PREFIX/include/slsDetectorPackage + +# #Shared and static libraries +# cp build/install/lib/* $PREFIX/lib/ + +# #Binaries +# cp build/install/bin/sls_detector_acquire $PREFIX/bin/. +# cp build/install/bin/sls_detector_acquire_zmq $PREFIX/bin/. +# cp build/install/bin/sls_detector_get $PREFIX/bin/. +# cp build/install/bin/sls_detector_put $PREFIX/bin/. +# cp build/install/bin/sls_detector_help $PREFIX/bin/. +# cp build/install/bin/slsReceiver $PREFIX/bin/. +# cp build/install/bin/slsMultiReceiver $PREFIX/bin/. + + +# cp build/install/include/sls/* $PREFIX/include/sls +# cp -rv build/install/share $PREFIX diff --git a/conda-recipe/copy_moench.sh b/conda-recipes/main-library/copy_moench.sh similarity index 100% rename from conda-recipe/copy_moench.sh rename to conda-recipes/main-library/copy_moench.sh diff --git a/conda-recipes/main-library/meta.yaml b/conda-recipes/main-library/meta.yaml new file mode 100755 index 000000000..762ce7d9f --- /dev/null +++ b/conda-recipes/main-library/meta.yaml @@ -0,0 +1,104 @@ +package: + name: sls_detector_software + version: 2025.3.19 + + +source: + path: ../.. + +build: + number: 0 + binary_relocation: True + rpaths: + - lib/ + +requirements: + build: + - {{ compiler('c') }} + - {{ stdlib("c") }} + - {{ compiler('cxx') }} + + - cmake + - ninja + - qt 5.* + # - xorg-libx11 + # - xorg-libice + # - xorg-libxext + # - xorg-libsm + # - xorg-libxau + # - xorg-libxrender + # - xorg-libxfixes + # - {{ cdt('mesa-libgl-devel') }} # [linux] + # - {{ cdt('mesa-libegl-devel') }} # [linux] + # - {{ cdt('mesa-dri-drivers') }} # [linux] + # - {{ cdt('libselinux') }} # [linux] + # - {{ cdt('libxdamage') }} # [linux] + # - {{ cdt('libxxf86vm') }} # [linux] + # - expat + + host: + - libstdcxx-ng + - libgcc-ng + - libgl-devel # [linux] + # - xorg-libx11 + # - xorg-libice + # - xorg-libxext + # - xorg-libsm + # - xorg-libxau + # - xorg-libxrender + # - xorg-libxfixes + # - expat + - libtiff + # - libpng + + run: + # - libstdcxx-ng + # - libgcc-ng + + +outputs: + - name: slsdetlib + script: copy_lib.sh + + requirements: + build: + - {{ compiler('c') }} + - {{ stdlib("c") }} + - {{ compiler('cxx') }} + # - libstdcxx-ng + # - libgcc-ng + + run: + # - libstdcxx-ng + # - libgcc-ng + + + + + - name: slsdetgui + script: copy_gui.sh + requirements: + + build: + - {{ compiler('c') }} + - {{compiler('cxx')}} + - {{ pin_subpackage('slsdetlib', exact=True) }} + + run: + - {{ pin_subpackage('slsdetlib', exact=True) }} + - qt 5.* + - expat + + - name: moenchzmq + script: copy_moench.sh + requirements: + + build: + - {{ compiler('c') }} + - {{compiler('cxx')}} + - {{ pin_subpackage('slsdetlib', exact=True) }} + + + run: + - {{ pin_subpackage('slsdetlib', exact=True) }} + - expat \ No newline at end of file diff --git a/conda-recipes/python-client/conda_build_config.yaml b/conda-recipes/python-client/conda_build_config.yaml new file mode 100644 index 000000000..46fa5230e --- /dev/null +++ b/conda-recipes/python-client/conda_build_config.yaml @@ -0,0 +1,26 @@ +python: + # - 3.8 + # - 3.9 + # - 3.10 + # - 3.11 + # - 3.12 + - 3.13 + +c_compiler: + - gcc # [linux] + +c_compiler_version: + - 13 # [linux] + +c_stdlib: + - sysroot # [linux] + +cxx_compiler: + - gxx # [linux] + + +cxx_compiler_version: + - 13 # [linux] + +c_stdlib_version: # [linux] + - 2.17 # [linux] \ No newline at end of file diff --git a/conda-recipes/python-client/meta.yaml b/conda-recipes/python-client/meta.yaml new file mode 100644 index 000000000..9add4b13b --- /dev/null +++ b/conda-recipes/python-client/meta.yaml @@ -0,0 +1,46 @@ +package: + name: slsdet + version: 2025.2.18 #TODO! how to not duplicate this? + +source: + path: ../.. + +build: + number: 0 + script: + - unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv # [not win] + - {{ PYTHON }} -m pip install . -vv # [win] + +requirements: + build: + - python {{python}} + - {{ compiler('c') }} + - {{ stdlib("c") }} + - {{ compiler('cxx') }} + + + host: + - cmake + - ninja + - python {{python}} + - pip + - scikit-build-core + - pybind11 >=2.13.0 + - fmt + - zeromq + - nlohmann_json + - catch2 + + run: + - python {{python}} + - numpy + + +test: + imports: + - slsdet + + +about: + summary: An example project built with pybind11 and scikit-build. + # license_file: LICENSE \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index df5a2a852..35709dae1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build" [project] name = "slsdet" -version = "2025.2.18" +version = "2025.3.19" [tool.scikit-build]