File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,13 +59,23 @@ env.Append(BUILDERS={'BuildFeaturesCode' :
5959
6060vhpp = File ('version.hpp' )
6161
62+ MY_GIT_MISSING_ERROR_MSG = """
63+ Cannot determine libdiffpy version. Compile from a git repository
64+ or use a source archive from
65+
66+ https://github.com/diffpy/libdiffpy/releases
67+ """
68+
6269# If version.hpp exists do not use git
6370if os .path .isfile (str (vhpp .srcnode ())):
6471 majorminor = parsemajorminor (vhpp .srcnode ().get_contents ())
6572else :
6673 from libdiffpybuildutils import gitinfo
6774 vtpl = File ('version.tpl' )
6875 ginfo = gitinfo ()
76+ if not ginfo :
77+ print MY_GIT_MISSING_ERROR_MSG
78+ Exit (1 )
6979 vhpp , = env .BuildVersionCode (['version.hpp' ], vtpl )
7080 env .Depends (vhpp , env .Value (ginfo ['version' ] + ginfo ['commit' ]))
7181 majorminor = (ginfo ['major' ], ginfo ['minor' ])
You can’t perform that action at this time.
0 commit comments