From 4425397a2093f3ee53a95e9adfbb82873ae5f0f8 Mon Sep 17 00:00:00 2001 From: Ted Kisner Date: Thu, 28 Sep 2023 00:32:07 -0700 Subject: [PATCH] Add package for qpoint. Fix so3g recipe. --- docs/mkdocs.yml | 2 +- packages_conda.txt | 2 +- packages_local.txt | 3 +- packages_pip.txt | 1 - pkgs/qpoint/LICENSE | 21 +++++++++++++ pkgs/qpoint/build.sh | 6 ++++ pkgs/qpoint/meta.yaml | 57 ++++++++++++++++++++++++++++++++++ pkgs/so3g/meta.yaml | 7 ++++- pkgs/so3g/setup_requires.patch | 15 +++++++-- tools/bootstrap_base.sh | 3 +- 10 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 pkgs/qpoint/LICENSE create mode 100755 pkgs/qpoint/build.sh create mode 100644 pkgs/qpoint/meta.yaml diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 0157f37..eccf374 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -12,5 +12,5 @@ nav: - Installation: install.md - Automated Deployment: automate.md - Developer Notes: dev.md - - Source on GitHub: "https://github.com/simonsobs/soconda" + - Source on GitHub: https://github.com/simonsobs/soconda diff --git a/packages_conda.txt b/packages_conda.txt index ad33e9f..54b3b52 100644 --- a/packages_conda.txt +++ b/packages_conda.txt @@ -70,4 +70,4 @@ ipykernel # https://github.com/conda-forge/pyfftw-feedstock/issues/51 pyfftw==0.12 # Uncomment the next line if building so3g from source -#boost +boost diff --git a/packages_local.txt b/packages_local.txt index c52b269..596fc93 100644 --- a/packages_local.txt +++ b/packages_local.txt @@ -1,3 +1,4 @@ +qpoint pixell libactpol_deps libactpol @@ -9,4 +10,4 @@ toast # comment out line in packages_pip.txt. NOTE: this # requires addressing pysqlite3-wheels and qpoint # dependencies. -#so3g +so3g diff --git a/packages_pip.txt b/packages_pip.txt index 705033d..40d9bbc 100644 --- a/packages_pip.txt +++ b/packages_pip.txt @@ -1,6 +1,5 @@ pysqlite3-wheels quaternionarray -qpoint pysm3 # # Uncomment here if installing wheel, and comment out diff --git a/pkgs/qpoint/LICENSE b/pkgs/qpoint/LICENSE new file mode 100644 index 0000000..ee89006 --- /dev/null +++ b/pkgs/qpoint/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Alexandra Rahlin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pkgs/qpoint/build.sh b/pkgs/qpoint/build.sh new file mode 100755 index 0000000..23b0ac0 --- /dev/null +++ b/pkgs/qpoint/build.sh @@ -0,0 +1,6 @@ + +set -e +set -x + +python -m pip install -vvv --ignore-installed --no-deps --prefix "${PREFIX}" . + diff --git a/pkgs/qpoint/meta.yaml b/pkgs/qpoint/meta.yaml new file mode 100644 index 0000000..f8d2747 --- /dev/null +++ b/pkgs/qpoint/meta.yaml @@ -0,0 +1,57 @@ +{% set version = "1.12.4" %} +{% set sha256 = "d9acae381fbafdc57aac865fe87a009d164d06162c320982876bd000b936d223" %} + +{% set build = 0 %} + +package: + name: qpoint + version: {{ version }} + +source: + url: https://github.com/arahlin/qpoint/archive/{{ version }}.tar.gz + sha256: {{ sha256 }} + +build: + number: {{ build }} + skip: true # [win] + script_env: + - QPOINT_VERSION={{ version }} + +requirements: + build: + - {{ compiler('c') }} + - llvm-openmp # [osx] + - libgomp # [linux] + host: + - llvm-openmp # [osx] + - libgomp # [linux] + - python + - setuptools + - numpy + # Although not a dependency, we put numba here to force + # building with a numba-compatible numpy version + - numba + # Adding astropy as a host dependency will download the current + # IERS data and store it in the package + - astropy + run: + - python + - {{ pin_compatible('numpy') }} + +test: + imports: + - qpoint + +about: + home: https://github.com/arahlin/qpoint + license: MIT + license_family: MIT + license_file: LICENSE + summary: Quaternion library for telescope pointing + description: | + A lightweight quaternion-based library for telescope pointing + dev_url: https://github.com/arahlin/qpoint + +extra: + recipe-maintainers: + - tskisner diff --git a/pkgs/so3g/meta.yaml b/pkgs/so3g/meta.yaml index e380e8d..e7ca157 100644 --- a/pkgs/so3g/meta.yaml +++ b/pkgs/so3g/meta.yaml @@ -40,7 +40,10 @@ requirements: - numpy - scipy - boost + - libboost-devel + - libboost-python-devel - libflac + - qpoint # Although not a dependency, we put numba here to force # building with a numba-compatible numpy version - numba @@ -51,8 +54,10 @@ requirements: - liblapack * *openblas - python - {{ pin_compatible('numpy') }} - - {{ pin_compatible('boost') }} + - {{ pin_compatible('libboost') }} + - {{ pin_compatible('libboost-python') }} - {{ pin_compatible('libflac') }} + - {{ pin_compatible('qpoint') }} - astropy - matplotlib - scipy diff --git a/pkgs/so3g/setup_requires.patch b/pkgs/so3g/setup_requires.patch index e3823fc..d99a703 100644 --- a/pkgs/so3g/setup_requires.patch +++ b/pkgs/so3g/setup_requires.patch @@ -1,6 +1,6 @@ -diff -urN so3g-0.1.6_orig/setup.py so3g-0.1.6/setup.py ---- so3g-0.1.6_orig/setup.py 2023-03-20 11:38:43.000000000 -0700 -+++ so3g-0.1.6/setup.py 2023-06-22 11:38:42.746999553 -0700 +diff -urN so3g-0.1.8_orig/setup.py so3g-0.1.8/setup.py +--- so3g-0.1.8_orig/setup.py 2023-08-17 17:04:38.000000000 -0700 ++++ so3g-0.1.8/setup.py 2023-09-27 22:17:48.413193444 -0700 @@ -371,7 +371,6 @@ conf["url"] = "https://github.com/simonsobs/so3g" conf["version"] = get_version() @@ -9,3 +9,12 @@ diff -urN so3g-0.1.6_orig/setup.py so3g-0.1.6/setup.py conf["install_requires"] = [ "numpy", "astropy", +@@ -381,7 +380,7 @@ + "pytz", + "pyaml", + "sqlalchemy", +- "pysqlite3-wheels", ++ "pysqlite3", + "tqdm", + "qpoint", + ] diff --git a/tools/bootstrap_base.sh b/tools/bootstrap_base.sh index 41c733a..1d290ec 100755 --- a/tools/bootstrap_base.sh +++ b/tools/bootstrap_base.sh @@ -33,7 +33,6 @@ conda deactivate echo "# condarc bootstrapped by soconda" > "${base}/.condarc" echo "channels:" >> "${base}/.condarc" echo " - conda-forge" >> "${base}/.condarc" -echo "changeps1: true" >> "${base}/.condarc" -echo "env_prompt: '({name}) '" >> "${base}/.condarc" +echo "changeps1: false" >> "${base}/.condarc" echo "solver: libmamba" >> "${base}/.condarc"