8#ifndef PYEXPORTVERSION_H_INCLUDED
9#define PYEXPORTVERSION_H_INCLUDED
11#include <boost/python/docstring_options.hpp>
12#include <boost/python/args.hpp>
14#include "boost/python.hpp"
20BOOST_PYTHON_FUNCTION_OVERLOADS(getchangelog_overloads,
Version::FMTVersion::getChangelog, 0, 1)
24 namespace bp = boost::python;
25 bp::object SpatialModule(bp::handle<>(bp::borrowed(PyImport_AddModule(
"FMT.Version"))));
26 bp::scope().attr(
"Version") = SpatialModule;
27 bp::scope Spatial_scope = SpatialModule;
28 bp::scope().attr(
"__doc__") =
".. module:: Version\n"
30 " :platform: Unix, Windows\n"
31 " :synopsis: Version module.\n"
35 boost::python::class_<Version::FMTVersion>(
"FMTversion",
"@DocString(FMTVersion)")
37 "@DocString(FMTVersion::getmajor)").staticmethod(
"getmajor")
39 "@DocString(FMTVersion::getminor)").staticmethod(
"getminor")
41 "@DocString(FMTVersion::getpatch)").staticmethod(
"getpatch")
43 "@DocString(FMTVersion::getversion)").staticmethod(
"getversion")
45 "@DocString(FMTVersion::isatleast)").staticmethod(
"isatleast")
47 "@DocString(FMTVersion::hasfeature)").staticmethod(
"hasfeature")
49 getlicense_overloads(bp::args(
"french"),
"@DocString(FMTVersion::getlicense)")).staticmethod(
"getlicense")
51 getchangelog_overloads(bp::args(
"french"),
"@DocString(FMTVersion::getchangelog)")).staticmethod(
"getchangelog");
static int getMajor()
Return the major version of FMT.
static std::string getChangelog(bool french=false)
Return the changelog as a string.
static std::string getVersion()
Return the version string of FMT (Major.Minor.Patch).
static std::string getLicense(bool french=false)
Return the license as a string.
static int getMinor()
Return the minor version of FMT.
static bool hasFeature(const std::string &name)
Test if the FMT version has the named feature (GDAL, OSI, MOSEK, PYTHON, R).
static int getPatch()
Return the patch version of FMT.
static bool isAtLeast(int major, int minor, int patch)
Test if the FMT version is at least the given major, minor and patch.
Definition: PYdefinitions.h:14
void exportVersion()
Definition: PYexportVersion.h:22
Namespace for handling FMT versions and features.
Definition: FMTVersion.h:31