From 4216b96b2eb68ca9371e0452b0111e033f64f2d2 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Wed, 4 Apr 2018 15:07:29 -0400 Subject: Move version.txt to src/build-data It is not useful for end-users so don't put it in the top level. --- configure.py | 2 +- src/build-data/version.txt | 10 ++++++++++ src/configs/sphinx/conf.py | 2 +- src/scripts/dist.py | 3 ++- version.txt | 10 ---------- 5 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 src/build-data/version.txt delete mode 100644 version.txt diff --git a/configure.py b/configure.py index 99240effc..8bc18bbba 100755 --- a/configure.py +++ b/configure.py @@ -89,7 +89,7 @@ class Version(object): def get_data(): if not Version.data: root_dir = os.path.dirname(os.path.realpath(__file__)) - Version.data = parse_version_file(os.path.join(root_dir, 'version.txt')) + Version.data = parse_version_file(os.path.join(root_dir, 'src/build-data/version.txt')) return Version.data @staticmethod diff --git a/src/build-data/version.txt b/src/build-data/version.txt new file mode 100644 index 000000000..c0f34a598 --- /dev/null +++ b/src/build-data/version.txt @@ -0,0 +1,10 @@ + +release_major = 2 +release_minor = 5 +release_patch = 0 +release_so_abi_rev = 5 + +# These are set by the distribution script +release_vc_rev = None +release_datestamp = 0 +release_type = 'unreleased' diff --git a/src/configs/sphinx/conf.py b/src/configs/sphinx/conf.py index 0534a9fa2..92fb78ba7 100644 --- a/src/configs/sphinx/conf.py +++ b/src/configs/sphinx/conf.py @@ -38,7 +38,7 @@ def parse_version_file(version_path): results[key] = val return results -version_info = parse_version_file('../../../version.txt') +version_info = parse_version_file('../../build-data/version.txt') version_major = version_info['release_major'] version_minor = version_info['release_minor'] diff --git a/src/scripts/dist.py b/src/scripts/dist.py index 2586af560..d12ce8d05 100755 --- a/src/scripts/dist.py +++ b/src/scripts/dist.py @@ -357,7 +357,8 @@ def main(args=None): version_file = None - for possible_version_file in ['version.txt', 'botan_version.py']: + # location of file with version information has moved over time + for possible_version_file in ['src/build-data/version.txt', 'version.txt', 'botan_version.py']: full_path = os.path.join(output_basename, possible_version_file) if os.access(full_path, os.R_OK): version_file = full_path diff --git a/version.txt b/version.txt deleted file mode 100644 index c0f34a598..000000000 --- a/version.txt +++ /dev/null @@ -1,10 +0,0 @@ - -release_major = 2 -release_minor = 5 -release_patch = 0 -release_so_abi_rev = 5 - -# These are set by the distribution script -release_vc_rev = None -release_datestamp = 0 -release_type = 'unreleased' -- cgit v1.2.3