-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manager project version and determine wheel name in advance
Changes in setup.py bring support for new variables: - If `TOPOLOGIC_VERSION` is provided as an environment variable, then Python package and the dependency TopologicCore will obtain provided version number, e.g. `5.0.0`. - If `TOPOLOGIC_OUTPUT_ID` is provided as an environment variable (with alphanumeric value), then `setup.py` will create the file by name {TOPOLOGIC_OUTPUT_ID}.log where a line like `WHEEL_NAME=topologic_core-5.0.0-cp312-cp312-linux_x86_64.whl` appears. This way build recipes may get the real wheel name the line. - Cmake supports `BUILD_VERSION` variable. For example, this can be passed `-DBUILD_VERSION=5.0.0`. As a result, `TopologicCore/CMakeLists.txt` will get defined version. Also, `TopologicCore/src/About.cpp` will get the defined version (thanks to new `TopologicCore/TopologicConfig.h.in`).
- Loading branch information
1 parent
8808d64
commit bb63698
Showing
6 changed files
with
68 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#define PROJECT_NAME "@PROJECT_NAME@" | ||
#define PROJECT_VERSION "@PROJECT_VERSION@" | ||
#define MAJOR_VERSION @PROJECT_VERSION_MAJOR@ | ||
#define MINOR_VERSION @PROJECT_VERSION_MINOR@ | ||
#define BUGFIX_VERSION @PROJECT_VERSION_PATCH@ | ||
#define INTERNAL_BUILD_VERSION_ @PROJECT_VERSION_TWEAK@ | ||
|
||
#if ~(~INTERNAL_BUILD_VERSION_ + 0) == 0 && ~(~INTERNAL_BUILD_VERSION_ + 1) == 1 | ||
// INTERNAL_BUILD_VERSION_ is defined, but its value is "empty". | ||
# define INTERNAL_BUILD_VERSION 0 | ||
#else | ||
# define INTERNAL_BUILD_VERSION INTERNAL_BUILD_VERSION_ | ||
#endif | ||
#undef INTERNAL_BUILD_VERSION_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters