Skip to content

Commit

Permalink
Merge pull request #38 from astro-informatics/feature/conan-center
Browse files Browse the repository at this point in the history
bintray to conan-center
  • Loading branch information
mdavezac committed Jun 11, 2021
2 parents e0420c0 + bbb4f1c commit 182b7d4
Show file tree
Hide file tree
Showing 21 changed files with 637 additions and 620 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/conan.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Expand Up @@ -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.2' }}
if: ${{ github.ref != 'refs/tags/v2.2.3' }}
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.2' }}
if: ${{ github.ref == 'refs/tags/v2.2.3' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}
54 changes: 26 additions & 28 deletions CMakeLists.txt
@@ -1,59 +1,57 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.12...4.0)

project(
s2let
VERSION "2.2.2"
VERSION "2.2.3"
DESCRIPTION "Fast wavelets on the sphere"
HOMEPAGE_URL "http://astro-informatics.github.io/s2let/"
LANGUAGES C)

option(tests "Enable testing" ON)
option(cfitsio "Links to cfitsio" OFF)
option(fPIC "Compile with fPIC" ON)
option(conan_deps "Download dependencies using conan" OFF)

if(WIN32)
set(fpic OFF)
if(conan_deps AND NOT cfitsio)
message(
WARNING "cfitsio is always included when managing dependencies via conan")
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include("sanitizers")
include(CTest)
if(conan_deps OR CONAN_EDITABLE_MODE)
include("conan_dependencies")
if(NOT CONAN_EDITABLE_MODE)
set(SO3_TARGET CONAN_PKG::so3)
endif()
if(cfitsio)
set(CFITSIO_TARGET CONAN_PKG::cfitsio)
endif()
include("${PROJECT_SOURCE_DIR}/cmake/conan_dependencies.cmake")
endif()
if(NOT conan_deps)
find_package(So3 REQUIRED)
set(SO3_TARGET so3)
if(cfitsio AND NOT CONAN_EDITABLE_MODE)
find_package(CFITSIO REQUIRED)
set(CFITSIO_TARGET cfitsio::cfitsio)
endif()
if(EXISTS "${PROJECT_BINARY_DIR}/conan_paths.cmake")
include("${PROJECT_BINARY_DIR}/conan_paths.cmake")
elseif(EXISTS "${PROJECT_BINARY_DIR}/FindFFTW3.cmake")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_BINARY_DIR}")
else()
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
endif()

find_package(astro-informatics-so3 REQUIRED)
find_library(MATH_LIBRARY m)
if(cfitsio)
find_package(cfitsio REQUIRED)
endif()

add_subdirectory(src/main/c)

if(tests)
enable_testing()
include("fetch_cmocka")
include(CTest)
if(BUILD_TESTING)
include("${PROJECT_SOURCE_DIR}/cmake/fetch_cmocka.cmake")
add_subdirectory(src/test/c)
endif()

if(NOT SKBUILD)
include("exporting")
else()
if(SKBUILD)
find_package(PythonExtensions REQUIRED)
find_package(Cython REQUIRED)
find_package(NumPy REQUIRED)
add_subdirectory(src/main/pys2let)
elseif(NOT CONAN_EXPORTED)
include("${PROJECT_SOURCE_DIR}/cmake/exporting.cmake")
endif()

# only run documentation if this is not a sub-project
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -2,6 +2,7 @@ include CMakeLists.txt
include setup.py setup.cfg pyproject.toml
include COPYRIGHT.txt LICENSE.md README.md
include cmake/*.cmake
include conanfile.txt
recursive-include src/main/c *.c CMakeLists.txt
recursive-include include/s2let *.h
recursive-include src/main/pys2let .py *.pyx *.md CMakeLists.txt
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -2,15 +2,15 @@

[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-informatics?label=C%20package
[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/s2let:astro-informatics/2.2.2:stable/link
[conan-img]: https://img.shields.io/badge/ConanCenter-C%20Package-red.svg
[conan-url]: https://conan.io/center/s2let
[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
[codefactor-url]: https://www.codefactor.io/repository/github/astro-informatics/s2let/overview/main

[![][docs-img]][docs-url]
[![][bintray-img]][bintray-url]
[![][conan-img]][conan-url]
[![][pypi-img]][pypi-url]
![CMake Build](https://github.com/astro-informatics/s2let/workflows/CMake%20Build/badge.svg)
![Python Build](https://github.com/astro-informatics/s2let/workflows/Python%20Build/badge.svg)
Expand Down

0 comments on commit 182b7d4

Please sign in to comment.