Skip to content

Commit

Permalink
added git version to __init__.py via Makefile. small README.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
vossjo committed Aug 31, 2013
1 parent 1ad5599 commit 01abb33
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ doinstall:
mkdir -p $(esp)
mkdir -p $(bindir)
cp `ls *.py|sed 's/setup.py\|__init__.py//'` $(EXTRAFILES) $(esp)
sed s/SVNVERSION/$(shell svnversion 2>/dev/null|| echo no_version_found)/g <__init__.py >$(esp)/__init__.py
sed s/GITVERSION/$(shell git describe --always 2>/dev/null|| echo no_version_found)-git/g <__init__.py >$(esp)/__init__.py
$(py) -m compileall $(esp)
$(CC) -s -O2 -o $(esp)/espfilter c-src/espfilter.c
$(CC) -s -O2 -o $(bindir)/cubecutperiodic c-src/cubecutperiodic.c
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
ase-espresso
============

[ase-espresso](https://github.com/vossjo/ase-espresso) is an [ase](https://wiki.fysik.dtu.dk/ase/) interface for [Quantum Espresso](http://www.quantum-espresso.org/).
10 changes: 5 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# or http://www.gnu.org/copyleft/gpl.txt .
#****************************************************************************

svnver = 'SVNVERSION'
gitver = 'GITVERSION'
import os

try:
Expand Down Expand Up @@ -852,11 +852,11 @@ def read(self, atoms):
if self.writeversion:
self.writeversion = False
s = open(self.log,'a')
s.write(' python dir : '+self.mypath+'\n')
s.write(' python dir : '+self.mypath+'\n')
exedir = os.path.dirname(os.popen('which pw.x').readline())
s.write(' espresso dir : '+exedir+'\n')
s.write(' pseudo dir : '+self.psppath+'\n')
s.write(' espresso py svn : '+svnver+'\n\n\n')
s.write(' espresso dir : '+exedir+'\n')
s.write(' pseudo dir : '+self.psppath+'\n')
s.write(' ase-espresso py git : '+gitver+'\n\n\n')
s.close()

if not self.started and not self.only_init:
Expand Down

0 comments on commit 01abb33

Please sign in to comment.