[+] improve venv_compile
This commit is contained in:
parent
8fecbe3e8a
commit
54134ed0a8
@ -551,6 +551,13 @@ class CLI(abc.ABC):
|
|||||||
# type=pathlib.Path,
|
# type=pathlib.Path,
|
||||||
type=str,
|
type=str,
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'-p',
|
||||||
|
dest='python_version',
|
||||||
|
default=None,
|
||||||
|
# type=pathlib.Path,
|
||||||
|
type=str,
|
||||||
|
)
|
||||||
|
|
||||||
options, args = pr34_argparse.parse_args(
|
options, args = pr34_argparse.parse_args(
|
||||||
parser,
|
parser,
|
||||||
@ -575,12 +582,20 @@ class CLI(abc.ABC):
|
|||||||
if o.exists()
|
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(
|
logger.info(dict(
|
||||||
dependencies=dependencies,
|
dependencies=dependencies,
|
||||||
|
requirements_name_get_res=requirements_name_get_res,
|
||||||
))
|
))
|
||||||
|
|
||||||
with io.open(
|
with io.open(
|
||||||
project.source_dir / 'requirements.in',
|
requirements_name_get_res.not_compiled,
|
||||||
'w',
|
'w',
|
||||||
) as f:
|
) as f:
|
||||||
f.write(
|
f.write(
|
||||||
@ -599,8 +614,9 @@ class CLI(abc.ABC):
|
|||||||
for o in pip_find_links
|
for o in pip_find_links
|
||||||
], []),
|
], []),
|
||||||
'--generate-hashes',
|
'--generate-hashes',
|
||||||
project.source_dir / 'requirements.in',
|
requirements_name_get_res.not_compiled,
|
||||||
'-o', project.source_dir / 'requirements.txt',
|
'-o',
|
||||||
|
requirements_name_get_res.compiled,
|
||||||
])
|
])
|
||||||
|
|
||||||
def module_switch(
|
def module_switch(
|
||||||
|
Loading…
Reference in New Issue
Block a user