Skip to content

Commit 8fa0c0a

Browse files
committed
Remove support for Python 2 and pre-Matrix versions of Kodi
1 parent d08c4bd commit 8fa0c0a

File tree

8 files changed

+16
-56
lines changed

8 files changed

+16
-56
lines changed

.github/workflows/addon-check.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
kodi-branch: [krypton, leia, matrix]
12+
kodi-branch: [matrix, nexus, omega]
1313
steps:
1414
- uses: actions/checkout@v2
1515
with:
@@ -27,12 +27,5 @@ jobs:
2727
- name: Remove unwanted files
2828
run: awk '/export-ignore/ { print $1 }' .gitattributes | xargs rm -rf --
2929
working-directory: ${{ github.repository }}
30-
- name: Rewrite addon.xml for Matrix
31-
run: |
32-
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
33-
version=$(xmllint --xpath 'string(/addon/@version)' addon.xml)
34-
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.99" addon.xml
35-
working-directory: ${{ github.repository }}
36-
if: matrix.kodi-branch == 'matrix'
3730
- name: Run kodi-addon-checker
3831
run: kodi-addon-checker --branch=${{ matrix.kodi-branch }} ${{ github.repository }}/

.github/workflows/ci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ ubuntu-latest ]
21-
python-version: [ '2.7', '3.7', '3.8', '3.9', '3.10', '3.11' ]
22-
include:
23-
# End-of-life Python versions are not available anymore with ubuntu-latest
24-
- os: ubuntu-20.04
25-
python-version: '3.5'
26-
- os: ubuntu-20.04
27-
python-version: '3.6'
21+
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
2822
steps:
2923
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
3024
uses: actions/checkout@v2
@@ -47,10 +41,8 @@ jobs:
4741
- name: Check for untranslated strings
4842
run: make check-untranslated
4943
continue-on-error: true
50-
# Python 2.7 and Python 3.5 are no longer supported by proxy.py
51-
- name: Start proxy server, when supported
44+
- name: Start proxy server
5245
run: python -m proxy --threaded --hostname 127.0.0.1 --log-level DEBUG &
53-
if: matrix.python-version != '2.7' && matrix.python-version != '3.5'
5446
- name: Run unit tests
5547
run: coverage run -m unittest discover
5648
- name: Run addon using cli

.github/workflows/release.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ jobs:
1414
run: |
1515
sudo apt-get update
1616
sudo apt-get install libxml2-utils
17-
make multizip release=1
18-
- name: Get Krypton filename
19-
id: get-krypton-filename
20-
run: |
21-
echo ::set-output name=krypton-filename::$(cd ..;ls script.module.inputstreamhelper*.zip | grep -v '+matrix.' | head -1)
17+
make zip release=1
2218
- name: Get Matrix filename
2319
id: get-matrix-filename
2420
run: |
25-
echo ::set-output name=matrix-filename::$(cd ..;ls script.module.inputstreamhelper*+matrix.*.zip | head -1)
21+
echo ::set-output name=matrix-filename::$(cd ..;ls script.module.inputstreamhelper*.zip | head -1)
2622
- name: Get body
2723
id: get-body
2824
run: |
@@ -43,16 +39,6 @@ jobs:
4339
body: ${{ steps.get-body.outputs.body }}
4440
draft: false
4541
prerelease: false
46-
- name: Upload Krypton/Leia zip
47-
id: upload-krypton-zip
48-
uses: actions/upload-release-asset@v1
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
with:
52-
upload_url: ${{ steps.create_release.outputs.upload_url }}
53-
asset_name: ${{ steps.get-krypton-filename.outputs.krypton-filename }}
54-
asset_path: ../${{ steps.get-krypton-filename.outputs.krypton-filename }}
55-
asset_content_type: application/zip
5642
- name: Upload Matrix zip
5743
id: upload-matrix-zip
5844
uses: actions/upload-release-asset@v1
@@ -65,12 +51,12 @@ jobs:
6551
asset_content_type: application/zip
6652
- name: Generate distribution zip and submit to official kodi repository
6753
id: kodi-addon-submitter
68-
uses: mediaminister/action-kodi-addon-submitter@master
54+
uses: xbmc/action-kodi-addon-submitter@master
6955
with:
7056
kodi-repository: repo-scripts
71-
kodi-version: krypton
57+
kodi-version: matrix
7258
addon-id: script.module.inputstreamhelper
73-
kodi-matrix: true
59+
kodi-matrix: false
7460
env:
7561
GH_USERNAME: ${{secrets.GH_USERNAME}}
7662
GH_TOKEN: ${{secrets.GH_TOKEN}}

.github/workflows/status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
2020
uses: actions/checkout@v2
21-
- name: Set up Python ${{ matrix.python-version }}
21+
- name: Set up Python
2222
uses: actions/setup-python@v1
2323
- name: Install dependencies
2424
run: |

Makefile

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export PYTHONPATH := $(CURDIR)/lib/:$(CURDIR)/tests/
22
PYTHON := python
3-
KODI_PYTHON_ABIS := 3.0.0 2.25.0
43

54
name = $(shell xmllint --xpath 'string(/addon/@id)' addon.xml)
65
version = $(shell xmllint --xpath 'string(/addon/@version)' addon.xml)
76
git_branch = $(shell git rev-parse --abbrev-ref HEAD)
87
git_hash = $(shell git rev-parse --short HEAD)
9-
matrix = $(findstring $(shell xmllint --xpath 'string(/addon/requires/import[@addon="xbmc.python"]/@version)' addon.xml), $(word 1,$(KODI_PYTHON_ABIS)))
8+
9+
kodi_branch ?= matrix
1010

1111
ifdef release
1212
zip_name = $(name)-$(version).zip
@@ -53,8 +53,7 @@ check-untranslated:
5353

5454
check-addon: clean
5555
@echo -e "$(white)=$(blue) Starting sanity addon tests$(reset)"
56-
kodi-addon-checker . --branch=krypton
57-
kodi-addon-checker . --branch=leia
56+
kodi-addon-checker . --branch=$(kodi_branch)
5857

5958
kill-proxy:
6059
-pkill -ef '$(PYTHON) -m proxy'
@@ -78,15 +77,6 @@ build: clean
7877
cd ..; zip -r $(zip_name) $(include_paths) -x $(exclude_files)
7978
@echo -e "$(white)=$(blue) Successfully wrote package as: $(white)../$(zip_name)$(reset)"
8079

81-
multizip: clean
82-
@-$(foreach abi,$(KODI_PYTHON_ABIS), \
83-
echo "cd /addon/requires/import[@addon='xbmc.python']/@version\nset $(abi)\nsave\nbye" | xmllint --shell addon.xml; \
84-
matrix=$(findstring $(abi), $(word 1,$(KODI_PYTHON_ABIS))); \
85-
if [ $$matrix ]; then version=$(version)+matrix.1; else version=$(version); fi; \
86-
echo "cd /addon/@version\nset $$version\nsave\nbye" | xmllint --shell addon.xml; \
87-
make zip; \
88-
)
89-
9080
clean:
9181
@echo -e "$(white)=$(blue) Cleaning up$(reset)"
9282
find . -name '*.py[cod]' -type f -delete

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<addon id="script.module.inputstreamhelper" name="InputStream Helper" version="0.6.1" provider-name="emilsvennesson, dagwieers, mediaminister, horstle">
33
<requires>
44
<!--py3 compliant-->
5-
<import addon="xbmc.python" version="2.25.0"/>
5+
<import addon="xbmc.python" version="3.0.0"/>
66
<import addon="script.module.pysocks" version="1.6.8" optional="true"/>
77
</requires>
88
<!-- This is needed to get an add-on icon -->

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
coverage
22
kodi-addon-checker
33
polib
4-
proxy.py; python_version != '2.7'
4+
proxy.py
55
pylint
66
setuptools >= 41
77
tox
8-
xmlschema==1.0.18; python_version == '2.7'

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py35,py36,py37,py38,flake8
2+
envlist = py37,py38,py39,py310,py311,flake8
33
skipsdist = True
44
skip_missing_interpreters = True
55

@@ -16,7 +16,7 @@ builtins = func
1616
max-line-length = 160
1717
ignore = E129,FI13,FI50,FI51,FI53,FI54,W503
1818
require-code = True
19-
min-version = 2.7
19+
min-version = 3.7
2020
exclude = .tox,experiment
2121

2222
[pytest]

0 commit comments

Comments
 (0)