From 22a292386b75d75118f41fe5100e1a0cb65cfd4e Mon Sep 17 00:00:00 2001 From: Manuel Kea Baldassarri Date: Sat, 21 Dec 2024 13:59:57 +0100 Subject: [PATCH 1/2] Upgrade to snapcraft core24 and certbot >=2.12 --- .gitignore | 2 ++ pyproject.toml | 6 ++++++ setup.py | 5 ++++- snapcraft.yaml | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index e317db5..034cb98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +.venv +.tox dist certbot_nginx_unit.egg-info \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 556ca9f..bee753b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,12 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Intended Audience :: System Administrators", "Topic :: Security :: Cryptography", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Security", + "Topic :: System :: Installation/Setup", + "Topic :: System :: Networking", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Operating System :: OS Independent", diff --git a/setup.py b/setup.py index f0ca008..1ba2faf 100644 --- a/setup.py +++ b/setup.py @@ -7,13 +7,16 @@ "pytest", ] +certbot_version = '2.12.0.dev0' + install_requires = [] if not os.environ.get("SNAP_BUILD"): - install_requires.extend(["acme>=1.21", "certbot>=1.21"]) + install_requires.extend([f'acme>={certbot_version}', f'certbot>={certbot_version}']) else: install_requires.append("packaging") setup( + python_requires='>=3.8', packages=find_packages(), install_requires=install_requires, extras_require={ diff --git a/snapcraft.yaml b/snapcraft.yaml index 25ca338..df6b505 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -6,24 +6,24 @@ description: | See https://github.com/kea/certbot-nginx-unit for installation and usage instructions. confinement: strict grade: stable -base: core20 +base: core24 adopt-info: certbot-nginx-unit license: MIT website: https://github.com/kea/certbot-nginx-unit issues: https://github.com/kea/certbot-nginx-unit/issues -architectures: - - build-on: amd64 - - build-on: armhf - - build-on: arm64 +platforms: + amd64: + armhf: + arm64: parts: certbot-nginx-unit: plugin: python source: . override-build: | - snapcraftctl build - snapcraftctl set-version `grep " version =" $SNAPCRAFT_PART_BUILD/version.py | cut -f3 -d= | tr -d "'[:space:]"` + craftctl build + craftctl set version=$(grep " version =" $CRAFT_PART_BUILD/version.py | cut -f3 -d= | tr -d "'[:space:]") build-packages: - git build-environment: @@ -33,15 +33,15 @@ parts: source: . stage: [ setup.py, certbot-shared ] override-pull: | - snapcraftctl pull - mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared + craftctl default + mkdir -p $CRAFT_PART_SRC/certbot-shared slots: certbot: interface: content content: certbot-1 read: - - $SNAP/lib/python3.8/site-packages + - $SNAP/lib/python3.12/site-packages plugs: certbot-metadata: From b56b05513c2616b14b6a13d79d963334db1c17a7 Mon Sep 17 00:00:00 2001 From: Manuel Kea Baldassarri Date: Sat, 21 Dec 2024 14:11:19 +0100 Subject: [PATCH 2/2] Add dynamic dependencies and remove python version requirement config --- pyproject.toml | 2 +- setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bee753b..b13d370 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ "Environment :: Plugins", "Operating System :: OS Independent", ] -dynamic = ["optional-dependencies", "version"] +dynamic = ["dependencies", "version"] [project.urls] Homepage = "https://github.com/kea/certbot-nginx-unit" diff --git a/setup.py b/setup.py index 1ba2faf..df66fe6 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,6 @@ install_requires.append("packaging") setup( - python_requires='>=3.8', packages=find_packages(), install_requires=install_requires, extras_require={