From 0ebe93323186e1ccb885c39063f7ec41b0bf99b1 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac <2745737+mdavezac@users.noreply.github.com> Date: Wed, 25 Nov 2020 22:17:09 +0000 Subject: [PATCH] Shield url and images (#34) * Shield url and images * Using skbuild setup because CMake no work on macos * Update conan dependencies * Bump to 2.2.1 --- .github/workflows/conan.yml | 4 ++-- .github/workflows/python.yml | 4 ++-- CMakeLists.txt | 8 ++------ README.md | 4 ++-- cmake/conan_dependencies.cmake | 4 ++-- cmake/python-setup.cmake | 30 ------------------------------ conanfile.py | 6 +++--- docs/index.html | 4 ++-- makefile | 2 +- setup.cfg | 6 +++++- setup.py | 3 +-- src/doxygen.config | 2 +- src/main/c/CMakeLists.txt | 2 +- src/main/pys2let/CMakeLists.txt | 5 +++-- 14 files changed, 27 insertions(+), 57 deletions(-) delete mode 100644 cmake/python-setup.cmake diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index c459815f..a5426166 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -37,7 +37,7 @@ jobs: - name: create package with fpic=${{matrix.fpic}} cfitsio=${{matrix.cfitsio}} shell: bash run: | - if [ "${{ github.ref }}" = "refs/tags/v2.2.0" ]; then + if [ "${{ github.ref }}" = "refs/tags/v2.2.1" ]; then channel="stable" else channel="testing" @@ -55,4 +55,4 @@ jobs: CONAN_PASSWORD: ${{secrets.BINTRAY_TOKEN}} CONAN_LOGIN_USERNAME: astroinformaticsci CONAN_REMOTE_URL: https://api.bintray.com/conan/astro-informatics/astro-informatics - run: conan upload s2let/2.2.0 -c --all -r=astro-informatics + run: conan upload s2let/2.2.1 -c --all -r=astro-informatics diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 54195f29..7e225274 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -119,14 +119,14 @@ jobs: mv source-distribution/*.tar.gz wheel-*/*.whl dist - name: Publish distribution 📦 to Test PyPI - if: ${{ github.ref != 'refs/tags/v2.2.0' }} + if: ${{ github.ref != 'refs/tags/v2.2.1' }} uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.TEST_PYPI_TOKEN }} repository_url: https://test.pypi.org/legacy/ - name: Publish distribution 📦 to PyPI - if: ${{ github.ref == 'refs/tags/v2.2.0' }} + if: ${{ github.ref == 'refs/tags/v2.2.1' }} uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 87cc5a53..3bd30f09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.12) project( s2let - VERSION "2.2.0" + VERSION "2.2.1" DESCRIPTION "Fast wavelets on the sphere" HOMEPAGE_URL "http://astro-informatics.github.io/s2let/" LANGUAGES C) option(tests "Enable testing" ON) -option(python "Creates python package only" OFF) option(cfitsio "Links to cfitsio" OFF) option(fPIC "Compile with fPIC" ON) option(conan_deps "Download dependencies using conan" OFF) @@ -48,12 +47,9 @@ if(tests) add_subdirectory(src/test/c) endif() -if(NOT python) +if(NOT SKBUILD) include("exporting") else() - include("python-setup") - find_python() - setup_skbuild() find_package(PythonExtensions REQUIRED) find_package(Cython REQUIRED) find_package(NumPy REQUIRED) diff --git a/README.md b/README.md index 782f9c93..3bf9e3f8 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [docs-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-url]: https://astro-informatics.github.io/s2let/ -[bintray-img]: https://img.shields.io/bintray/v/astro-informatics/astro-informatics/s2let:astro-informactics?label=C%20package -[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.0:stable/link +[bintray-img]: https://img.shields.io/bintray/v/astro-informatics/astro-informatics/s2let:astro-informatics?label=C%20package +[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.1:stable/link [pypi-img]: https://badge.fury.io/py/pys2let.svg [pypi-url]: https://badge.fury.io/py/pys2let [codefactor-img]: https://www.codefactor.io/repository/github/astro-informatics/s2let/badge/main diff --git a/cmake/conan_dependencies.cmake b/cmake/conan_dependencies.cmake index 7119b64f..56182fce 100644 --- a/cmake/conan_dependencies.cmake +++ b/cmake/conan_dependencies.cmake @@ -14,12 +14,12 @@ elseif(NOT CONAN_OPTIONS) endif() if(NOT CONAN_EDITABLE_MODE) if(NOT CONAN_DEPS) - set(CONAN_DEPS "so3/1.3.0@astro-informatics/stable") + set(CONAN_DEPS "so3/1.3.1@astro-informatics/stable") endif() list(APPEND CONAN_OPTIONS "so3:fPIC=${fpic_value}") endif() if(cfitsio) - list(APPEND CONAN_DEPS "cfitsio/3.480") + list(APPEND CONAN_DEPS "cfitsio/3.490") list(APPEND CONAN_OPTIONS "cfitsio:shared=False" "cfitsio:fPIC=${fpic_value}") endif() if(NOT CONAN_BUILD) diff --git a/cmake/python-setup.cmake b/cmake/python-setup.cmake deleted file mode 100644 index ed7140d9..00000000 --- a/cmake/python-setup.cmake +++ /dev/null @@ -1,30 +0,0 @@ -macro(find_python) - set(OLD_CMAKE_FIND_FRAMEWORK "${CMAKE_FIND_FRAMEWORK}") - set(CMAKE_FIND_FRAMEWORK LAST) - find_package(Python3 REQUIRED COMPONENTS Development Interpreter) - set(CMAKE_FIND_FRAMEWORK "${OLD_CMAKE_FIND_FRAMEWORK}") - unset(OLD_CMAKE_FIND_FRAMEWORK) - - set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE PATH "Path to python executable") -endmacro() - -function(setup_skbuild) - if(SKBUILD) - return() - endif() - execute_process( - COMMAND ${Python3_EXECUTABLE} -c "import skbuild; print(skbuild.__file__)" - OUTPUT_VARIABLE SKBUILD_LOCATION - RESULT_VARIABLE SKBUILD_FOUND - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT SKBUILD_FOUND EQUAL 0 OR NOT SKBUILD_LOCATION) - message(FATAL_ERROR "Could not find scikit-build") - else() - set(SKBUILD_FOUND True) - get_filename_component(SKBUILD_LOCATION "${SKBUILD_LOCATION}" DIRECTORY) - endif() - message(STATUS "Found skbuild at ${SKBUILD_LOCATION}") - list(APPEND CMAKE_MODULE_PATH "${SKBUILD_LOCATION}/resources/cmake") - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) -endfunction() diff --git a/conanfile.py b/conanfile.py index 3e09a455..31d3be45 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,7 +3,7 @@ class S2letConan(ConanFile): name = "s2let" - version = "2.2.0" + version = "2.2.1" license = "GPL-2.0" url = "https://github.com/astro-informatics/s2let" homepage = "https://github.com/astro-informatics/s2let" @@ -32,9 +32,9 @@ def configure(self): def requirements(self): location = "astro-informatics/stable" if self.in_local_cache else "user/testing" - self.requires(f"so3/1.3.0@{location}") + self.requires(f"so3/1.3.1@{location}") if self.options.with_cfitsio: - self.requires("cfitsio/3.480") + self.requires("cfitsio/3.490") @property def cmake(self): diff --git a/docs/index.html b/docs/index.html index 33c23ade..3c772ece 100644 --- a/docs/index.html +++ b/docs/index.html @@ -88,8 +88,8 @@