From 54134ed0a849e4b45dcf1ff241157754ff5b7320 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Thu, 15 May 2025 13:18:00 +0300 Subject: [PATCH] [+] improve venv_compile --- .../fxreader/pr34/commands_typed/cli.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/python/online/fxreader/pr34/commands_typed/cli.py b/python/online/fxreader/pr34/commands_typed/cli.py index 268b031..7260fdc 100644 --- a/python/online/fxreader/pr34/commands_typed/cli.py +++ b/python/online/fxreader/pr34/commands_typed/cli.py @@ -551,6 +551,13 @@ class CLI(abc.ABC): # type=pathlib.Path, type=str, ) + parser.add_argument( + '-p', + dest='python_version', + default=None, + # type=pathlib.Path, + type=str, + ) options, args = pr34_argparse.parse_args( parser, @@ -575,12 +582,20 @@ class CLI(abc.ABC): if o.exists() ]) + requirements_name_get_res = cli_bootstrap.requirements_name_get( + source_dir=project.source_dir, + features=options.features, + python_version=options.python_version, + requirements=pyproject.requirements, + ) + logger.info(dict( dependencies=dependencies, + requirements_name_get_res=requirements_name_get_res, )) with io.open( - project.source_dir / 'requirements.in', + requirements_name_get_res.not_compiled, 'w', ) as f: f.write( @@ -599,8 +614,9 @@ class CLI(abc.ABC): for o in pip_find_links ], []), '--generate-hashes', - project.source_dir / 'requirements.in', - '-o', project.source_dir / 'requirements.txt', + requirements_name_get_res.not_compiled, + '-o', + requirements_name_get_res.compiled, ]) def module_switch(