diff options
author | lovetox <philipp@hoerist.com> | 2022-05-21 21:16:48 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-05-21 21:19:50 +0300 |
commit | 490174a01654f5dbe0c80908dc8295926cbea060 (patch) | |
tree | b28ee522e0152fe3e4d137dfb109d7163fbb17d0 /.ci | |
parent | c799dbff91076b792fadc4236b6d415197cfe932 (diff) |
ci: Remove sdist script
Plugin installer does not exist anymore, so we can execute sdist directly
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/sdist.py | 56 |
1 files changed, 0 insertions, 56 deletions
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() |