2020-06-19 11:11:35 -04:00
|
|
|
from distutils.version import LooseVersion
|
2020-06-29 19:58:26 -04:00
|
|
|
import os
|
2019-11-26 18:25:28 -05:00
|
|
|
import sys
|
2018-07-10 23:52:32 -04:00
|
|
|
|
2020-04-15 14:54:44 -04:00
|
|
|
from setuptools import __version__ as setuptools_version
|
2019-12-09 15:50:20 -05:00
|
|
|
from setuptools import find_packages
|
|
|
|
|
from setuptools import setup
|
2018-07-10 23:52:32 -04:00
|
|
|
|
2020-10-06 15:15:29 -04:00
|
|
|
version = '1.10.0.dev0'
|
2018-07-10 23:52:32 -04:00
|
|
|
|
|
|
|
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
|
|
|
|
# acme/certbot version.
|
|
|
|
|
install_requires = [
|
2019-01-10 14:36:15 -05:00
|
|
|
'dns-lexicon>=2.7.14', # Correct proxy use on OVH provider
|
2018-07-17 18:29:08 -04:00
|
|
|
'setuptools',
|
2018-07-10 23:52:32 -04:00
|
|
|
'zope.interface',
|
|
|
|
|
]
|
|
|
|
|
|
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([
|
|
|
|
|
'acme>=0.31.0',
|
|
|
|
|
'certbot>=1.1.0',
|
|
|
|
|
])
|
|
|
|
|
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
|
|
|
|
2020-06-19 11:11:35 -04:00
|
|
|
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
2020-04-15 14:54:44 -04:00
|
|
|
if setuptools_known_environment_markers:
|
|
|
|
|
install_requires.append('mock ; python_version < "3.3"')
|
|
|
|
|
elif 'bdist_wheel' in sys.argv[1:]:
|
|
|
|
|
raise RuntimeError('Error, you are trying to build certbot wheels using an old version '
|
|
|
|
|
'of setuptools. Version 36.2+ of setuptools is required.')
|
|
|
|
|
elif sys.version_info < (3,3):
|
|
|
|
|
install_requires.append('mock')
|
|
|
|
|
|
2018-07-10 23:52:32 -04:00
|
|
|
docs_extras = [
|
|
|
|
|
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
|
|
|
|
|
'sphinx_rtd_theme',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name='certbot-dns-ovh',
|
|
|
|
|
version=version,
|
|
|
|
|
description="OVH DNS Authenticator plugin for Certbot",
|
|
|
|
|
url='https://github.com/certbot/certbot',
|
|
|
|
|
author="Certbot Project",
|
|
|
|
|
author_email='client-dev@letsencrypt.org',
|
|
|
|
|
license='Apache License 2.0',
|
2020-08-16 16:19:08 -04:00
|
|
|
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
2018-07-10 23:52:32 -04:00
|
|
|
classifiers=[
|
2019-12-03 22:56:16 -05:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2018-07-10 23:52:32 -04:00
|
|
|
'Environment :: Plugins',
|
|
|
|
|
'Intended Audience :: System Administrators',
|
|
|
|
|
'License :: OSI Approved :: Apache Software License',
|
|
|
|
|
'Operating System :: POSIX :: Linux',
|
|
|
|
|
'Programming Language :: Python',
|
|
|
|
|
'Programming Language :: Python :: 2',
|
|
|
|
|
'Programming Language :: Python :: 2.7',
|
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
|
'Programming Language :: Python :: 3.6',
|
2019-08-28 14:10:13 -04:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2019-09-24 14:38:38 -04:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2018-07-10 23:52:32 -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-ovh = certbot_dns_ovh._internal.dns_ovh:Authenticator',
|
2018-07-10 23:52:32 -04:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
)
|