Skip to content

Commit

Permalink
Fix snap builds (#9729)
Browse files Browse the repository at this point in the history
* release script change

* fix setup.py

* match setup.py logic
  • Loading branch information
bmw committed Jul 7, 2023
1 parent 436b7fb commit a767454
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 78 deletions.
9 changes: 3 additions & 6 deletions certbot-dns-cloudflare/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-digitalocean/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-dnsimple/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-dnsmadeeasy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-gehirn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-google/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-linode/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-luadns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-nsone/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-ovh/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-rfc2136/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-route53/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 3 additions & 6 deletions certbot-dns-sakuracloud/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
'setuptools>=41.6.0',
]

if not os.environ.get('SNAP_BUILD'):
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')
else:
install_requires.extend([
# We specify the minimum acme and certbot version as the current plugin
# version for simplicity. See
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
])
elif 'bdist_wheel' in sys.argv[1:]:
raise RuntimeError('Unset SNAP_BUILD when building wheels '
'to include certbot dependencies.')
if os.environ.get('SNAP_BUILD'):
install_requires.append('packaging')

docs_extras = [
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
Expand Down
9 changes: 9 additions & 0 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ if ! command -v script >/dev/null 2>&1; then
exit 1
fi

if [ -n "$SNAP_BUILD" ]; then
echo "Running the release script with the environment variable SNAP_BUILD"
echo "set will cause plugins' wheels to be built without dependencies"
echo "on Certbot. See https://github.com/certbot/certbot/pull/8091 for more"
echo "info. Please unset this environment variable and run this script"
echo "again."
exit 1
fi

export RELEASE_DIR="./releases"
mv "$RELEASE_DIR" "$RELEASE_DIR.$(date +%s).bak" || true
LOG_PATH="log"
Expand Down

0 comments on commit a767454

Please sign in to comment.