From a11333d24fd7f02548e4722edb13505fcd50b2a3 Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 17 Nov 2024 10:50:44 +0200 Subject: [PATCH 1/3] initial --- requirements/common.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/common.txt b/requirements/common.txt index df2d263..055c364 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -1,6 +1,7 @@ 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 From 21800ab31fdb1cca8e6e5a53b165f703fe18cdfe Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 17 Nov 2024 11:16:24 +0200 Subject: [PATCH 2/3] more --- install | 12 ++++++++++-- requirements/common.txt | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/install b/install index 656d11c..d764a32 100755 --- a/install +++ b/install @@ -35,6 +35,14 @@ def _create_sym_link(): run('sudo {0}'.format(ln_cmd)) +def _install_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 +61,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 055c364..63c400b 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -4,7 +4,7 @@ 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 From efc5c33c5c9d3f7e0bf456d63acb068089033a3d Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 17 Nov 2024 11:18:41 +0200 Subject: [PATCH 3/3] cleanup venv before install --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index d764a32..441009b 100755 --- a/install +++ b/install @@ -36,6 +36,7 @@ def _create_sym_link(): def _install_venv(): + run('rm -rf venv') run('python3 -m venv venv --without-pip') python_version_specific = '' if sys.version_info.minor== 7: