ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 231e887 was
3a39c2e,
checked in by krzywon, 10 years ago
|
Next iteration of the SANS→SAS is complete.
|
-
Property mode set to
100644
|
File size:
839 bytes
|
Line | |
---|
1 | import os |
---|
2 | __revision__ = "0" |
---|
3 | __version__ = "0.0.0" |
---|
4 | |
---|
5 | import subprocess |
---|
6 | |
---|
7 | def get_svn_revision(): |
---|
8 | p = subprocess.Popen("svnversion", shell=True, \ |
---|
9 | stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
---|
10 | (stdout, stderr) = p.communicate() |
---|
11 | try: |
---|
12 | rev = int(stdout.strip()) |
---|
13 | return str(rev) |
---|
14 | except: |
---|
15 | return __revision__ |
---|
16 | |
---|
17 | # Get the version number from the sasview module |
---|
18 | # Check to see if we are dealing with a release |
---|
19 | try: |
---|
20 | import sas.sasview |
---|
21 | __version__ = sas.sasview.__version__ |
---|
22 | __revision__ = sas.sasview.__build__ |
---|
23 | except: |
---|
24 | print "Could not load sasview module" |
---|
25 | |
---|
26 | # Get actual revision number if possible |
---|
27 | try: |
---|
28 | rev = get_svn_revision() |
---|
29 | if rev is not None: |
---|
30 | __revision__ = rev |
---|
31 | except: |
---|
32 | print "Could not extract revision number" |
---|
33 | |
---|
34 | |
---|
35 | print "SasView v", __version__, __revision__ |
---|
Note: See
TracBrowser
for help on using the repository browser.