mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Construct the sanitized, pinned and hashed requirements file for certbot-auto (#6839)
* Setup an independant create_venv piece for certbot-auto * Debug * First implementation * Some corrections, disable python 3 * Continue work * Add hashin * Polish CLI * Fix logic * Add executable permissions * Assynchronous process * Correction * Add comments * More controls * Correct image name * Fix image * Test with 2 * Test timeout * Remove parallelization for now. To much bugs. * Add comments * Correct installation * Correct keys map view usage * Improve filtering * Correction * Improve filtering, again * Remove dependency on python 3 * Remove necessity to run from certbot root * Add constraints. Clean code. * Pure constraints * More involved base test * Update certbot-auto with calculated dependencies * Update header * Rebuild UI * Correction * Remove debug info * Ensure docker exit when process finish * Another try to stop docker * Clean stdout/stderr * Fix python-augeas * Catch stderr * Update dependencies with new constraints * Update certbot-auto * Corrections after review. * Clean endline * Silent execution * Filter editable installation of local certbot packages, strict check on package names
This commit is contained in:
@@ -483,6 +483,14 @@ else:
|
||||
UNLIKELY_EOF
|
||||
}
|
||||
|
||||
# Create a new virtual environment for Certbot. It will overwrite any existing one.
|
||||
# Parameters: LE_PYTHON, VENV_PATH, PYVER, VERBOSE
|
||||
CreateVenv() {
|
||||
"$1" - "$2" "$3" "$4" << "UNLIKELY_EOF"
|
||||
{{ create_venv.py }}
|
||||
UNLIKELY_EOF
|
||||
}
|
||||
|
||||
if [ "$1" = "--le-auto-phase2" ]; then
|
||||
# Phase 2: Create venv, install LE, and run.
|
||||
|
||||
@@ -538,22 +546,7 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
||||
if [ "$LE_AUTO_VERSION" != "$INSTALLED_VERSION" ]; then
|
||||
say "Creating virtual environment..."
|
||||
DeterminePythonVersion
|
||||
rm -rf "$VENV_PATH"
|
||||
if [ "$PYVER" -le 27 ]; then
|
||||
# Use an environment variable instead of a flag for compatibility with old versions
|
||||
if [ "$VERBOSE" = 1 ]; then
|
||||
VIRTUALENV_NO_DOWNLOAD=1 virtualenv --no-site-packages --python "$LE_PYTHON" "$VENV_PATH"
|
||||
else
|
||||
VIRTUALENV_NO_DOWNLOAD=1 virtualenv --no-site-packages --python "$LE_PYTHON" "$VENV_PATH" \
|
||||
> /dev/null
|
||||
fi
|
||||
else
|
||||
if [ "$VERBOSE" = 1 ]; then
|
||||
"$LE_PYTHON" -m venv "$VENV_PATH"
|
||||
else
|
||||
"$LE_PYTHON" -m venv "$VENV_PATH" > /dev/null
|
||||
fi
|
||||
fi
|
||||
CreateVenv "$LE_PYTHON" "$VENV_PATH" "$PYVER" "$VERBOSE"
|
||||
|
||||
if [ -n "$BOOTSTRAP_VERSION" ]; then
|
||||
echo "$BOOTSTRAP_VERSION" > "$BOOTSTRAP_VERSION_PATH"
|
||||
|
||||
Reference in New Issue
Block a user