2020-06-29 19:58:26 -04:00
|
|
|
import os
|
2019-11-26 18:25:28 -05:00
|
|
|
import sys
|
2017-05-02 13:12:23 -04:00
|
|
|
|
2019-12-09 15:50:20 -05:00
|
|
|
from setuptools import find_packages
|
|
|
|
|
from setuptools import setup
|
2017-05-02 13:12:23 -04:00
|
|
|
|
2023-01-11 16:21:23 -05:00
|
|
|
version = '2.3.0.dev0'
|
2017-05-02 13:12:23 -04:00
|
|
|
|
|
|
|
|
install_requires = [
|
|
|
|
|
'cloudflare>=1.5.1',
|
2022-02-28 18:23:30 -05:00
|
|
|
'setuptools>=41.6.0',
|
2017-05-02 13:12:23 -04:00
|
|
|
]
|
|
|
|
|
|
Make externally snapped plugin updates more stable (#8145)
Fixes #7863.
Connect command is `sudo snap connect certbot-dns-dnsimple:certbot-metadata certbot:certbot-metadata`
Logs are `cat /var/snap/certbot-dns-dnsimple/current/debuglog`
Echos in hook are only printed to terminal when it exits 0; otherwise, check logs in `debuglog` mentioned above.
Manual tests include all iterations of connected, unconnected, installed for the first, second time, etc, with passing and failing version checks.
* Make dnsimple not update if certbot is too old
* create an interface to read cb version
* add missing newline
* fix syntax
* trying to figure out the consumer syntax
* trying to figure out the consumer syntax, again
* only check post first install
* valid setting name
* test for first install differently
* snapctl doesn't error if it fails I guess
* time to do some print debugging
* continue playing with syntax
* once again, fooled by bash int vs string comparisons!
* debugging
* if we use post and pre together we can do this
* is this how content interface syntax works
* it's a directory?
* more debug
* what's that error message again?
* try other syntax
* if it's not documented just guess at syntax
* actually, I think this is the syntax
* oops didn't set for new hook
* test passing information along connection
* interface attributes can only be set during the execution of prepare hooks
* just do it with main connection
* undo last few test changes
* Add some printing to make sure we understand what's going on
* create empty directory to bind to
* put mkdir in the correct part
* let's inspect the environment
* it can't run bash directly.
* perhaps only directories can be shared via the contente interface
* update name of folder
* echo to debug log to understand what's going on exactly. we have file access though!
* update grep for new file
* more printing
* echo to the debug log
* ok NOW all print statements are going to the log
* why does echo need two >s
* remove unnecessary extra check, just check if the init file is available
* check if certbot version will be available post-refresh after all
* pre-refresh hook is not necessary to get certbot version
* update mkdir so we don't have to clean each time
* try comparing version numbers in python
* it's python3
* we need different prints for if we succeed or if we fail.
* improve bash syntax
* remove some debugging code
* Remove debug script
* remove spaces for clarity
* consolidate parts and remove more test code
* s/certbot-version/certbot-metadata/g
* use sys.exit instead of exit
* find and save certbot version on the certbot side
* change presence test to new file
* switch to using packaging.version.parse instead of LooseVersion
* switch to requiring certbot version >= plugin version
* add plugin snap changes to generate script
* Add comment to generation file saying not to edit generated files manually
* Create post-refresh hook for all plugins with script
* generate files using new script
* update snapcraft.yaml files for plugins
* bin/sh comes first
* Add packaging to install_requires
* Check that refresh is allowed in integration test
* switch plug and slot names in integration test
* Update tools/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
* small bash fixes
* Update snap readme with new instructions
* Run tools/generate_dnsplugins_postrefreshhook.sh
* Update tools/snap/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-22 20:07:07 -04:00
|
|
|
if not os.environ.get('SNAP_BUILD'):
|
2020-06-29 19:58:26 -04:00
|
|
|
install_requires.extend([
|
2021-06-01 17:46:06 -04:00
|
|
|
# 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}',
|
2020-06-29 19:58:26 -04:00
|
|
|
])
|
|
|
|
|
elif 'bdist_wheel' in sys.argv[1:]:
|
Make externally snapped plugin updates more stable (#8145)
Fixes #7863.
Connect command is `sudo snap connect certbot-dns-dnsimple:certbot-metadata certbot:certbot-metadata`
Logs are `cat /var/snap/certbot-dns-dnsimple/current/debuglog`
Echos in hook are only printed to terminal when it exits 0; otherwise, check logs in `debuglog` mentioned above.
Manual tests include all iterations of connected, unconnected, installed for the first, second time, etc, with passing and failing version checks.
* Make dnsimple not update if certbot is too old
* create an interface to read cb version
* add missing newline
* fix syntax
* trying to figure out the consumer syntax
* trying to figure out the consumer syntax, again
* only check post first install
* valid setting name
* test for first install differently
* snapctl doesn't error if it fails I guess
* time to do some print debugging
* continue playing with syntax
* once again, fooled by bash int vs string comparisons!
* debugging
* if we use post and pre together we can do this
* is this how content interface syntax works
* it's a directory?
* more debug
* what's that error message again?
* try other syntax
* if it's not documented just guess at syntax
* actually, I think this is the syntax
* oops didn't set for new hook
* test passing information along connection
* interface attributes can only be set during the execution of prepare hooks
* just do it with main connection
* undo last few test changes
* Add some printing to make sure we understand what's going on
* create empty directory to bind to
* put mkdir in the correct part
* let's inspect the environment
* it can't run bash directly.
* perhaps only directories can be shared via the contente interface
* update name of folder
* echo to debug log to understand what's going on exactly. we have file access though!
* update grep for new file
* more printing
* echo to the debug log
* ok NOW all print statements are going to the log
* why does echo need two >s
* remove unnecessary extra check, just check if the init file is available
* check if certbot version will be available post-refresh after all
* pre-refresh hook is not necessary to get certbot version
* update mkdir so we don't have to clean each time
* try comparing version numbers in python
* it's python3
* we need different prints for if we succeed or if we fail.
* improve bash syntax
* remove some debugging code
* Remove debug script
* remove spaces for clarity
* consolidate parts and remove more test code
* s/certbot-version/certbot-metadata/g
* use sys.exit instead of exit
* find and save certbot version on the certbot side
* change presence test to new file
* switch to using packaging.version.parse instead of LooseVersion
* switch to requiring certbot version >= plugin version
* add plugin snap changes to generate script
* Add comment to generation file saying not to edit generated files manually
* Create post-refresh hook for all plugins with script
* generate files using new script
* update snapcraft.yaml files for plugins
* bin/sh comes first
* Add packaging to install_requires
* Check that refresh is allowed in integration test
* switch plug and slot names in integration test
* Update tools/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
* small bash fixes
* Update snap readme with new instructions
* Run tools/generate_dnsplugins_postrefreshhook.sh
* Update tools/snap/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-22 20:07:07 -04:00
|
|
|
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
2020-06-29 19:58:26 -04:00
|
|
|
'to include certbot dependencies.')
|
Make externally snapped plugin updates more stable (#8145)
Fixes #7863.
Connect command is `sudo snap connect certbot-dns-dnsimple:certbot-metadata certbot:certbot-metadata`
Logs are `cat /var/snap/certbot-dns-dnsimple/current/debuglog`
Echos in hook are only printed to terminal when it exits 0; otherwise, check logs in `debuglog` mentioned above.
Manual tests include all iterations of connected, unconnected, installed for the first, second time, etc, with passing and failing version checks.
* Make dnsimple not update if certbot is too old
* create an interface to read cb version
* add missing newline
* fix syntax
* trying to figure out the consumer syntax
* trying to figure out the consumer syntax, again
* only check post first install
* valid setting name
* test for first install differently
* snapctl doesn't error if it fails I guess
* time to do some print debugging
* continue playing with syntax
* once again, fooled by bash int vs string comparisons!
* debugging
* if we use post and pre together we can do this
* is this how content interface syntax works
* it's a directory?
* more debug
* what's that error message again?
* try other syntax
* if it's not documented just guess at syntax
* actually, I think this is the syntax
* oops didn't set for new hook
* test passing information along connection
* interface attributes can only be set during the execution of prepare hooks
* just do it with main connection
* undo last few test changes
* Add some printing to make sure we understand what's going on
* create empty directory to bind to
* put mkdir in the correct part
* let's inspect the environment
* it can't run bash directly.
* perhaps only directories can be shared via the contente interface
* update name of folder
* echo to debug log to understand what's going on exactly. we have file access though!
* update grep for new file
* more printing
* echo to the debug log
* ok NOW all print statements are going to the log
* why does echo need two >s
* remove unnecessary extra check, just check if the init file is available
* check if certbot version will be available post-refresh after all
* pre-refresh hook is not necessary to get certbot version
* update mkdir so we don't have to clean each time
* try comparing version numbers in python
* it's python3
* we need different prints for if we succeed or if we fail.
* improve bash syntax
* remove some debugging code
* Remove debug script
* remove spaces for clarity
* consolidate parts and remove more test code
* s/certbot-version/certbot-metadata/g
* use sys.exit instead of exit
* find and save certbot version on the certbot side
* change presence test to new file
* switch to using packaging.version.parse instead of LooseVersion
* switch to requiring certbot version >= plugin version
* add plugin snap changes to generate script
* Add comment to generation file saying not to edit generated files manually
* Create post-refresh hook for all plugins with script
* generate files using new script
* update snapcraft.yaml files for plugins
* bin/sh comes first
* Add packaging to install_requires
* Check that refresh is allowed in integration test
* switch plug and slot names in integration test
* Update tools/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
* small bash fixes
* Update snap readme with new instructions
* Run tools/generate_dnsplugins_postrefreshhook.sh
* Update tools/snap/generate_dnsplugins_postrefreshhook.sh
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2020-07-22 20:07:07 -04:00
|
|
|
if os.environ.get('SNAP_BUILD'):
|
|
|
|
|
install_requires.append('packaging')
|
2020-06-29 19:58:26 -04:00
|
|
|
|
2017-05-02 13:12:23 -04:00
|
|
|
docs_extras = [
|
|
|
|
|
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
|
|
|
|
|
'sphinx_rtd_theme',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name='certbot-dns-cloudflare',
|
|
|
|
|
version=version,
|
|
|
|
|
description="Cloudflare DNS Authenticator plugin for Certbot",
|
|
|
|
|
url='https://github.com/certbot/certbot',
|
|
|
|
|
author="Certbot Project",
|
2021-05-03 15:38:54 -04:00
|
|
|
author_email='certbot-dev@eff.org',
|
2017-05-02 13:12:23 -04:00
|
|
|
license='Apache License 2.0',
|
2022-02-28 18:23:30 -05:00
|
|
|
python_requires='>=3.7',
|
2017-05-02 13:12:23 -04:00
|
|
|
classifiers=[
|
2019-12-03 22:56:16 -05:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2017-05-02 13:12:23 -04:00
|
|
|
'Environment :: Plugins',
|
|
|
|
|
'Intended Audience :: System Administrators',
|
|
|
|
|
'License :: OSI Approved :: Apache Software License',
|
|
|
|
|
'Operating System :: POSIX :: Linux',
|
|
|
|
|
'Programming Language :: Python',
|
|
|
|
|
'Programming Language :: Python :: 3',
|
2018-07-09 12:17:03 -04:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2019-09-24 14:38:38 -04:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2020-11-19 15:48:36 -05:00
|
|
|
'Programming Language :: Python :: 3.9',
|
2021-11-08 18:55:32 -05:00
|
|
|
'Programming Language :: Python :: 3.10',
|
2022-11-17 15:55:27 -05:00
|
|
|
'Programming Language :: Python :: 3.11',
|
2017-05-02 13:12:23 -04:00
|
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
|
|
|
'Topic :: Security',
|
|
|
|
|
'Topic :: System :: Installation/Setup',
|
|
|
|
|
'Topic :: System :: Networking',
|
|
|
|
|
'Topic :: System :: Systems Administration',
|
|
|
|
|
'Topic :: Utilities',
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
packages=find_packages(),
|
|
|
|
|
include_package_data=True,
|
|
|
|
|
install_requires=install_requires,
|
|
|
|
|
extras_require={
|
|
|
|
|
'docs': docs_extras,
|
|
|
|
|
},
|
|
|
|
|
entry_points={
|
|
|
|
|
'certbot.plugins': [
|
2019-11-25 13:26:05 -05:00
|
|
|
'dns-cloudflare = certbot_dns_cloudflare._internal.dns_cloudflare:Authenticator',
|
2017-05-02 13:12:23 -04:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
)
|