summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2022-12-01 22:17:16 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2022-12-01 22:39:10 +0000
commit2a945de0695ba0a5bf2d928ce4bd541d0f5cf2a8 (patch)
tree7f08f9d79a6e095f047476eb9316c10d76d6f18d
parentd0acd3e06ea4c1cefe00c189c512e33289336005 (diff)
downloaddeluge-2a945de0695ba0a5bf2d928ce4bd541d0f5cf2a8.tar.gz
deluge-2a945de0695ba0a5bf2d928ce4bd541d0f5cf2a8.tar.bz2
deluge-2a945de0695ba0a5bf2d928ce4bd541d0f5cf2a8.zip
[CI] Fix tests stalling/timing out
GitHub pytest runner stalling with the following error: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/deluge/plugins' This is related to the editable install of Deluge via pip pip install -e . and the custom resource_filename in deluge.common is the source of the problem where a DistInfoDistribution returns a different path to EggInfoDistribution. Working egg-info install >>> pkg_resources.get_distribution('Deluge') deluge 2.1.1.dev8 (/home/user/deluge) >>> type(pkg_resources.get_distribution('Deluge')) <class 'pkg_resources.EggInfoDistribution'> >>> pkg_resources.resource_filename('deluge', 'plugins') '/home/user/deluge/deluge/plugins' This can identified by the `deluge.egg-info` directory in source directory. Broken dist-info install >>> pkg_resources.get_distribution('Deluge') deluge 2.1.1.dev8 (/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages) >>> type(pkg_resources.get_distribution('Deluge')) <class 'pkg_resources.DistInfoDistribution'> >>> pkg_resources.resource_filename('deluge', 'plugins') '/home/user/deluge/deluge/plugins' This can be worked around by setting an env var that enables legacy mode but long-term need to replace the custom resource_filename and replace usage of pkg_resources. https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior https://setuptools.pypa.io/en/latest/pkg_resources.html
-rw-r--r--.github/workflows/ci.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 82a9fd99a..adf156e71 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,6 +7,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
+env:
+ SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
+
jobs:
test-linux:
runs-on: ubuntu-20.04