Skip to content
Snippets Groups Projects
Commit 1f558641 authored by René Fritze's avatar René Fritze Committed by Tobias Leibner
Browse files

also use dynamic version in python module _version

parent d316a785
No related branches found
No related tags found
1 merge request!10Draft: consolidate refactoring work
......@@ -131,6 +131,6 @@ dune_pybindxi_add_module(_tools_adaptation_helper EXCLUDE_FROM_ALL ${header} too
dune_pybindxi_add_module(_tools_dirichlet_constraints EXCLUDE_FROM_ALL ${header} tools/dirichlet-constraints.cc)
dune_pybindxi_add_module(_tools_grid_quality_estimates EXCLUDE_FROM_ALL ${header} tools/grid-quality-estimates.cc)
dune_pybindxi_add_module(_tools_sparsity_pattern EXCLUDE_FROM_ALL ${header} tools/sparsity-pattern.cc)
dune_pybindxi_add_module(_version EXCLUDE_FROM_ALL ${header} version.cc)
configure_file(_version.py.in _version.py)
# dune_pybindxi_add_module(gamm_2019_talk_on_conservative_rb EXCLUDE_FROM_ALL ${header} gamm-2019-talk-on-conservative-
# rb.cc)
# ~~~
# This file is part of the dune-gdt project:
# https://github.com/dune-community/dune-gdt
# Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
# Felix Schindler (2017 - 2018)
# René Fritze (2016, 2018)
# ~~~
__version__ = "${dune-gdt_VERSION}"
// This file is part of the dune-gdt project:
// https://github.com/dune-community/dune-gdt
// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
// with "runtime exception" (http://www.dune-project.org/license.html)
// Authors:
// Felix Schindler (2021)
#include "config.h"
#include <dune/pybindxi/pybind11.h>
// see https://stackoverflow.com/questions/240353/convert-a-preprocessor-token-to-a-string
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
PYBIND11_MODULE(_version, m)
{
m.attr("__version__") = pybind11::str(TOSTRING(DUNE_GDT_VERSION));
}
#undef TOSTRING
#undef STRINGIFY
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment