diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index 0f3f30c..d810aff 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -36,7 +36,7 @@ jobs: - name: create stable or testing package shell: bash run: | - if [ "${{ github.ref }}" = "refs/tags/v1.3.0" ]; then + if [ "${{ github.ref }}" = "refs/tags/v1.3.1" ]; then channel="stable" else channel="testing" @@ -53,4 +53,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 so3/1.3.0 -c --all -r=astro-informatics + run: conan upload so3/1.3.1 -c --all -r=astro-informatics diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7b1c477..420b0b2 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/v1.3.0' }} + if: ${{ github.ref != 'refs/tags/v1.3.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/v1.3.0' }} + if: ${{ github.ref == 'refs/tags/v1.3.1' }} uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 32cf022..a596462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,12 @@ cmake_minimum_required(VERSION 3.12) project( so3 - VERSION "1.3.0" + VERSION "1.3.1" DESCRIPTION "Fast and exact Wigner transforms" HOMEPAGE_URL "http://astro-informatics.github.io/so3/" LANGUAGES C) option(tests "Enable testing" ON) -option(python "Creates python package only" OFF) option(conan_deps "Download ssht using conan" ON) if(NOT WIN32) option(fPIC "Enable position independent code" ON) @@ -33,12 +32,9 @@ if(tests) add_subdirectory(tests) 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 965c9df..b270bc3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [docs-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-url]: http://astro-informatics.github.io/so3/ [bintray-img]: https://img.shields.io/bintray/v/astro-informatics/astro-informatics/so3:astro-informatics?label=C%20package -[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/so3:astro-informatics/1.3.0:stable/link +[bintray-url]: https://bintray.com/astro-informatics/astro-informatics/so3:astro-informatics/1.3.1:stable/link [pypi-img]: https://badge.fury.io/py/so3.svg [pypi-url]: https://badge.fury.io/py/so3 [codefactor-img]: https://www.codefactor.io/repository/github/astro-informatics/so3/badge/main diff --git a/cmake/conan_dependencies.cmake b/cmake/conan_dependencies.cmake index 1760c98..0615a5f 100644 --- a/cmake/conan_dependencies.cmake +++ b/cmake/conan_dependencies.cmake @@ -15,7 +15,7 @@ elseif(NOT CONAN_OPTIONS) list(APPEND CONAN_OPTIONS "ssht:fPIC=False") endif() if(NOT CONAN_DEPS) - set(CONAN_DEPS "ssht/1.3.3@astro-informatics/stable") + set(CONAN_DEPS "ssht/1.3.4@astro-informatics/stable") endif() if(NOT CONAN_BUILD) set(CONAN_BUILD "missing") diff --git a/cmake/python-setup.cmake b/cmake/python-setup.cmake deleted file mode 100644 index 7386400..0000000 --- a/cmake/python-setup.cmake +++ /dev/null @@ -1,29 +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(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE PATH "Path to python executable") - set(CMAKE_FIND_FRAMEWORK "${OLD_CMAKE_FIND_FRAMEWORK}") - unset(OLD_CMAKE_FIND_FRAMEWORK) -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 5853eda..1658be5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,7 +3,7 @@ class So3Conan(ConanFile): name = "so3" - version = "1.3.0" + version = "1.3.1" license = "GPL-3" url = "https://github.com/astro-informatics/so3" homepage = "https://github.com/astro-informatics/so3" @@ -25,7 +25,7 @@ class So3Conan(ConanFile): def requirements(self): location = "astro-informatics/stable" if self.in_local_cache else "user/testing" - self.requires(f"ssht/1.3.3@{location}") + self.requires(f"ssht/1.3.4@{location}") def configure(self): if self.settings.compiler == "Visual Studio": diff --git a/makefile b/makefile index 3088339..f0eb744 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ CC = gcc #OPT = -Wall -O3 -fopenmp -DSO3_VERSION=\"0.1\" -DSO3_BUILD=\"`git rev-parse HEAD`\" -OPT = -Wall -g -fopenmp -DSO3_VERSION=\"1.3.0\" -DSO3_BUILD=\"`git rev-parse HEAD`\" +OPT = -Wall -g -fopenmp -DSO3_VERSION=\"1.3.1\" -DSO3_BUILD=\"`git rev-parse HEAD`\" # ======== LINKS ======== diff --git a/setup.cfg b/setup.cfg index 40fe6f9..8a7f158 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.3.0 +current_version = 1.3.1 commit = False tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(rc(?P\d+))? diff --git a/setup.py b/setup.py index b4351da..c990f52 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,10 @@ from skbuild import setup -cmake_args = [ - "-Dpython:BOOL=ON", - "-Dtests:BOOL=OFF", -] +cmake_args = ["-Dtests:BOOL=OFF"] setup( name="so3", - version="1.3.0", + version="1.3.1", author="Jason McEwen", install_requires=["numpy", "cython", "scipy"], extras_require={ diff --git a/src/c/CMakeLists.txt b/src/c/CMakeLists.txt index 23c46ba..4bf0a12 100644 --- a/src/c/CMakeLists.txt +++ b/src/c/CMakeLists.txt @@ -14,7 +14,7 @@ if(fPIC) set_target_properties(so3 PROPERTIES POSITION_INDEPENDENT_CODE TRUE) endif() -if(NOT python) +if(NOT SKBUILD) install( TARGETS so3 EXPORT So3Targets diff --git a/src/so3/CMakeLists.txt b/src/so3/CMakeLists.txt index 4fd53ae..ebc4879 100644 --- a/src/so3/CMakeLists.txt +++ b/src/so3/CMakeLists.txt @@ -1,8 +1,9 @@ # add command to cythonize results add_cython_target(cython_sources bindings.pyx C PY3) -python3_add_library(bindings MODULE WITH_SOABI ${cython_sources}) -target_link_libraries(bindings PUBLIC so3) +add_library(bindings MODULE ${cython_sources}) +python_extension_module(bindings) +target_link_libraries(bindings so3) target_include_directories(bindings PUBLIC ${NumPy_INCLUDE_DIRS}) if(WIN32) target_compile_definitions(bindings PUBLIC MS_WIN64)