File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ if(ITKPythonPackage_SUPERBUILD)
4949 include (ExternalProject )
5050
5151 set (ITK_REPOSITORY "https://github.com/InsightSoftwareConsortium/ITK.git" )
52- # ITK nightly-master 2017-02-08
53- set (ITK_GIT_TAG "922f2d9 " )
52+ # ITK nightly-master 2017-02-09
53+ set (ITK_GIT_TAG "3fe1126 " )
5454
5555 # Add an empty external project
5656 function (itk_ExternalProject_Add_Empty proj depends )
Original file line number Diff line number Diff line change 1- VERSION = '4.11.0.dev139+20170208.g922f2d9'
1+ VERSION = '4.11.0.dev20170209+149.g3fe1126'
2+
3+ def get_versions ():
4+ """Returns versions for the ITK Python package.
5+
6+ from itkVersion import get_versions
7+
8+ # Returns the ITK repository version
9+ get_versions()['version']
10+
11+ # Returns the package version. Since GitHub Releases do not support the '+'
12+ # character in file names, this does not contain the local version
13+ # identifier in nightly builds, i.e.
14+ #
15+ # '4.11.0.dev20170208'
16+ #
17+ # instead of
18+ #
19+ # '4.11.0.dev20170208+139.g922f2d9'
20+ get_versions()['package-version']
21+ """
22+ versions = {}
23+ versions ['version' ] = VERSION
24+ versions ['package-version' ] = VERSION .split ('+' )[0 ]
25+ return versions
Original file line number Diff line number Diff line change 5050pythonRevision = version
5151if int (numberOfCommits ) > 0 :
5252 pythonRevision += '.dev'
53- pythonRevision += numberOfCommits
54- pythonRevision += '+'
5553 pythonRevision += commitDate
54+ pythonRevision += '+'
55+ pythonRevision += numberOfCommits
5656 pythonRevision += '.'
5757 pythonRevision += gHash
5858
6161if not os .path .exists (itkVersionPath ):
6262 print ('Expected file ' + itkVersionPath + ' not found!' )
6363 sys .exit (1 )
64+ with open (itkVersionPath , 'r' ) as fp :
65+ lines = fp .readlines ()
6466with open (itkVersionPath , 'w' ) as fp :
65- fp .write ("VERSION = '" )
66- fp .write (pythonRevision )
67- fp .write ("'\n " )
67+ for line in lines :
68+ if line .startswith ('VERSION = ' ):
69+ fp .write ("VERSION = '" )
70+ fp .write (pythonRevision )
71+ fp .write ("'\n " )
72+ else :
73+ fp .write (line )
6874
6975
7076with open ('CMakeLists.txt' , 'r' ) as fp :
Original file line number Diff line number Diff line change 33from skbuild import setup
44
55sys .path .append (path .dirname (path .dirname (path .abspath (__file__ ))))
6- from itkVersion import VERSION
6+ from itkVersion import get_versions
77
88setup (
99 name = 'itk' ,
10- version = VERSION ,
10+ version = get_versions ()[ 'package-version' ] ,
1111 author = 'Insight Software Consortium' ,
1212 author_email = 'community@itk.org' ,
1313 packages = ['itk' ],
You can’t perform that action at this time.
0 commit comments