diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-07-18 22:52:47 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-07-18 22:52:47 (GMT) |
commit | e8067ad4ab51da67c666f8db91256dfab2197acc (patch) | |
tree | 6a93eed5b14a3c20824a788110fd818c4356963a | |
parent | 622027e2566dfb820d0681b592583053092a6f5f (diff) | |
download | SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.zip SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.tar.gz SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.tar.bz2 |
fix doc release date to be the same as the format in CHANGES.txt,etc
-rwxr-xr-x | ReleaseConfig | 4 | ||||
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | site_scons/BuildCommandLine.py | 15 |
3 files changed, 17 insertions, 4 deletions
diff --git a/ReleaseConfig b/ReleaseConfig index 4195f3f..5272e61 100755 --- a/ReleaseConfig +++ b/ReleaseConfig @@ -31,14 +31,14 @@ # 'final', the patchlevel is set to the release date. This value is # mandatory and must be present in this file. #version_tuple = (2, 2, 0, 'final', 0) -version_tuple = (4, 1, 1, 'a', 0) +version_tuple = (4, 2, 0, 'a', 0) # Python versions prior to unsupported_python_version cause a fatal error # when that version is used. Python versions prior to deprecate_python_version # cause a warning to be issued (assuming it's not disabled). These values are # mandatory and must be present in the configuration file. unsupported_python_version = (3, 4, 0) -deprecated_python_version = (3, 5, 0) +deprecated_python_version = (3, 6, 0) # If release_date is (yyyy, mm, dd, hh, mm, ss), that is used as the release # date and time. If release_date is (yyyy, mm, dd), it is used for the @@ -38,7 +38,7 @@ month_year = strftime('%B %Y') project = 'scons' -default_version = '4.1.1a' +default_version = '4.2.0a0' copyright = "Copyright (c) %s The SCons Foundation" % copyright_years # diff --git a/site_scons/BuildCommandLine.py b/site_scons/BuildCommandLine.py index dc269b6..3a3622e 100644 --- a/site_scons/BuildCommandLine.py +++ b/site_scons/BuildCommandLine.py @@ -67,13 +67,26 @@ class BuildCommandLine: self.init_command_line_variables() + def set_date(self): + """ + Determine the release date and the pattern to match a date + Mon, 05 Jun 2010 21:17:15 -0700 + NEW DATE WILL BE INSERTED HERE + """ + + min = (time.daylight and time.altzone or time.timezone) // 60 + hr = min // 60 + min = -(min % 60 + hr * 100) + self.date = (time.strftime('%a, %d %b %Y %X', time.localtime()) + + ' %+.4d' % min) + def process_command_line_vars(self): # # Now grab the information that we "build" into the files. # self.date = ARGUMENTS.get('DATE') if not self.date: - self.date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + self.set_date() self.developer = ARGUMENTS.get('DEVELOPER') if not self.developer: |