diff options
author | Ben Brown <ben@demerara.io> | 2021-11-19 08:28:36 +0000 |
---|---|---|
committer | Ben Brown <ben@demerara.io> | 2021-11-19 08:28:36 +0000 |
commit | 796a2ae9622a37ab02195880c19d2055bb2412dc (patch) | |
tree | 2660fc8a9f0bece893d04839e53c403028219417 | |
parent | b3aad98e366fbf3b07c80b15a6638a84ca9c2af9 (diff) | |
parent | 26de9fb2cd55aad522a4fdaf5eb96c146b99d4aa (diff) | |
download | lorry-796a2ae9622a37ab02195880c19d2055bb2412dc.tar.gz |
Merge branch 'benbrown/python-version' into 'master'
Set minimum version to 3.6
Closes #26
See merge request CodethinkLabs/lorry/lorry!25
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | lorry.raw-file-importer | 12 | ||||
-rw-r--r-- | setup.py | 5 |
3 files changed, 16 insertions, 3 deletions
@@ -26,7 +26,7 @@ Dependencies Required: -* **Python 3** +* **Python 3**: Minimum of 3.6. * **Git** diff --git a/lorry.raw-file-importer b/lorry.raw-file-importer index bca46b5..caaa8c9 100755 --- a/lorry.raw-file-importer +++ b/lorry.raw-file-importer @@ -39,7 +39,11 @@ def commit_lfs_gitattributes(fast_import): def commit_lfs_file(raw_file, relative_path, last_commit, fast_import): # git-lfs-pointer of the file - ret = subprocess.run(['git', 'lfs', 'pointer', '--file', raw_file], capture_output=True, check=True) + ret = subprocess.run( + ['git', 'lfs', 'pointer', '--file', raw_file], + stdout=subprocess.PIPE, + check=True, + ) pointer_digest = ret.stdout datasize = len(pointer_digest) @@ -86,7 +90,11 @@ def commit_lfs_file(raw_file, relative_path, last_commit, fast_import): def get_last_commit(): # show the full hash of the latest commit - out = subprocess.run(['git', 'rev-parse', branch_ref], capture_output=True, text=True) + out = subprocess.run( + ['git', 'rev-parse', branch_ref], + stdout=subprocess.PIPE, + universal_newlines=True, + ) if out.returncode != 0: return None @@ -28,6 +28,7 @@ import glob import os import shutil import subprocess +import sys class Build(build): @@ -95,6 +96,10 @@ class Install(install): 'share/lorry/hg-fast-export/plugins')) +if sys.version_info < (3, 6): + print("lorry requires Python 3.6+", file=sys.stderr) + sys.exit(1) + setup(name='lorry', description='FIXME', long_description='''\ |