diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 1577709..0e44709 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -27,6 +27,6 @@ jobs: TWINE_USERNAME: ${{ secrets.GEMFURY_USERNAME }} TWINE_PASSWORD: ${{ secrets.GEMFURY_PUSH_TOKEN }} run: | - pip install -U pip "setuptools<82" twine wheel + pip install -U pip setuptools twine wheel make upload diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 29642bc..3771fb2 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -28,7 +28,7 @@ jobs: - name: Build me run: | - pip install -U pip "setuptools<82" wheel twine + pip install -U pip setuptools wheel twine make package diff --git a/README.rst b/README.rst index 10b1c37..4b93451 100644 --- a/README.rst +++ b/README.rst @@ -107,6 +107,13 @@ Then configure how the application interacts with GitHub: Changelog --------- +v2.2.1 (23 May 2026) +~~~~~~~~~~~~~~~~~~~~ + +- Make this code compatible with setuptools>=82 +- Pin multiple transitive dependencies + + v2.2.0 (16 Apr 2026) ~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index b1672f3..035a333 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_install_requires(path): setup( name='kiwitcms-github-app', - version='2.2.0', + version='2.2.1', description='GitHub App integration for Kiwi TCMS', long_description=get_long_description(), author='Kiwi TCMS', diff --git a/test_project/settings.py b/test_project/settings.py index 6f7a8e8..787f85d 100644 --- a/test_project/settings.py +++ b/test_project/settings.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 Alexander Todorov +# Copyright (c) 2019-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -8,6 +8,35 @@ import os import sys +from importlib.metadata import Distribution, DistributionFinder + + +# pretend this is a plugin during testing & development +# IT NEEDS TO BE BEFORE the wildcard import below !!! +# .egg-info/ directory will mess up with this +class FakePluginFinder(DistributionFinder): + class FakeDistribution(Distribution): # pylint: disable=nested-class-found + def read_text(self, filename): + if filename == "METADATA": + return """Name: kiwitcms_github_app +Version: 0.1 +""" + if filename == "entry_points.txt": + return """ +[kiwitcms.plugins] +kiwitcms_github_app=tcms_github_app +""" + + return "" + + def locate_file(self, path): + raise RuntimeError("This distribution has no file system") + + def find_distributions(self, context=DistributionFinder.Context()): + yield self.FakeDistribution() + + +sys.meta_path.append(FakePluginFinder()) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -15,27 +44,16 @@ # so we can load multi_tenant.py first! home_dir = os.path.expanduser("~") removed_paths = [] -for path in sys.path: - if path.startswith(home_dir) and path.find('site-packages') == -1: - removed_paths.append(path) +for a_path in sys.path: + if a_path.startswith(home_dir) and a_path.find('site-packages') == -1: + removed_paths.append(a_path) -for path in removed_paths: - sys.path.remove(path) +for a_path in removed_paths: + sys.path.remove(a_path) # re add them again sys.path.extend(removed_paths) -import pkg_resources - -# pretend this is a plugin during testing & development -# IT NEEDS TO BE BEFORE the wildcard import below !!! -# .egg-info/ directory will mess up with this -dist = pkg_resources.Distribution(__file__) -entry_point = pkg_resources.EntryPoint.parse('kiwitcms_github_app = tcms_github_app', - dist=dist) -dist._ep_map = {'kiwitcms.plugins': {'kiwitcms_github_app': entry_point}} -pkg_resources.working_set.add(dist) - from tcms.settings.product import * # noqa: F403 # check for a clean devel environment