1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 06 Nov 2020 11:09:40 +0100
Bug-Debian: https://bugs.debian.org/973804
Description: Avoid calling Git - use Debian version to specify the code version
Bug-Debian: https://bugs.debian.org/973804
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ VERSION = '1.2.4'
# add bcbio version number and git commit hash of the current revision to version.py
try:
- git_run = subprocess.run(['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE)
+ git_run = subprocess.run(['dpkg-parsechangelog', '-SVersion'], stdout=subprocess.PIPE)
git_run.check_returncode()
except subprocess.SubprocessError:
commit_hash = ''
@@ -21,7 +21,7 @@ else:
here = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(here, 'bcbio', 'pipeline', 'version.py'), 'w') as version_file:
version_file.writelines([f'__version__ = "{VERSION}"\n',
- f'__git_revision__ = "{commit_hash}"\n'])
+ f'__debian_revision__ = "{commit_hash}"\n'])
# dependencies are installed via Conda from
# https://github.com/chapmanb/cloudbiolinux/blob/master/contrib/flavor/ngs_pipeline_minimal/packages-conda.yaml
--- a/bcbio/provenance/programs.py
+++ b/bcbio/provenance/programs.py
@@ -147,8 +147,8 @@ def _get_versions(config=None):
try:
from bcbio.pipeline import version
if hasattr(version, "__version__"):
- bcbio_version = ("%s-%s" % (version.__version__, version.__git_revision__)
- if version.__git_revision__ else version.__version__)
+ bcbio_version = ("%s-%s" % (version.__version__, version.__debian_revision__)
+ if version.__debian_revision__ else version.__version__)
else:
bcbio_version = ""
except ImportError:
|