diff options
-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='''\ |