Add packaging to install_requires

This commit is contained in:
Erica Portnoy 2020-07-21 16:50:41 -07:00
parent dc38212e57
commit 7a59f9077b
44 changed files with 86 additions and 58 deletions

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.29.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -18,14 +18,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.29.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -16,14 +16,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -16,14 +16,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -20,14 +20,16 @@ install_requires = [
'httplib2'
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.29.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -16,14 +16,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.29.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -17,14 +17,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.29.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -16,14 +16,16 @@ install_requires = [
'zope.interface',
]
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
'acme>=0.31.0',
'certbot>=1.1.0',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
if setuptools_known_environment_markers:

View file

@ -13,7 +13,7 @@ cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
if [ "$exit_code" -eq 1 ]; then
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" "this plugin can be updated; will try again on next refresh."
exit 1

View file

@ -16,7 +16,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .

View file

@ -24,7 +24,7 @@ cb_installed=\$(cat \$SNAP/certbot-shared/certbot-version.txt)
cb_required=\$(grep -oP "version = '\K.*(?=')" \$SNAP/setup.py)
python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if\
$SNAP/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if\
version.parse('\$cb_installed') < version.parse('\$cb_required') else sys.exit(0)" || exit_code=\$?
if [ "\$exit_code" -eq 1 ]; then
echo "Certbot is version \$cb_installed but needs to be at least \$cb_required before" \

View file

@ -28,7 +28,7 @@ parts:
snapcraftctl pull
snapcraftctl set-version \`grep ^version \$SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"\`
build-environment:
- EXCLUDE_CERTBOT_DEPS: "True"
- SNAP_BUILD: "True"
certbot-metadata:
plugin: dump
source: .