From 328565b5d8f00a7955a6cfe8d95209d581dc9d51 Mon Sep 17 00:00:00 2001 From: Devon R Date: Thu, 2 Nov 2023 02:20:19 +0900 Subject: [PATCH] Fix release pipeline for latest Python & GHA image --- .github/workflows/deploy.yml | 1 + create_dist_summary.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fb315021..625a6ee2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -108,6 +108,7 @@ jobs: - name: Install dependencies shell: bash run: | + sudo apt-get update && sudo apt-get install -y hub python -m pip install --upgrade pip setuptools wheel export tag_name="${GITHUB_REF##*/}" pip install -U ".[publish]" diff --git a/create_dist_summary.py b/create_dist_summary.py index d2293330..74986332 100644 --- a/create_dist_summary.py +++ b/create_dist_summary.py @@ -26,12 +26,12 @@ """ import hashlib +import importlib.metadata import os import pathlib import subprocess import typing -import pkg_resources from jinja2 import Environment from jinja2.environment import Template from jinja2.loaders import BaseLoader @@ -91,7 +91,7 @@ class File(typing.NamedTuple): with open('dist/DIST_SUMMARY.md', 'w', encoding='utf-8') as fp: output = template.render( env=os.getenv, - package=pkg_resources.get_distribution('jishaku'), + package=importlib.metadata.distribution('jishaku'), files=FILES, last_version=last_version, commit_hash=commit_hash,