diff --git a/install b/install index 656d11c..441009b 100755 --- a/install +++ b/install @@ -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: @@ -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)) diff --git a/requirements/common.txt b/requirements/common.txt index df2d263..63c400b 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -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