diff --git a/Dockerfile b/Dockerfile index b9ea168de..d7aca784b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ COPY letsencrypt-apache /opt/letsencrypt/src/letsencrypt-apache/ COPY letsencrypt-nginx /opt/letsencrypt/src/letsencrypt-nginx/ -# requirements.txt not installed! +# py26reqs.txt not installed! RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt/venv && \ /opt/letsencrypt/venv/bin/pip install \ -e /opt/letsencrypt/src/acme \ diff --git a/Dockerfile-dev b/Dockerfile-dev index daa8e9af0..028366b2c 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -32,7 +32,8 @@ RUN /opt/letsencrypt/src/ubuntu.sh && \ # the above is not likely to change, so by putting it further up the # Dockerfile we make sure we cache as much as possible -COPY setup.py README.rst CHANGES.rst MANIFEST.in requirements.txt DISCLAIMER linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/letsencrypt/src/ +# py26reqs.txt not installed! +COPY setup.py README.rst CHANGES.rst MANIFEST.in DISCLAIMER linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/letsencrypt/src/ # all above files are necessary for setup.py, however, package source # code directory has to be copied separately to a subdirectory... @@ -52,7 +53,6 @@ COPY tests /opt/letsencrypt/src/tests/ RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt/venv && \ /opt/letsencrypt/venv/bin/pip install \ - -r /opt/letsencrypt/src/requirements.txt \ -e /opt/letsencrypt/src/acme \ -e /opt/letsencrypt/src \ -e /opt/letsencrypt/src/letsencrypt-apache \ diff --git a/MANIFEST.in b/MANIFEST.in index fa0d16e0d..5d5b0bed4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include requirements.txt +include py26reqs.txt include README.rst include CHANGES.rst include CONTRIBUTING.md diff --git a/bootstrap/README b/bootstrap/README index 6a04ac0ba..89fd8b6ba 100644 --- a/bootstrap/README +++ b/bootstrap/README @@ -2,6 +2,6 @@ This directory contains scripts that install necessary OS-specific prerequisite dependencies (see docs/using.rst). General dependencies: -- git-core: requirements.txt git+https://* +- git-core: py26reqs.txt git+https://* - ca-certificates: communication with demo ACMO server at - https://www.letsencrypt-demo.org, requirements.txt git+https://* + https://www.letsencrypt-demo.org, py26reqs.txt git+https://* diff --git a/bootstrap/dev/venv.sh b/bootstrap/dev/venv.sh index d6cf95bb5..2bd32a89b 100755 --- a/bootstrap/dev/venv.sh +++ b/bootstrap/dev/venv.sh @@ -4,7 +4,7 @@ export VENV_ARGS="--python python2" ./bootstrap/dev/_venv_common.sh \ - -r requirements.txt \ + -r py26reqs.txt \ -e acme[testing] \ -e .[dev,docs,testing] \ -e letsencrypt-apache \ diff --git a/bootstrap/venv.sh b/bootstrap/venv.sh index 6ca082446..ff1a50c6c 100755 --- a/bootstrap/venv.sh +++ b/bootstrap/venv.sh @@ -13,14 +13,14 @@ VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"} # later steps, causing "ImportError: cannot import name unpack_url" if [ ! -d $VENV_PATH ] then - virtualenv --no-site-packages --python python2 $VENV_PATH + virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH fi . $VENV_PATH/bin/activate pip install -U setuptools pip install -U pip -pip install -U letsencrypt letsencrypt-apache # letsencrypt-nginx +pip install -U -r py26reqs.txt letsencrypt letsencrypt-apache # letsencrypt-nginx echo echo "Congratulations, Let's Encrypt has been successfully installed/updated!" diff --git a/letsencrypt-auto b/letsencrypt-auto index 354bd36fb..c1f5b094b 100755 --- a/letsencrypt-auto +++ b/letsencrypt-auto @@ -19,7 +19,7 @@ else SUDO= fi -for arg in "$@" ; do +for arg in "$@" ; do # This first clause is redundant with the third, but hedging on portability if [ "$arg" = "-v" ] || [ "$arg" = "--verbose" ] || echo "$arg" | grep -E -- "-v+$" ; then VERBOSE=1 @@ -40,6 +40,12 @@ ExperimentalBootstrap() { exit 1 fi } +if [ -f /etc/debian_version ] ; then + # squeeze needs Python 2.6, `python2` doesn't exist + if grep -q '^6\.0' /etc/debian_version ; then + LE_PYTHON=${LE_PYTHON:-python} + fi +fi # virtualenv call is not idempotent: it overwrites pip upgraded in # later steps, causing "ImportError: cannot import name unpack_url" @@ -76,9 +82,9 @@ then echo "Creating virtual environment..." if [ "$VERBOSE" = 1 ] ; then - virtualenv --no-site-packages --python python2 $VENV_PATH + virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH else - virtualenv --no-site-packages --python python2 $VENV_PATH > /dev/null + virtualenv --no-site-packages --python ${LE_PYTHON:-python2} $VENV_PATH > /dev/null fi fi @@ -87,11 +93,11 @@ if [ "$VERBOSE" = 1 ] ; then echo $VENV_BIN/pip install -U setuptools $VENV_BIN/pip install -U pip - $VENV_BIN/pip install -U letsencrypt letsencrypt-apache + $VENV_BIN/pip install -r py26reqs.txt -U letsencrypt letsencrypt-apache # nginx is buggy / disabled for now, but upgrade it if the user has # installed it manually if $VENV_BIN/pip freeze | grep -q letsencrypt-nginx ; then - $VENV_BIN/pip install -U letsencrypt letsencrypt-nginx + $VENV_BIN/pip install -U letsencrypt letsencrypt-nginx fi else $VENV_BIN/pip install -U setuptools > /dev/null @@ -99,6 +105,8 @@ else $VENV_BIN/pip install -U pip > /dev/null printf . # nginx is buggy / disabled for now... + $VENV_BIN/pip install -r py26reqs.txt + printf . $VENV_BIN/pip install -U letsencrypt > /dev/null printf . $VENV_BIN/pip install -U letsencrypt-apache > /dev/null diff --git a/py26reqs.txt b/py26reqs.txt new file mode 100644 index 000000000..a94b22c0c --- /dev/null +++ b/py26reqs.txt @@ -0,0 +1,2 @@ +# https://github.com/bw2/ConfigArgParse/issues/17 +git+https://github.com/kuba/ConfigArgParse.git@python2.6-0.9.3#egg=ConfigArgParse diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 972e87eaf..000000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -# https://github.com/bw2/ConfigArgParse/issues/17 -git+https://github.com/kuba/ConfigArgParse.git@python2.6#egg=ConfigArgParse diff --git a/tox.ini b/tox.ini index 8ea3e518f..9988d8d1f 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ envlist = py26,py27,py33,py34,cover,lint commands = pip install -e acme[testing] nosetests -v acme - pip install -r requirements.txt -e .[testing] + pip install -r py26reqs.txt -e .[testing] nosetests -v letsencrypt pip install -e letsencrypt-apache nosetests -v letsencrypt_apache @@ -44,7 +44,7 @@ commands = [testenv:cover] basepython = python2.7 commands = - pip install -r requirements.txt -e acme -e .[testing] -e letsencrypt-apache -e letsencrypt-nginx -e letshelp-letsencrypt + pip install -e acme -e .[testing] -e letsencrypt-apache -e letsencrypt-nginx -e letshelp-letsencrypt ./tox.cover.sh [testenv:lint] @@ -54,7 +54,7 @@ basepython = python2.7 # duplicate code checking; if one of the commands fails, others will # continue, but tox return code will reflect previous error commands = - pip install -r requirements.txt -e acme -e .[dev] -e letsencrypt-apache -e letsencrypt-nginx -e letsencrypt-compatibility-test -e letshelp-letsencrypt + pip install -e acme -e .[dev] -e letsencrypt-apache -e letsencrypt-nginx -e letsencrypt-compatibility-test -e letshelp-letsencrypt ./pep8.travis.sh pylint --rcfile=.pylintrc letsencrypt pylint --rcfile=.pylintrc acme/acme