ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/DAS/setup.py
(Generate patch)

Comparing COMP/DAS/setup.py (file contents):
Revision 1.3 by valya, Mon Feb 8 15:16:25 2010 UTC vs.
Revision 1.5 by valya, Tue Mar 30 20:41:56 2010 UTC

# Line 12 | Line 12 | from distutils.errors import CCompilerEr
12   from distutils.errors import DistutilsPlatformError, DistutilsExecError
13   from distutils.core import Extension
14   from distutils.command.install import INSTALL_SCHEMES
15 + from subprocess import Popen, PIPE
16  
17   requirements = []
18   try:
# Line 82 | Line 83 | if "--no_ext" in sys.argv:
83   else:
84      features = {"c-ext": c_ext}
85  
86 <
87 < version      = "1.0.0" # need to define it somehow
86 > try:
87 >    proc1        = Popen(['cvs', 'status', '-v', 'setup.py'], stdout=PIPE)
88 >    proc2        = Popen(['grep', 'revision'], stdin=proc1.stdout, stdout=PIPE)
89 >    proc3        = Popen(['grep', '-v', 'Repository'], stdin=proc2.stdout, stdout=PIPE)
90 >    proc4        = Popen(['grep', '-v', 'Working'], stdin=proc3.stdout, stdout=PIPE)
91 >    proc5        = Popen(['head', '-1'], stdin=proc4.stdout, stdout=PIPE)
92 >    version      = proc5.communicate()[0].split()[0]
93 > except:
94 >    version      = "1.0.0" # need to define it somehow
95   name         = "DAS"
96   description  = "CMS Data Aggregation System"
97   readme       ="""

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines