From 490174a01654f5dbe0c80908dc8295926cbea060 Mon Sep 17 00:00:00 2001 From: lovetox Date: Sat, 21 May 2022 20:16:48 +0200 Subject: ci: Remove sdist script Plugin installer does not exist anymore, so we can execute sdist directly --- .ci/sdist.py | 56 -------------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100755 .ci/sdist.py (limited to '.ci') diff --git a/.ci/sdist.py b/.ci/sdist.py deleted file mode 100755 index 513338c91..000000000 --- a/.ci/sdist.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 - -import io -import requests -import shutil -import subprocess -import zipfile -from pathlib import Path - -from rich.console import Console - -console = Console() - - -PLUGINS = [ - 'plugin_installer', -] - -PLUGINS_BASE_URL = 'https://ftp.gajim.org' -PLUGINS_FOLDER = Path('./gajim/data/plugins') - - -def get_plugins_url(plugin: str) -> str: - return f'{PLUGINS_BASE_URL}/plugins_master_zip/{plugin}.zip' - - -def extraxt_zip(zip_bytes: bytes, path: Path) -> None: - console.print('Extract to', path) - with zipfile.ZipFile(io.BytesIO(zip_bytes)) as zip_file: - zip_file.extractall(path) - - -def download_plugins() -> None: - PLUGINS_FOLDER.mkdir(parents=True) - for plugin in PLUGINS: - url = get_plugins_url(plugin) - console.print('Download', url) - req = requests.get(url) - req.raise_for_status() - extraxt_zip(req.content, PLUGINS_FOLDER) - - -def setup() -> None: - console.print('Setup') - subprocess.call(['python3', 'setup.py', 'sdist']) - - -def cleanup() -> None: - console.print('Cleanup') - shutil.rmtree(PLUGINS_FOLDER) - - -if __name__ == '__main__': - download_plugins() - setup() - cleanup() -- cgit v1.2.3