Skip to content

Commit f8c0329

Browse files
authored
Merge pull request #515 from jorisv/topic/new_version_task
Add a task to easily release a new EigenPy version
2 parents 6121606 + c3060d6 commit f8c0329

12 files changed

+425
-178
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*~
2-
*build*
2+
*build*/
33
# pixi environments
44
.pixi

README.md

+5-20
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ EigenPy — Versatile and efficient Python bindings between Numpy and Eigen
2929

3030
The installation of **EigenPy** on your computer is made easy for Linux/BSD, Mac OS X, and Windows environments.
3131

32-
### The Conda approach
32+
### Conda
3333

3434
You simply need this simple line:
3535
```bash
@@ -41,6 +41,7 @@ conda install eigenpy -c conda-forge
4141
You can easily install **EigenPy** from binaries.
4242

4343
#### Add robotpkg apt repository
44+
4445
1. Add robotpkg as source repository to apt:
4546
```
4647
sudo sh -c "echo 'deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg' >> /etc/apt/sources.list.d/robotpkg.list"
@@ -55,6 +56,7 @@ sudo apt-get update
5556
```
5657

5758
#### Install EigenPy
59+
5860
4. The installation of **EigenPy** and its dependencies is made through the line:
5961

6062
```bash
@@ -75,26 +77,9 @@ and then install **EigenPy** for Python 3.x with:
7577
brew install eigenpy
7678
```
7779

78-
## Contributing
79-
80-
Standard matrix decomposion routines of Eigen such as the SVD and QR decompositions can be readily added to **EigenPy** following the example of the Cholesky decomposition that is already implemented. Feel free to open a PR if you wrap them for your use case.
81-
82-
## Build/install from source with Pixi
83-
84-
To build **EigenPy** from source the easiest way is to use [Pixi](https://pixi.sh/latest/#installation).
85-
86-
[Pixi](https://pixi.sh/latest/) is a cross-platform package management tool for developers that
87-
will install all required dependencies in `.pixi` directory.
88-
It's used by our CI agent so you have the guarantee to get the right dependencies.
89-
90-
Run the following command to install dependencies, configure, build and test the project:
91-
92-
```bash
93-
pixi run test
94-
```
80+
## Build
9581

96-
The project will be built in the `build` directory.
97-
You can run `pixi shell` and build the project with `cmake` and `ninja` manually.
82+
Build instruction can be found [here](./development/build.md)
9883

9984
## Credits
10085

cmake

Submodule cmake updated 89 files

development/build.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Build and install from source with Pixi
2+
3+
To build **EigenPy** from source the easiest way is to use [Pixi](https://pixi.sh/latest/#installation).
4+
5+
[Pixi](https://pixi.sh/latest/) is a cross-platform package management tool for developers that
6+
will install all required dependencies in `.pixi` directory.
7+
It's used by our CI agent so you have the guarantee to get the right dependencies.
8+
9+
Run the following command to install dependencies, configure, build and test the project:
10+
11+
```bash
12+
pixi run test
13+
```
14+
15+
The project will be built in the `build` directory.
16+
You can run `pixi shell` and build the project with `cmake` and `ninja` manually.
17+

development/contributing.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing
2+
3+
Standard matrix decomposion routines of Eigen such as the SVD and QR decompositions
4+
can be readily added to **EigenPy** following the example of the Cholesky decomposition
5+
that is already implemented.
6+
Feel free to open a PR if you wrap them for your use case.
7+

development/release.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Release with Pixi
2+
3+
To create a release with Pixi run the following commands on the **devel** branch:
4+
5+
```bash
6+
EIGENPY_VERSION=X.Y.Z pixi run release_new_version
7+
git push origin
8+
git push origin vX.Y.Z
9+
git push origin devel:master
10+
```
11+
12+
Where `X.Y.Z` is the new version.
13+
Be careful to follow the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) rules.
14+
15+
You will find the following assets:
16+
- `./build_new_version/eigenpy-X.Y.Z.tar.gz`
17+
- `./build_new_version/eigenpy-X.Y.Z.tar.gz.sig`
18+
19+
Then, create a new release on [GitHub](https://github.com/stack-of-tasks/eigenpy/releases/new) with:
20+
21+
* Tag: vX.Y.Z
22+
* Title: EigenPy X.Y.Z
23+
* Body:
24+
```
25+
## What's Changed
26+
27+
CHANGELOG CONTENT
28+
29+
**Full Changelog**: https://github.com/stack-of-tasks/eigenpy/compare/vXX.YY.ZZ...vX.Y.Z
30+
```
31+
32+
Where `XX.YY.ZZ` is the last release version.
33+
34+
Then upload `eigenpy-X.Y.Z.tar.gz` and `eigenpy-X.Y.Z.tar.gz.sig` and publish the release.
File renamed without changes.
File renamed without changes.

pixi.lock

+326-152
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

+34-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ python = ">=3.9.0"
2424
scipy = ">=1.10.0"
2525

2626
[activation]
27-
scripts = ["build_scripts/pixi/activation.sh"]
27+
scripts = ["development/scripts//pixi/activation.sh"]
2828

2929
[target.win-64.activation]
30-
scripts = ["build_scripts/pixi/activation.bat"]
30+
scripts = ["development/scripts//pixi/activation.bat"]
3131

3232
[tasks]
3333
# We must avoid to set CMAKE_CXX_FLAGS because of WIN32
@@ -57,6 +57,30 @@ test = { cmd = "ctest --test-dir build --output-on-failure", depends_on = [
5757
dependencies = { pre-commit = ">=3.6.2" }
5858
tasks = { lint = { cmd = "pre-commit run --all" } }
5959

60+
# Increment the version number with EIGENPY_VERSION variable
61+
[feature.new-version.dependencies]
62+
tomlkit = ">=0.13.2"
63+
64+
[feature.new-version.tasks]
65+
configure_new_version = { cmd = [
66+
"CXXFLAGS=$EIGENPY_CXX_FLAGS",
67+
"cmake",
68+
"-G",
69+
"Ninja",
70+
"-B",
71+
"build_new_version",
72+
"-S",
73+
".",
74+
"-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX",
75+
"-DCMAKE_BUILD_TYPE=$EIGENPY_BUILD_TYPE",
76+
"-DGENERATE_PYTHON_STUBS=ON",
77+
"-DBUILD_WITH_CHOLMOD_SUPPORT=ON",
78+
"-DBUILD_WITH_ACCELERATE_SUPPORT=OFF",
79+
] }
80+
release_new_version = { cmd = "VERSION=$EIGENPY_VERSION cmake --build build_new_version --target release", depends-on = [
81+
"configure_new_version",
82+
] }
83+
6084
# Cholmod support
6185
[feature.cholmod]
6286
dependencies = { suitesparse = ">=5" }
@@ -78,14 +102,14 @@ python = "3.9.*"
78102
# to avoid cxx-compiler to overwrite them.
79103
[feature.clang-cl]
80104
platforms = ["win-64"]
81-
activation = { scripts = ["build_scripts/pixi/activation_clang_cl.bat"] }
105+
activation = { scripts = ["development/scripts//pixi/activation_clang_cl.bat"] }
82106

83107
# Use clang on GNU/Linux.
84108
# We must use scripts instead of env to setup CC and CXX
85109
# to avoid cxx-compiler to overwrite them.
86110
[feature.clang]
87111
platforms = ["linux-64"]
88-
activation = { scripts = ["build_scripts/pixi/activation_clang.sh"] }
112+
activation = { scripts = ["development/scripts//pixi/activation_clang.sh"] }
89113
dependencies = { clangxx = "*" }
90114

91115
[environments]
@@ -103,3 +127,9 @@ all-clang-cl = { features = [
103127
"clang-cl",
104128
"py312",
105129
], solve-group = "py312" }
130+
# Release a new software version
131+
new-version = { features = [
132+
"new-version",
133+
"cholmod",
134+
"py312",
135+
], solve-group = "py312" }

0 commit comments

Comments
 (0)