Changeset 5709051 in sasview
- Timestamp:
- Mar 7, 2013 3:16:04 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- a602942e
- Parents:
- 0d795bf
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/get_version.py
rbd0a2115 r5709051 3 3 __version__ = "0.0.0" 4 4 5 def get_svn_revision(path=None): 6 rev = None 7 if path is None: 8 path = os.path.dirname(__file__) 9 entries_path = '%s/.svn/entries' % path 5 import subprocess 10 6 11 if os.path.exists(entries_path): 12 entries = open(entries_path, 'r').read() 13 # Versions >= 7 of the entries file are flat text. The first line is 14 # the version number. The next set of digits after 'dir' is the revision. 15 if re.match('(\d+)', entries): 16 rev_match = re.search('\d+\s+dir\s+(\d+)', entries) 17 if rev_match: 18 rev = rev_match.groups()[0] 19 # Older XML versions of the file specify revision as an attribute of 20 # the first entries node. 21 else: 22 from xml.dom import minidom 23 dom = minidom.parse(entries_path) 24 rev = dom.getElementsByTagName('entry')[0].getAttribute('revision') 25 26 if rev: 27 return u'%s' % rev 28 return None 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__ 29 16 30 17 # Get the version number from the sansview module … … 46 33 47 34 48 print "SasView v 35 print "SasView v", __version__, __revision__ -
sansview/__init__.py
r5d9b2c0 r5709051 3 3 try: 4 4 import pkg_resources 5 d = pkg_resources.get_distribution("sansview") 6 rev = int(d.parsed_version[5]) 7 __build__ = str(rev) 5 d = pkg_resources.get_distribution("sasview") 6 __build__ = str(d.version) 8 7 except: 9 8 try: 10 9 import os 11 if os.path.isfile("BUILD_NUMBER"): 12 f=open("BUILD_NUMBER",'r') 10 dir = os.path.dirname(__file__) 11 filepath = os.path.join(dir, "BUILD_NUMBER") 12 if os.path.isfile(filepath): 13 f=open(filepath, 'r') 13 14 buff = f.read().strip() 14 15 if len(buff)<50: -
setup.py
rcf9b1595 r5709051 331 331 # 'wxPython>=2.8.11', 'pil', 332 332 # 'periodictable>=1.3.0', 'scipy>=0.7.2'] 333 required = ['lxml','periodictable>=1.3.0','pyparsing ==1.5.5']333 required = ['lxml','periodictable>=1.3.0','pyparsing<2.0.0'] 334 334 335 335 if os.name=='nt':
Note: See TracChangeset
for help on using the changeset viewer.