File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2424#include < ObjCryst/version.h>
2525#include < ObjCryst/ObjCryst/General.h>
2626
27+ // Explain compilation failure when build with old libobjcryst.
28+ #ifndef LIBOBJCRYST_VERSION_MICRO
29+ #error "pyobjcryst requires libobjcryst 2015.1 or later."
30+ #endif
31+
2732using namespace boost ::python;
2833using namespace ObjCryst ;
2934
@@ -45,6 +50,11 @@ dict get_libobjcryst_version_info_dict()
4550 rv[" micro" ] = libobjcryst_version_info::micro;
4651 rv[" date" ] = libobjcryst_version_info::date;
4752 rv[" git_sha" ] = libobjcryst_version_info::git_sha;
53+ #if LIBOBJCRYST_VERSION >= 2015001000003
54+ rv[" patch" ] = libobjcryst_version_info::patch;
55+ #else
56+ rv[" patch" ] = 0 ;
57+ #endif
4858 return rv;
4959}
5060
Original file line number Diff line number Diff line change 3838from pyobjcryst ._pyobjcryst import _get_libobjcryst_version_info_dict
3939
4040libobjcryst_version_info = namedtuple ('libobjcryst_version_info' ,
41- "version version_number major minor micro date git_sha" )
41+ "version version_number major minor micro patch date git_sha" )
4242vd = _get_libobjcryst_version_info_dict ()
4343libobjcryst_version_info = libobjcryst_version_info (
4444 version = vd ['version_str' ],
4545 version_number = vd ['version' ],
4646 major = vd ['major' ],
4747 minor = vd ['minor' ],
4848 micro = vd ['micro' ],
49+ patch = vd ['patch' ],
4950 date = vd ['date' ],
5051 git_sha = vd ['git_sha' ])
5152del vd
You can’t perform that action at this time.
0 commit comments