Change Version formatting properties and functions to return Version objects (#4834)
* Change version.up_to() to return Version() object * Add unit tests for Version.up_to() * Fix packages that expected up_to() to return a string * Ensure that up_to() preserves separator characters * Use version indexing instead of up_to * Make all Version formatting properties return Version objects * Update docs * Tests need to test string representation
This commit is contained in:

committed by
Todd Gamblin

parent
df2fc25ddf
commit
250ee413e9
@@ -49,7 +49,7 @@ class SublimeText(Package):
|
||||
depends_on('libxau', type='run')
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version.up_to(1) == '2':
|
||||
if version[0] == 2:
|
||||
return "https://download.sublimetext.com/Sublime%20Text%20{0}%20x64.tar.bz2".format(version)
|
||||
else:
|
||||
return "https://download.sublimetext.com/sublime_text_3_build_{0}_x64.tar.bz2".format(version)
|
||||
|
Reference in New Issue
Block a user