Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compilation of manifpy on Linux and macOS #4

Merged
merged 19 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,28 @@ cxx_compiler_version:
- '9'
docker_image:
- quay.io/condaforge/linux-anvil-comp7
numpy:
- '1.17'
- '1.17'
- '1.17'
- '1.19'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
pybind11_abi:
- '4'
python:
- 3.6.* *_cpython
- 3.7.* *_cpython
- 3.8.* *_cpython
- 3.9.* *_cpython
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - cdt_name
- docker_image
- - python
- numpy
18 changes: 18 additions & 0 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,26 @@ cxx_compiler_version:
- '11'
macos_machine:
- x86_64-apple-darwin13.4.0
numpy:
- '1.17'
- '1.17'
- '1.17'
- '1.19'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
pybind11_abi:
- '4'
python:
- 3.6.* *_cpython
- 3.7.* *_cpython
- 3.8.* *_cpython
- 3.9.* *_cpython
target_platform:
- osx-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - python
- numpy
25 changes: 13 additions & 12 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion recipe/bld.bat → recipe/bld_cxx.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake ^
-G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_TESTING=ON ^
-DBUILD_TESTING=OFF ^
-DBUILD_EXAMPLES=ON ^
%SRC_DIR%
if errorlevel 1 exit 1
Expand Down
2 changes: 2 additions & 0 deletions recipe/bld_py.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python -m pip install . -vv
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion recipe/build.sh → recipe/build_cxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_TESTING=ON \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=ON

cmake --build . --config Release
Expand Down
3 changes: 3 additions & 0 deletions recipe/build_py.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

python -m pip install . -vv
68 changes: 50 additions & 18 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set name = "manif" %}
{% set name = "manif-split" %}
{% set version = "0.0.4" %}

package:
Expand All @@ -10,30 +10,62 @@ source:
sha256: 739731e1eb83194c4977fa946ee63ba1aa8aadf757d67f3b183f2dfab64eff81

build:
number: 0
number: 1

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make # [not win]
- cmake
host:
- eigen
outputs:
- name: manif
script: build_cxx.sh # [unix]
script: bld_cxx.bat # [win]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make # [not win]
- cmake
host:
- eigen
- gtest
- gmock
test:
commands:
- test -f ${PREFIX}/include/manif/manif.h # [not win]
- test -f ${PREFIX}/share/manif/cmake/manifConfig.cmake # [not win]
- if not exist %PREFIX%\\Library\\include\\manif\\manif.h exit 1 # [win]
- if not exist %PREFIX%\\Library\\share\\manif\\cmake\\manifConfig.cmake exit 1 # [win]


test:
commands:
- test -f ${PREFIX}/include/manif/manif.h # [not win]
- test -f ${PREFIX}/share/manif/cmake/manifConfig.cmake # [not win]
- if exist %PREFIX%\\Library\\include\\manif\\manif.h (exit 0) else (exit 1) # [win]
- if exist %PREFIX%\\Library\\share\\manif\\cmake\\manifConfig.cmake (exit 0) else (exit 1) # [win]
- name: manifpy
script: build_py.sh # [unix]
script: bld_py.bat # [win]
build:
skip: True # [win]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make # [not win]
- cmake
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy # [build_platform != target_platform]
host:
- eigen
- python
- pip
- numpy
- pybind11
- pybind11-abi
run:
- python
- {{ pin_compatible('numpy') }}
test:
imports:
- manifpy

about:
home: https://github.com/artivis/manif
license: MIT
license_file: LICENSE
summary: A small C++11 header-only library for Lie theory.
summary: A small C++11 header-only library (with Python bindings) for Lie theory.

extra:
recipe-maintainers:
Expand Down