mirror of
https://github.com/thegeeklab/certbot-dns-corenetworks.git
synced 2024-11-21 20:40:38 +00:00
build: migrate to poetry (#3)
This commit is contained in:
parent
28feec7766
commit
5d82f47658
@ -1,16 +1,17 @@
|
|||||||
local PythonVersion(pyversion='2.7') = {
|
local PythonVersion(pyversion='3.6') = {
|
||||||
name: 'python' + std.strReplace(pyversion, '.', ''),
|
name: 'python' + std.strReplace(pyversion, '.', ''),
|
||||||
image: 'python:' + pyversion,
|
image: 'python:' + pyversion,
|
||||||
environment: {
|
environment: {
|
||||||
PY_COLORS: 1,
|
PY_COLORS: 1,
|
||||||
},
|
},
|
||||||
commands: [
|
commands: [
|
||||||
'pip install -r dev-requirements.txt -qq',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'pip install -qq .',
|
'poetry install -q',
|
||||||
'pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail',
|
'poetry run pytest',
|
||||||
|
'poetry version',
|
||||||
],
|
],
|
||||||
depends_on: [
|
depends_on: [
|
||||||
'clone',
|
'fetch',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -24,15 +25,29 @@ local PipelineLint = {
|
|||||||
},
|
},
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'flake8',
|
name: 'yapf',
|
||||||
image: 'python:3.8',
|
image: 'python:3.9',
|
||||||
environment: {
|
environment: {
|
||||||
PY_COLORS: 1,
|
PY_COLORS: 1,
|
||||||
},
|
},
|
||||||
commands: [
|
commands: [
|
||||||
'pip install -r dev-requirements.txt -qq',
|
'git fetch -tq',
|
||||||
'pip install -qq .',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'flake8 ./certbot_dns_corenetworks',
|
'poetry install -q',
|
||||||
|
'poetry run yapf -dr ./certbot_dns_corenetworks',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'flake8',
|
||||||
|
image: 'python:3.9',
|
||||||
|
environment: {
|
||||||
|
PY_COLORS: 1,
|
||||||
|
},
|
||||||
|
commands: [
|
||||||
|
'git fetch -tq',
|
||||||
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
|
'poetry install -q',
|
||||||
|
'poetry run flake8 ./certbot_dns_corenetworks',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -50,14 +65,20 @@ local PipelineTest = {
|
|||||||
arch: 'amd64',
|
arch: 'amd64',
|
||||||
},
|
},
|
||||||
steps: [
|
steps: [
|
||||||
PythonVersion(pyversion='2.7'),
|
{
|
||||||
PythonVersion(pyversion='3.5'),
|
name: 'fetch',
|
||||||
|
image: 'python:3.9',
|
||||||
|
commands: [
|
||||||
|
'git fetch -tq',
|
||||||
|
],
|
||||||
|
},
|
||||||
PythonVersion(pyversion='3.6'),
|
PythonVersion(pyversion='3.6'),
|
||||||
PythonVersion(pyversion='3.7'),
|
PythonVersion(pyversion='3.7'),
|
||||||
PythonVersion(pyversion='3.8'),
|
PythonVersion(pyversion='3.8'),
|
||||||
|
PythonVersion(pyversion='3.9'),
|
||||||
{
|
{
|
||||||
name: 'codecov',
|
name: 'codecov',
|
||||||
image: 'python:3.8',
|
image: 'python:3.9',
|
||||||
environment: {
|
environment: {
|
||||||
PY_COLORS: 1,
|
PY_COLORS: 1,
|
||||||
CODECOV_TOKEN: { from_secret: 'codecov_token' },
|
CODECOV_TOKEN: { from_secret: 'codecov_token' },
|
||||||
@ -67,11 +88,10 @@ local PipelineTest = {
|
|||||||
'codecov --required -X gcov',
|
'codecov --required -X gcov',
|
||||||
],
|
],
|
||||||
depends_on: [
|
depends_on: [
|
||||||
'python27',
|
|
||||||
'python35',
|
|
||||||
'python36',
|
'python36',
|
||||||
'python37',
|
'python37',
|
||||||
'python38',
|
'python38',
|
||||||
|
'python39',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -94,14 +114,15 @@ local PipelineSecurity = {
|
|||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'bandit',
|
name: 'bandit',
|
||||||
image: 'python:3.8',
|
image: 'python:3.9',
|
||||||
environment: {
|
environment: {
|
||||||
PY_COLORS: 1,
|
PY_COLORS: 1,
|
||||||
},
|
},
|
||||||
commands: [
|
commands: [
|
||||||
'pip install -r dev-requirements.txt -qq',
|
'git fetch -tq',
|
||||||
'pip install -qq .',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'bandit -r ./certbot_dns_corenetworks -x ./certbot_dns_corenetworks/test',
|
'poetry install -q',
|
||||||
|
'poetry run bandit -r ./certbot_dns_corenetworks -x ./certbot_dns_corenetworks/test',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -124,12 +145,11 @@ local PipelineBuildPackage = {
|
|||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'build',
|
name: 'build',
|
||||||
image: 'python:3.8',
|
image: 'python:3.9',
|
||||||
environment: {
|
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION: '${DRONE_TAG##v}',
|
|
||||||
},
|
|
||||||
commands: [
|
commands: [
|
||||||
'python setup.py sdist bdist_wheel',
|
'git fetch -tq',
|
||||||
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
|
'poetry build',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -155,12 +175,15 @@ local PipelineBuildPackage = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'publish-pypi',
|
name: 'publish-pypi',
|
||||||
image: 'plugins/pypi',
|
image: 'python:3.9',
|
||||||
settings: {
|
commands: [
|
||||||
username: { from_secret: 'pypi_username' },
|
'git fetch -tq',
|
||||||
password: { from_secret: 'pypi_password' },
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
repository: 'https://upload.pypi.org/legacy/',
|
'poetry publish -n',
|
||||||
skip_build: true,
|
],
|
||||||
|
environment: {
|
||||||
|
POETRY_HTTP_BASIC_PYPI_USERNAME: { from_secret: 'pypi_username' },
|
||||||
|
POETRY_HTTP_BASIC_PYPI_PASSWORD: { from_secret: 'pypi_password' },
|
||||||
},
|
},
|
||||||
when: {
|
when: {
|
||||||
ref: ['refs/tags/**'],
|
ref: ['refs/tags/**'],
|
||||||
|
121
.drone.yml
121
.drone.yml
@ -7,12 +7,23 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: flake8
|
- name: yapf
|
||||||
image: python:3.8
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- git fetch -tq
|
||||||
- pip install -qq .
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- flake8 ./certbot_dns_corenetworks
|
- poetry install -q
|
||||||
|
- poetry run yapf -dr ./certbot_dns_corenetworks
|
||||||
|
environment:
|
||||||
|
PY_COLORS: 1
|
||||||
|
|
||||||
|
- name: flake8
|
||||||
|
image: python:3.9
|
||||||
|
commands:
|
||||||
|
- git fetch -tq
|
||||||
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
|
- poetry install -q
|
||||||
|
- poetry run flake8 ./certbot_dns_corenetworks
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
|
|
||||||
@ -34,63 +45,61 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: python27
|
- name: fetch
|
||||||
image: python:2.7
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- git fetch -tq
|
||||||
- pip install -qq .
|
|
||||||
- pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail
|
|
||||||
environment:
|
|
||||||
PY_COLORS: 1
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: python35
|
|
||||||
image: python:3.5
|
|
||||||
commands:
|
|
||||||
- pip install -r dev-requirements.txt -qq
|
|
||||||
- pip install -qq .
|
|
||||||
- pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail
|
|
||||||
environment:
|
|
||||||
PY_COLORS: 1
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: python36
|
- name: python36
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- pip install -qq .
|
- poetry install -q
|
||||||
- pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail
|
- poetry run pytest
|
||||||
|
- poetry version
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: python37
|
- name: python37
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- pip install -qq .
|
- poetry install -q
|
||||||
- pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail
|
- poetry run pytest
|
||||||
|
- poetry version
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: python38
|
- name: python38
|
||||||
image: python:3.8
|
image: python:3.8
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- pip install -qq .
|
- poetry install -q
|
||||||
- pytest tests --cov=certbot_dns_corenetworks --no-cov-on-fail
|
- poetry run pytest
|
||||||
|
- poetry version
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
|
- name: python39
|
||||||
|
image: python:3.9
|
||||||
|
commands:
|
||||||
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
|
- poetry install -q
|
||||||
|
- poetry run pytest
|
||||||
|
- poetry version
|
||||||
|
environment:
|
||||||
|
PY_COLORS: 1
|
||||||
|
depends_on:
|
||||||
|
- fetch
|
||||||
|
|
||||||
- name: codecov
|
- name: codecov
|
||||||
image: python:3.8
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- pip install codecov -qq
|
- pip install codecov -qq
|
||||||
- codecov --required -X gcov
|
- codecov --required -X gcov
|
||||||
@ -99,11 +108,10 @@ steps:
|
|||||||
from_secret: codecov_token
|
from_secret: codecov_token
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- python27
|
|
||||||
- python35
|
|
||||||
- python36
|
- python36
|
||||||
- python37
|
- python37
|
||||||
- python38
|
- python38
|
||||||
|
- python39
|
||||||
|
|
||||||
image_pull_secrets:
|
image_pull_secrets:
|
||||||
- docker_config
|
- docker_config
|
||||||
@ -127,11 +135,12 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: bandit
|
- name: bandit
|
||||||
image: python:3.8
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- pip install -r dev-requirements.txt -qq
|
- git fetch -tq
|
||||||
- pip install -qq .
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- bandit -r ./certbot_dns_corenetworks -x ./certbot_dns_corenetworks/test
|
- poetry install -q
|
||||||
|
- poetry run bandit -r ./certbot_dns_corenetworks -x ./certbot_dns_corenetworks/test
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
|
|
||||||
@ -157,11 +166,11 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: python:3.8
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- python setup.py sdist bdist_wheel
|
- git fetch -tq
|
||||||
environment:
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}
|
- poetry build
|
||||||
|
|
||||||
- name: checksum
|
- name: checksum
|
||||||
image: alpine
|
image: alpine
|
||||||
@ -184,13 +193,15 @@ steps:
|
|||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
- name: publish-pypi
|
- name: publish-pypi
|
||||||
image: plugins/pypi
|
image: python:3.9
|
||||||
settings:
|
commands:
|
||||||
password:
|
- git fetch -tq
|
||||||
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
|
- poetry publish -n
|
||||||
|
environment:
|
||||||
|
POETRY_HTTP_BASIC_PYPI_PASSWORD:
|
||||||
from_secret: pypi_password
|
from_secret: pypi_password
|
||||||
repository: https://upload.pypi.org/legacy/
|
POETRY_HTTP_BASIC_PYPI_USERNAME:
|
||||||
skip_build: true
|
|
||||||
username:
|
|
||||||
from_secret: pypi_username
|
from_secret: pypi_username
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
@ -250,6 +261,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: d107c344afb445a597ceee39eeb6ec40de5e7975391e23acd7c2b16d6c006025
|
hmac: 6ea9eef02934efbc69c11c53dabe8d0019ebc74e1a0f61348379ea2c30132438
|
||||||
|
|
||||||
...
|
...
|
||||||
|
19
.flake8
19
.flake8
@ -1,18 +1,3 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
ignore = D103, D107, W503
|
# Requires `flake8-colors`. This is the formatting suggested by the package (and used in flake8 repository itself).
|
||||||
max-line-length = 99
|
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
|
||||||
inline-quotes = double
|
|
||||||
exclude =
|
|
||||||
.git
|
|
||||||
.tox
|
|
||||||
__pycache__
|
|
||||||
build
|
|
||||||
dist
|
|
||||||
test*
|
|
||||||
*.pyc
|
|
||||||
*.egg-info
|
|
||||||
.cache
|
|
||||||
.eggs
|
|
||||||
env*
|
|
||||||
application-import-names = corenetworks
|
|
||||||
format = ${cyan}%(path)s:%(row)d:%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
|
|
||||||
|
16
README.md
16
README.md
@ -21,7 +21,7 @@ pip install certbot-dns-corenetworks
|
|||||||
To start using DNS authentication for the Core Networks DNS API, pass the following arguments on certbot's command line:
|
To start using DNS authentication for the Core Networks DNS API, pass the following arguments on certbot's command line:
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
|----------------------------------------------------------------------|--------------------------------------------------|
|
| ----------------------------------------------------------------- | ------------------------------------------------ |
|
||||||
| `--authenticator certbot-dns-corenetworks:dns-corenetworks` | select the authenticator plugin (Required) |
|
| `--authenticator certbot-dns-corenetworks:dns-corenetworks` | select the authenticator plugin (Required) |
|
||||||
| `--certbot-dns-corenetworks:dns-corenetworks-credentials` | Hetzner DNS API credentials INI file. (Required) |
|
| `--certbot-dns-corenetworks:dns-corenetworks-credentials` | Hetzner DNS API credentials INI file. (Required) |
|
||||||
| `--certbot-dns-corenetworks:dns-corenetworks-propagation-seconds` | Seconds to wait for the TXT record to propagate |
|
| `--certbot-dns-corenetworks:dns-corenetworks-propagation-seconds` | Seconds to wait for the TXT record to propagate |
|
||||||
@ -38,18 +38,18 @@ certbot_dns_corenetworks:dns_corenetworks_password = secure_passwor
|
|||||||
To acquire a certificate for `example.com`
|
To acquire a certificate for `example.com`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
certbot certonly \\
|
certbot certonly \
|
||||||
--authenticator certbot-dns-corenetworks:dns-corenetworks \\
|
--authenticator certbot-dns-corenetworks:dns-corenetworks \
|
||||||
--certbot-dns-corenetworks:dns-corenetworks-credentials /path/to/my/credentials.ini \\
|
--certbot-dns-corenetworks:dns-corenetworks-credentials /path/to/my/credentials.ini \
|
||||||
-d example.com
|
-d example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
To acquire a certificate for ``*.example.com``
|
To acquire a certificate for `*.example.com`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
certbot certonly \\
|
certbot certonly \
|
||||||
--authenticator certbot-dns-corenetworks:dns-corenetworks \\
|
--authenticator certbot-dns-corenetworks:dns-corenetworks \
|
||||||
--certbot-dns-corenetworks:dns-corenetworks-credentials /path/to/my/credentials.ini \\
|
--certbot-dns-corenetworks:dns-corenetworks-credentials /path/to/my/credentials.ini \
|
||||||
-d '*.example.com'
|
-d '*.example.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""Default package."""
|
"""Default package."""
|
||||||
|
|
||||||
__author__ = "Robert Kaussow"
|
__version__ = "0.0.0"
|
||||||
__project__ = "certbot_dns_corenetworks"
|
|
||||||
__license__ = "MIT"
|
|
||||||
__maintainer__ = "Robert Kaussow"
|
|
||||||
__email__ = "mail@thegeeklab.de"
|
|
||||||
__url__ = "https://github.com/thegeeklab/certbot-dns-corenetworks"
|
|
||||||
__version__ = "0.1.4"
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import zope.interface # noqa
|
import zope.interface
|
||||||
from certbot import errors
|
from certbot import errors
|
||||||
from certbot import interfaces
|
from certbot import interfaces
|
||||||
from certbot.plugins import dns_common
|
from certbot.plugins import dns_common
|
||||||
@ -33,7 +33,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
|||||||
self.credentials = None
|
self.credentials = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def add_parser_arguments(cls, add): # noqa
|
def add_parser_arguments(cls, add):
|
||||||
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=60)
|
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=60)
|
||||||
add(
|
add(
|
||||||
"credentials",
|
"credentials",
|
||||||
@ -41,7 +41,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
|||||||
default="/etc/letsencrypt/corenetworks.cfg"
|
default="/etc/letsencrypt/corenetworks.cfg"
|
||||||
)
|
)
|
||||||
|
|
||||||
def more_info(self): # noqa
|
def more_info(self):
|
||||||
return "This plugin configures a DNS TXT record to respond to a dns-01 challenge using " \
|
return "This plugin configures a DNS TXT record to respond to a dns-01 challenge using " \
|
||||||
"the Core Networks DNS API."
|
"the Core Networks DNS API."
|
||||||
|
|
||||||
|
0
certbot_dns_corenetworks/test/unit/__init__.py
Normal file
0
certbot_dns_corenetworks/test/unit/__init__.py
Normal file
@ -34,7 +34,6 @@ class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthentic
|
|||||||
self.auth = Authenticator(self.config, "corenetworks")
|
self.auth = Authenticator(self.config, "corenetworks")
|
||||||
|
|
||||||
self.mock_client = mock.MagicMock()
|
self.mock_client = mock.MagicMock()
|
||||||
# _get_corenetworks_client | pylint: disable=protected-access
|
|
||||||
self.auth._get_corenetworks_client = mock.MagicMock(return_value=self.mock_client)
|
self.auth._get_corenetworks_client = mock.MagicMock(return_value=self.mock_client)
|
||||||
|
|
||||||
def test_perform(self):
|
def test_perform(self):
|
||||||
@ -46,7 +45,6 @@ class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthentic
|
|||||||
self.assertEqual(expected, self.mock_client.mock_calls)
|
self.assertEqual(expected, self.mock_client.mock_calls)
|
||||||
|
|
||||||
def test_cleanup(self):
|
def test_cleanup(self):
|
||||||
# _attempt_cleanup | pylint: disable=protected-access
|
|
||||||
self.auth.nameCache["_acme-challenge." + DOMAIN] = "_acme-challenge." + DOMAIN
|
self.auth.nameCache["_acme-challenge." + DOMAIN] = "_acme-challenge." + DOMAIN
|
||||||
self.auth._attempt_cleanup = True
|
self.auth._attempt_cleanup = True
|
||||||
self.auth.cleanup([self.achall])
|
self.auth.cleanup([self.achall])
|
@ -1,20 +0,0 @@
|
|||||||
pydocstyle
|
|
||||||
flake8
|
|
||||||
flake8-colors
|
|
||||||
flake8-blind-except
|
|
||||||
flake8-builtins
|
|
||||||
flake8-docstrings
|
|
||||||
flake8-isort
|
|
||||||
flake8-logging-format
|
|
||||||
flake8-polyfill
|
|
||||||
flake8-quotes
|
|
||||||
flake8-pep3101
|
|
||||||
flake8-eradicate; python_version >= "3.6"
|
|
||||||
pep8-naming
|
|
||||||
wheel
|
|
||||||
mock
|
|
||||||
pytest
|
|
||||||
pytest-mock
|
|
||||||
pytest-cov
|
|
||||||
bandit
|
|
||||||
yapf
|
|
1445
poetry.lock
generated
Normal file
1445
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
94
pyproject.toml
Normal file
94
pyproject.toml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
authors = ["Robert Kaussow <mail@thegeeklab.de>"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Environment :: Plugins",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Operating System :: POSIX",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Topic :: Security",
|
||||||
|
"Topic :: System :: Networking",
|
||||||
|
"Topic :: Utilities",
|
||||||
|
]
|
||||||
|
description = "Core Networks DNS Authenticator plugin for Certbot."
|
||||||
|
documentation = "https://github.com/thegeeklab/certbot-dns-corenetworks/"
|
||||||
|
homepage = "https://github.com/thegeeklab/certbot-dns-corenetworks/"
|
||||||
|
include = [
|
||||||
|
"LICENSE",
|
||||||
|
]
|
||||||
|
keywords = ["dns", "certbot", "automation", "corenetworks"]
|
||||||
|
license = "MIT"
|
||||||
|
name = "certbot-dns-corenetworks"
|
||||||
|
packages = [
|
||||||
|
{include = "certbot_dns_corenetworks"},
|
||||||
|
]
|
||||||
|
|
||||||
|
readme = "README.md"
|
||||||
|
repository = "https://github.com/thegeeklab/certbot-dns-corenetworks/"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
|
[tool.poetry.plugins."certbot.plugins"]
|
||||||
|
dns-corenetworks = "certbot_dns_corenetworks.dns_corenetworks:Authenticator"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
acme = "^1.10.1"
|
||||||
|
certbot = "^1.10.1 "
|
||||||
|
corenetworks = "^0.1.4"
|
||||||
|
parsedatetime = "^2.6"
|
||||||
|
python = "^3.6.0"
|
||||||
|
"zope.interface" = "^5.2.0"
|
||||||
|
|
||||||
|
[tool.poetry.dev-dependencies]
|
||||||
|
bandit = "^1.7.0"
|
||||||
|
flake8 = "^3.8.4"
|
||||||
|
flake8-blind-except = "^0.1.1"
|
||||||
|
flake8-builtins = "^1.5.3"
|
||||||
|
flake8-colors = "^0.1.9"
|
||||||
|
flake8-docstrings = "^1.5.0"
|
||||||
|
flake8-eradicate = "^1.0.0"
|
||||||
|
flake8-isort = "^4.0.0"
|
||||||
|
flake8-logging-format = "^0.6.0"
|
||||||
|
flake8-pep3101 = "^1.3.0"
|
||||||
|
flake8-polyfill = "^1.0.2"
|
||||||
|
flake8-quotes = "^3.2.0"
|
||||||
|
mock = "^4.0.3"
|
||||||
|
pep8-naming = "^0.11.1"
|
||||||
|
pydocstyle = "^5.1.1"
|
||||||
|
pytest = "^6.2.1"
|
||||||
|
pytest-cov = "^2.10.1"
|
||||||
|
pytest-mock = "^3.4.0"
|
||||||
|
yapf = "^0.30.0"
|
||||||
|
|
||||||
|
[tool.poetry-dynamic-versioning]
|
||||||
|
enable = true
|
||||||
|
style = "semver"
|
||||||
|
vcs = "git"
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
default_section = "THIRDPARTY"
|
||||||
|
force_single_line = true
|
||||||
|
line_length = 99
|
||||||
|
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||||
|
skip_glob = ["**/.env*", "**/env/*", "**/docs/*"]
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = "certbot_dns_corenetworks --cov=certbot_dns_corenetworks --cov-report=xml:coverage.xml --cov-report=term --cov-append --no-cov-on-fail"
|
||||||
|
filterwarnings = [
|
||||||
|
"ignore::FutureWarning",
|
||||||
|
"ignore:.*collections.*:DeprecationWarning",
|
||||||
|
"ignore:.*pep8.*:FutureWarning",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
omit = ["**/test/*"]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
40
setup.cfg
40
setup.cfg
@ -1,17 +1,20 @@
|
|||||||
[metadata]
|
[flake8]
|
||||||
description-file = README.md
|
# Explanation of errors
|
||||||
license_file = LICENSE
|
#
|
||||||
|
# D102: Missing docstring in public method
|
||||||
[bdist_wheel]
|
# D103: Missing docstring in public function
|
||||||
universal = 1
|
# D107: Missing docstring in __init__
|
||||||
|
# D202: No blank lines allowed after function docstring
|
||||||
[isort]
|
# W503:Line break occurred before a binary operator
|
||||||
default_section = THIRDPARTY
|
ignore = D102, D103, D107, D202, W503
|
||||||
known_first_party = certbot_dns_corenetworks
|
max-line-length = 99
|
||||||
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
inline-quotes = double
|
||||||
force_single_line = true
|
exclude = .git, __pycache__, build, dist, test, *.pyc, *.egg-info, .cache, .eggs, env*
|
||||||
line_length = 99
|
# NOTE: The format for flake8 output is set in the `.flake8` file. This is separate
|
||||||
skip_glob = **/.env*,**/env/*,**/docs/*
|
# because `setup.cfg` is parsed on setup, but it would require flake8-colors
|
||||||
|
# to run successfully (which will only be available after install). So we define
|
||||||
|
# it in `.flake8`, and it seems to successfully combine the settings in the
|
||||||
|
# two files together.
|
||||||
|
|
||||||
[yapf]
|
[yapf]
|
||||||
based_on_style = google
|
based_on_style = google
|
||||||
@ -19,12 +22,3 @@ column_limit = 99
|
|||||||
dedent_closing_brackets = true
|
dedent_closing_brackets = true
|
||||||
coalesce_brackets = true
|
coalesce_brackets = true
|
||||||
split_before_logical_operator = true
|
split_before_logical_operator = true
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
filterwarnings =
|
|
||||||
ignore::FutureWarning
|
|
||||||
ignore:.*collections.*:DeprecationWarning
|
|
||||||
ignore:.*pep8.*:FutureWarning
|
|
||||||
|
|
||||||
[coverage:run]
|
|
||||||
omit = **/test/*
|
|
||||||
|
80
setup.py
80
setup.py
@ -1,80 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""Setup script for the package."""
|
|
||||||
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
from setuptools import find_packages
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
PACKAGE_NAME = "certbot_dns_corenetworks"
|
|
||||||
|
|
||||||
|
|
||||||
def get_property(prop, project):
|
|
||||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
result = re.search(
|
|
||||||
r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
|
|
||||||
open(os.path.join(current_dir, project, "__init__.py")).read(),
|
|
||||||
)
|
|
||||||
return result.group(1)
|
|
||||||
|
|
||||||
|
|
||||||
def get_readme(filename="README.md"):
|
|
||||||
this = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
with io.open(os.path.join(this, filename), encoding="utf-8") as f:
|
|
||||||
long_description = f.read()
|
|
||||||
return long_description
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name=get_property("__project__", PACKAGE_NAME),
|
|
||||||
description="Core Networks DNS Authenticator plugin for Certbot",
|
|
||||||
keywords="dns, certbot, automation, corenetworks",
|
|
||||||
version=get_property("__version__", PACKAGE_NAME),
|
|
||||||
author=get_property("__author__", PACKAGE_NAME),
|
|
||||||
author_email=get_property("__email__", PACKAGE_NAME),
|
|
||||||
url=get_property("__url__", PACKAGE_NAME),
|
|
||||||
license=get_property("__license__", PACKAGE_NAME),
|
|
||||||
long_description=get_readme(),
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
packages=find_packages(exclude=["*.test", "test", "test.*"]),
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=False,
|
|
||||||
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4",
|
|
||||||
entry_points={
|
|
||||||
"certbot.plugins": [
|
|
||||||
"dns-corenetworks = certbot_dns_corenetworks.dns_corenetworks:Authenticator"
|
|
||||||
],
|
|
||||||
},
|
|
||||||
classifiers=[
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
|
||||||
"Environment :: Plugins",
|
|
||||||
"Intended Audience :: System Administrators",
|
|
||||||
"Intended Audience :: Developers",
|
|
||||||
"License :: OSI Approved :: MIT License",
|
|
||||||
"Natural Language :: English",
|
|
||||||
"Operating System :: POSIX",
|
|
||||||
"Programming Language :: Python :: 2",
|
|
||||||
"Programming Language :: Python :: 2.7",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Programming Language :: Python :: 3.5",
|
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"Programming Language :: Python :: 3.7",
|
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Topic :: Security",
|
|
||||||
"Topic :: System :: Networking",
|
|
||||||
"Topic :: Utilities",
|
|
||||||
],
|
|
||||||
# FIXME: https://github.com/bear/parsedatetime/pull/247
|
|
||||||
install_requires=[
|
|
||||||
"acme",
|
|
||||||
'parsedatetime<2.6; python_version < "3"',
|
|
||||||
"certbot>=0.15",
|
|
||||||
"setuptools",
|
|
||||||
"zope.interface",
|
|
||||||
"corenetworks>=0.1.4",
|
|
||||||
],
|
|
||||||
dependency_links=[],
|
|
||||||
)
|
|
Loading…
Reference in New Issue
Block a user