Skip to content

Commit

Permalink
[Python] Support for 3.7 as well (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Nov 17, 2024
1 parent 5d1b2b7 commit a87b150
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 11 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def _create_sym_link():
run('sudo {0}'.format(ln_cmd))


def _install_venv():
run('rm -rf venv')
run('python3 -m venv venv --without-pip')
python_version_specific = ''
if sys.version_info.minor== 7:
python_version_specific = 'pip/3.7/'
run('source venv/bin/activate && curl https://bootstrap.pypa.io/{0}get-pip.py | python'.format(python_version_specific))


def main():
args = register_arguments()
if args.offline_install_path is None:
Expand All @@ -53,8 +62,8 @@ def main():
# (from a local dir if it exists)
# "python -m pip install" instead of "pip install" handles a pip
# issue where it fails in a long-named dir
run('python3 -m venv venv && '
'source venv/bin/activate && '
_install_venv()
run('source venv/bin/activate && '
'python -m pip install {0} incremental && '.format(local_pip_packages) +
'python -m pip install {0} -r {1}'.format(local_pip_packages, requirements_file))

Expand Down
7 changes: 4 additions & 3 deletions requirements/common.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
inflection==0.5.1
simplejson==3.19.3
Twisted==24.10.0
Twisted==24.10.0;python_version>="3.9"
Twisted==22.10.0;python_version<"3.9"
pytz==2024.2
colorama==0.4.6
pygments==2.18.0
pygments==2.18.0;python_version>="3.9"
pygments==2.17.2;python_version<"3.9"
ruamel.yaml==0.18.6
setuptools==75.5.0
semver==3.0.2

0 comments on commit a87b150

Please sign in to comment.