Skip to content

Commit da65d2a

Browse files
committed
pixi: Add pixi.toml
1 parent 7dde109 commit da65d2a

File tree

8 files changed

+8076
-0
lines changed

8 files changed

+8076
-0
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GitHub syntax highlighting
2+
pixi.lock linguist-language=YAML
3+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*~
22
*build*
3+
# pixi environments
4+
.pixi

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ repos:
2121
rev: v0.23.1
2222
hooks:
2323
- id: toml-sort-fix
24+
exclude: pixi.toml
2425
- repo: https://github.com/pre-commit/mirrors-clang-format
2526
rev: v19.1.1
2627
hooks:

pixi.lock

Lines changed: 7943 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
[project]
2+
name = "eigenpy"
3+
version = "3.4.0"
4+
description = "Bindings between Numpy and Eigen using Boost.Python"
5+
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
6+
channels = ["conda-forge"]
7+
license = "BSD-2-Clause"
8+
license-file = "LICENSE"
9+
10+
[build-dependencies]
11+
ccache = ">=4.9.1"
12+
cmake = ">=3.10"
13+
cxx-compiler = ">=1.7.0"
14+
ninja = ">=1.11"
15+
pkg-config = ">=0.29.2"
16+
17+
[dependencies]
18+
boost = ">=1.80.0"
19+
eigen = ">=3.4.0"
20+
numpy = ">=1.22.0"
21+
python = ">=3.9.0"
22+
scipy = ">=1.10.0"
23+
24+
[activation]
25+
scripts = ["scripts/activation.sh"]
26+
27+
[target.win-64.activation]
28+
scripts = ["scripts/activation.bat"]
29+
30+
[tasks]
31+
# We must avoid to set CMAKE_CXX_FLAGS because of WIN32
32+
# https://discourse.cmake.org/t/strictly-appending-to-cmake-lang-flags/6478
33+
configure = { cmd = [
34+
"CXXFLAGS=$EIGENPY_CXX_FLAGS",
35+
"cmake",
36+
"-G",
37+
"Ninja",
38+
"-B",
39+
"build",
40+
"-S",
41+
".",
42+
"-DCMAKE_BUILD_TYPE=$EIGENPY_BUILD_TYPE",
43+
"-DGENERATE_PYTHON_STUBS=$EIGENPY_PYTHON_STUBS",
44+
"-DBUILD_WITH_CHOLMOD_SUPPORT=$EIGENPY_CHOLMOD_SUPPORT",
45+
"-DBUILD_WITH_ACCELERATE_SUPPORT=$EIGENPY_ACCELERATE_SUPPORT",
46+
], env = { EIGENPY_PYTHON_STUBS = "ON", EIGENPY_CHOLMOD_SUPPORT = "OFF", EIGENPY_ACCELERATE_SUPPORT = "OFF", EIGENPY_BUILD_TYPE = "Release" } }
47+
build = { cmd = "cmake --build build --target all", depends_on = ["configure"] }
48+
clean = { cmd = "rm -rf build" }
49+
test = { cmd = "ctest --test-dir build --output-on-failure", depends_on = [
50+
"build",
51+
] }
52+
53+
[feature.lint]
54+
dependencies = { pre-commit = ">=3.6.2" }
55+
tasks = { lint = { cmd = "pre-commit run --all" } }
56+
57+
# Cholmod support
58+
[feature.cholmod]
59+
dependencies = { suitesparse = ">=5" }
60+
activation = { env = { EIGENPY_CHOLMOD_SUPPORT = "ON" } }
61+
62+
# Accelerate only work on Apple ARM platform
63+
[feature.accelerate]
64+
platforms = ["osx-arm64"]
65+
activation = { env = { EIGENPY_ACCELERATE_SUPPORT = "ON" } }
66+
67+
[feature.all]
68+
dependencies = { suitesparse = ">=5" }
69+
activation = { env = { EIGENPY_CHOLMOD_SUPPORT = "ON" } }
70+
71+
[feature.all.target.osx-arm64]
72+
activation = { env = { EIGENPY_ACCELERATE_SUPPORT = "ON" } }
73+
74+
[feature.py312.dependencies]
75+
python = "3.12.*"
76+
77+
[feature.py39.dependencies]
78+
python = "3.9.*"
79+
80+
# Use clang-cl on Windows.
81+
# We must use scripts instead of env to setup CC and CXX
82+
# to avoid cxx-compiler to overwrite them.
83+
[feature.clang-cl]
84+
platforms = ["win-64"]
85+
activation = { scripts = ["scripts/activation_clang_cl.bat"] }
86+
87+
[environments]
88+
default = { features = ["py312"], solve-group = "py312" }
89+
lint = { features = ["lint"], solve-group = "py312" }
90+
cholmod = { features = ["cholmod", "py312"], solve-group = "py312" }
91+
accelerate = { features = ["accelerate", "py312"], solve-group = "py312" }
92+
py39 = { features = ["py39"], solve-group = "py39" }
93+
all = { features = ["all", "py312"], solve-group = "py312" }
94+
all-py39 = { features = ["all", "py39"], solve-group = "py39" }
95+
all-clang-cl = { features = [
96+
"all",
97+
"clang-cl",
98+
"py312",
99+
], solve-group = "py312" }

scripts/activation.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:: Setup ccache
2+
set CMAKE_CXX_COMPILER_LAUNCHER=ccache
3+
4+
:: Create compile_commands.json for language server
5+
set CMAKE_EXPORT_COMPILE_COMMANDS=1
6+
7+
:: Activate color output with Ninja
8+
set CMAKE_COLOR_DIAGNOSTICS=1

scripts/activation.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Remove flags setup from cxx-compiler
2+
unset CFLAGS
3+
unset CPPFLAGS
4+
unset CXXFLAGS
5+
unset DEBUG_CFLAGS
6+
unset DEBUG_CPPFLAGS
7+
unset DEBUG_CXXFLAGS
8+
unset LDFLAGS
9+
10+
# Setup ccache
11+
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
12+
13+
# Create compile_commands.json for language server
14+
export CMAKE_EXPORT_COMPILE_COMMANDS=1
15+
16+
# Activate color output with Ninja
17+
export CMAKE_COLOR_DIAGNOSTICS=1

scripts/activation_clang_cl.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: Setup clang-cl compiler
2+
set CC=clang-cl
3+
set CXX=clang-cl

0 commit comments

Comments
 (0)