cedadev / jasmin_scivm

9 stars 0 forks source link

add cerbere #151

Closed alaniwi closed 5 years ago

alaniwi commented 6 years ago

User requested. (Ticket 18028.)

From https://git.cersat.fr/cerbere/cerbere.git

The setup.py uses a git option to count the commits to obtain the point-release version number, which isn't supported in the git version on JASMIN. Can be fixed by patching setup.py:

-    commits = subprocess.check_output([ '/usr/bin/git'
-                                      , 'rev-list'
-                                      , 'HEAD'
-                                      , '--count']).decode('utf-8').strip()
+    commit_ids = subprocess.check_output([ '/usr/bin/git'
+                                           , 'rev-list'
+                                           , 'HEAD']).decode('utf-8').strip()
+    commits = len(commit_ids.split("\n"))

NB requires numpy. Put as RPM dependency.

alaniwi commented 6 years ago

Builds and imports cleanly after sorting out the versioning issues (comments added in spec file).