Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
52 changes: 35 additions & 17 deletions test_project/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2019-2026 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
Expand All @@ -8,34 +8,52 @@

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__))

# site-packages/tcms_settings_dir/ must be before ./tcms_settings_dir/
# 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
Expand Down
Loading