Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pako for openSUSE:Factory checked in at 2022-10-06 07:42:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pako (Old) and /work/SRC/openSUSE:Factory/.python-pako.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pako" Thu Oct 6 07:42:02 2022 rev:2 rq:1008145 version:0.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pako/python-pako.changes 2019-06-01 09:55:10.839207919 +0200 +++ /work/SRC/openSUSE:Factory/.python-pako.new.2275/python-pako.changes 2022-10-06 07:42:12.640688184 +0200 @@ -1,0 +2,18 @@ +Tue Oct 4 18:31:22 UTC 2022 - Yogalakshmi Arunachalam <[email protected]> + +- Update to Version 0.3.1 + Adds an optional no-confirm flag particularly for use in non-interactive setups. + +------------------------------------------------------------------- +Tue Oct 4 18:28:43 UTC 2022 - Yogalakshmi Arunachalam <[email protected]> + +- Update to Version 0.3.0 + Adds support for the following package managers: + DNF (as used by RPM based distributions) + RPM-ostree (as used by Fedora CoreOS and RHEL CoreOS) + Pacman (as used by Arch based distributions) + Yum (as used by some RPM based distributions) + Zypper (as used by OpenSUSE based distributions) + APK (as used by Alpine Linux and postmarketOS) + +------------------------------------------------------------------- Old: ---- pako-0.2.3.tar.gz New: ---- pako-0.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pako.spec ++++++ --- /var/tmp/diff_new_pack.7cDmJr/_old 2022-10-06 07:42:13.140689297 +0200 +++ /var/tmp/diff_new_pack.7cDmJr/_new 2022-10-06 07:42:13.144689306 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pako # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pako -Version: 0.2.3 +Version: 0.3.1 Release: 0 Summary: The universal package manager library License: Apache-2.0 @@ -30,7 +30,7 @@ BuildRequires: python-rpm-macros Requires: python-appdirs Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch %python_subpackages ++++++ pako-0.2.3.tar.gz -> pako-0.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/PKG-INFO new/pako-0.3.1/PKG-INFO --- old/pako-0.2.3/PKG-INFO 2019-02-15 07:43:48.000000000 +0100 +++ new/pako-0.3.1/PKG-INFO 2021-03-09 12:40:11.773036700 +0100 @@ -1,10 +1,93 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: pako -Version: 0.2.3 +Version: 0.3.1 Summary: The universal package manager library Home-page: https://github.com/MycroftAI/pako -Author: Matthew Scholefield -Author-email: [email protected] +Author: Mycroft AI +Author-email: [email protected] +Maintainer: Matthew Scholefield +Maintainer-email: [email protected] License: Apache-2.0 -Description: UNKNOWN +Description: # Pako + + *The universal package manager library* + + Often, scripts need to install system dependencies using the native package manager of the user's + OS. Typically, this is solved by having some bash script that runs `apt-get`, assuming the user + is on Ubuntu. Smarter scripts use hand crafted code to detect the user's platform and aggregate + a set of dependencies on a few of the more popular platforms. Our approach is different: + + ```bash + pako install libgdbm-devel sdl2-dev + ``` + + On Ubuntu, this command will run: + ```bash + sudo apt-get install -y libgdbm-dev libsdl2-dev + ``` + + However, on Solus, this will run: + ```bash + sudo eopkg install -y gdbm-devel sdl2-devel + ``` + + It works as follows: + - Parse package format (devel/debug/normal library or executable) + - Look up package managers that exist in PATH + - Format parsed package with common package convention of package manager + + ## Installation + + ```bash + pip3 install pako + ``` + + ## Usage + Command line: + ``` + pako (install|update) [package] [-t, --type format] + ``` + + Python bindings: + ```python + from pako import PakoManager, PackageFormat + + manager = PakoManager() + manager.update() + manager.install(['gdbm-dev', 'sdl2-dev']) + manager.install(['ssl-dev'], overrides={'eopkg': ['openssl-devel']}) + ``` + + ### Non-interactive mode + + A `no-confirm` flag can be added to calls. This will be translated to the equivalent command line flag such as `apt install -y`. + + ```python + from pako import PakoManager, PackageFormat + + manager = PakoManager() + manager.install(['example-package'], flags=['no-confirm']) + ``` + + ## Help Wanted + + This tool can improve to fit a lot of use cases. Feel free to create an issue or pull request for + new features and improvements. For instance, we need to figure out the best way to handle cases + where a simple package format won't find the appropriate package. + + ### Add Your Package Manager + + Add your package manager by adding another data block to the dict object in + `pako/package_manager_data.py`. + Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: System :: Software Distribution +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/README.md new/pako-0.3.1/README.md --- old/pako-0.2.3/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/pako-0.3.1/README.md 2021-03-09 12:36:12.000000000 +0100 @@ -0,0 +1,71 @@ +# Pako + +*The universal package manager library* + +Often, scripts need to install system dependencies using the native package manager of the user's + OS. Typically, this is solved by having some bash script that runs `apt-get`, assuming the user + is on Ubuntu. Smarter scripts use hand crafted code to detect the user's platform and aggregate + a set of dependencies on a few of the more popular platforms. Our approach is different: + + ```bash +pako install libgdbm-devel sdl2-dev +``` + +On Ubuntu, this command will run: +```bash +sudo apt-get install -y libgdbm-dev libsdl2-dev +``` + +However, on Solus, this will run: +```bash +sudo eopkg install -y gdbm-devel sdl2-devel +``` + +It works as follows: + - Parse package format (devel/debug/normal library or executable) + - Look up package managers that exist in PATH + - Format parsed package with common package convention of package manager + +## Installation + +```bash +pip3 install pako +``` + +## Usage +Command line: +``` +pako (install|update) [package] [-t, --type format] +``` + +Python bindings: +```python +from pako import PakoManager, PackageFormat + +manager = PakoManager() +manager.update() +manager.install(['gdbm-dev', 'sdl2-dev']) +manager.install(['ssl-dev'], overrides={'eopkg': ['openssl-devel']}) +``` + +### Non-interactive mode + +A `no-confirm` flag can be added to calls. This will be translated to the equivalent command line flag such as `apt install -y`. + +```python +from pako import PakoManager, PackageFormat + +manager = PakoManager() +manager.install(['example-package'], flags=['no-confirm']) +``` + +## Help Wanted + +This tool can improve to fit a lot of use cases. Feel free to create an issue or pull request for + new features and improvements. For instance, we need to figure out the best way to handle cases + where a simple package format won't find the appropriate package. + +### Add Your Package Manager + +Add your package manager by adding another data block to the dict object in +`pako/package_manager_data.py`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/pako/__main__.py new/pako-0.3.1/pako/__main__.py --- old/pako-0.2.3/pako/__main__.py 2019-02-14 09:41:21.000000000 +0100 +++ new/pako-0.3.1/pako/__main__.py 2021-03-09 12:18:28.000000000 +0100 @@ -24,8 +24,8 @@ from pako.pako_manager import PakoManager -def install(args): - return PakoManager().install(args.packages) +def install(*args, **kwargs): + return PakoManager().install(*args, **kwargs) def update(args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/pako/package_manager_data.py new/pako-0.3.1/pako/package_manager_data.py --- old/pako-0.2.3/pako/package_manager_data.py 2019-02-14 09:41:21.000000000 +0100 +++ new/pako-0.3.1/pako/package_manager_data.py 2021-03-09 12:18:28.000000000 +0100 @@ -24,11 +24,14 @@ from pako.config_loader import recursive_merge, load_package_managers_overrides __package_managers = { - '__order__': ['eopkg', 'apt-get'], + '__order__': ['eopkg', 'apt-get', 'rpm-ostree', 'dnf', 'pacman', 'yum', 'zypper', 'apk'], 'eopkg': { 'sudo': True, 'update': 'ur', - 'install': 'it -y', + 'install': 'it', + 'flags': { + 'no-confirm': '-y', + }, 'formats': { 'exe': ['{}', '{}-utils', '{}-bin'], 'lib': ['{}', 'lib{}'], @@ -40,12 +43,90 @@ 'sudo': True, 'update': 'update', 'install': 'install', + 'flags': { + 'no-confirm': '-y', + }, 'formats': { 'exe': ['{}', '{}-utils'], 'lib': ['lib{}', '{}'], 'lib-dev': ['lib{}-dev', '{}-dev'], 'lib-debug': ['lib{}-dbg', '{}-dbg'] } + }, + 'rpm-ostree': { + 'sudo': False, + 'update': 'refresh-md', + 'install': 'install', + 'formats': { + 'exe': ['{}', '{}-utils'], + 'lib': ['{}', 'lib{}', '{}-lib', '{}-libs'], + 'lib-dev': ['{}-devel', 'lib{}-devel'], + 'lib-debug': ['{}-debuginfo', 'lib{}-debuginfo'], + } + }, + 'dnf': { + 'sudo': True, + 'update': 'check-update', + 'install': 'install', + 'formats': { + 'exe': ['{}', '{}-utils'], + 'lib': ['{}', 'lib{}', '{}-lib', '{}-libs'], + 'lib-dev': ['{}-devel', 'lib{}-devel'], + 'lib-debug': ['{}-debuginfo', 'lib{}-debuginfo'], + } + }, + 'pacman': { + 'sudo': True, + 'update': 'Syu', + 'install': 'Sy', + 'flags': { + 'no-confirm': '--noconfirm', + }, + 'formats': { + 'exe': ['{}', '{}-utils', '{}utils', '{}-bin'], + 'lib': ['{}', 'lib{}', '{}-lib', '{}-libs'], + 'lib-dev': [''], + 'lib-debug': ['{}-debug'], + } + }, + 'yum': { + 'sudo': True, + 'update': 'update', + 'install': 'install', + 'flags': { + 'no-confirm': '-y', + }, + 'formats': { + 'exe': ['{}', '{}-utils', '{}utils', '{}-bin'], + 'lib': ['{}', 'lib{}', '{}-lib', '{}-libs'], + 'lib-dev': ['{}-devel'], + 'lib-debug': ['{}-debug','{}-dbg'], + } + }, + 'zypper': { + 'sudo': True, + 'update': 'update', + 'install': 'install', + 'flags': { + 'no-confirm': '-y', + }, + 'formats': { + 'exe': ['{}', '{}-utils', '{}utils', '{}-bin'], + 'lib': ['{}', 'lib{}', '{}-lib', '{}-libs'], + 'lib-dev': ['{}-devel'], + 'lib-debug': ['{}-debug','{}-dbg'], + } + }, + 'apk': { + 'sudo': True, + 'update': 'upgrade -a', + 'install': 'add', + 'formats': { + 'exe': ['{}', '{}-utils', '{}-progs', '{}-tools'], + 'lib': ['{}', 'lib{}', '{}-libs'], + 'lib-dev': ['{}-dev'], + 'lib-debug': ['{}-dbg'], + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/pako/pako_manager.py new/pako-0.3.1/pako/pako_manager.py --- old/pako-0.2.3/pako/pako_manager.py 2019-02-14 09:41:21.000000000 +0100 +++ new/pako-0.3.1/pako/pako_manager.py 2021-03-09 12:18:28.000000000 +0100 @@ -49,12 +49,18 @@ @staticmethod def _find_package_manager(exes): + """Determine which package manager exists on a system.""" for exe in exes: if which(exe): return exe return None def call(self, args: list): + """Execute command for the available package manager. + + Arguments: + args (List): list of command line arguments use + """ sudo_args = [] if self.config['sudo']: sudo_args = ['sudo'] @@ -70,9 +76,19 @@ return status def update(self): + """Update list of available packages.""" return self.call(self.config['update'].split()) == 0 - def install_one(self, package: str, fmt: str = None) -> bool: + def install_one(self, package: str, fmt: str = None, flags: list = []) -> bool: + """Install a single system package. + + Arguments: + package (Str): Name of package to install + fmt (Str): Format of package name to use + flags (List[Str]): A list of command flags to use if available + Returns: + Bool: True if package was successfully installed + """ if not fmt: package, fmt = PackageFormat.parse(package) if fmt not in PackageFormat.all: @@ -87,19 +103,34 @@ if f not in possible_names: possible_names.append(f) + install_cmd = self.config['install'].split() + if 'no-confirm' in flags: + install_cmd.append(self.config.get('flags').get('no-confirm')) for name in possible_names: - if self.call(self.config['install'].split() + [name.format(package)]) == 0: + if self.call(install_cmd + [name.format(package)]) == 0: return True return False - def install(self, packages: list, overrides: dict = None) -> bool: + def install(self, packages: list, overrides: dict = None, flags: list = []) -> bool: + """Install system packages. + + Arguments: + packages (List[Str]): A list of package names to install + overrides (Dict): A dictionary of package name formats to use + flags (List[Str]): A list of command flags to use if available + Returns: + Bool: True if all packages were successfully installed + """ if isinstance(packages, str): # Easy mistake raise TypeError('Packages parameter must be a list') overrides = overrides or {} if self.name in overrides: packages = overrides[self.name] - return self.call(self.config['install'].split() + packages) == 0 + install_cmd = self.config['install'].split() + if 'no-confirm' in flags: + install_cmd.append(self.config.get('flags').get('no-confirm')) + return self.call(install_cmd + packages) == 0 for package in packages: - if not self.install_one(package): + if not self.install_one(package, flags=flags): return False return True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/pako.egg-info/PKG-INFO new/pako-0.3.1/pako.egg-info/PKG-INFO --- old/pako-0.2.3/pako.egg-info/PKG-INFO 2019-02-15 07:43:48.000000000 +0100 +++ new/pako-0.3.1/pako.egg-info/PKG-INFO 2021-03-09 12:40:11.000000000 +0100 @@ -1,10 +1,93 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: pako -Version: 0.2.3 +Version: 0.3.1 Summary: The universal package manager library Home-page: https://github.com/MycroftAI/pako -Author: Matthew Scholefield -Author-email: [email protected] +Author: Mycroft AI +Author-email: [email protected] +Maintainer: Matthew Scholefield +Maintainer-email: [email protected] License: Apache-2.0 -Description: UNKNOWN +Description: # Pako + + *The universal package manager library* + + Often, scripts need to install system dependencies using the native package manager of the user's + OS. Typically, this is solved by having some bash script that runs `apt-get`, assuming the user + is on Ubuntu. Smarter scripts use hand crafted code to detect the user's platform and aggregate + a set of dependencies on a few of the more popular platforms. Our approach is different: + + ```bash + pako install libgdbm-devel sdl2-dev + ``` + + On Ubuntu, this command will run: + ```bash + sudo apt-get install -y libgdbm-dev libsdl2-dev + ``` + + However, on Solus, this will run: + ```bash + sudo eopkg install -y gdbm-devel sdl2-devel + ``` + + It works as follows: + - Parse package format (devel/debug/normal library or executable) + - Look up package managers that exist in PATH + - Format parsed package with common package convention of package manager + + ## Installation + + ```bash + pip3 install pako + ``` + + ## Usage + Command line: + ``` + pako (install|update) [package] [-t, --type format] + ``` + + Python bindings: + ```python + from pako import PakoManager, PackageFormat + + manager = PakoManager() + manager.update() + manager.install(['gdbm-dev', 'sdl2-dev']) + manager.install(['ssl-dev'], overrides={'eopkg': ['openssl-devel']}) + ``` + + ### Non-interactive mode + + A `no-confirm` flag can be added to calls. This will be translated to the equivalent command line flag such as `apt install -y`. + + ```python + from pako import PakoManager, PackageFormat + + manager = PakoManager() + manager.install(['example-package'], flags=['no-confirm']) + ``` + + ## Help Wanted + + This tool can improve to fit a lot of use cases. Feel free to create an issue or pull request for + new features and improvements. For instance, we need to figure out the best way to handle cases + where a simple package format won't find the appropriate package. + + ### Add Your Package Manager + + Add your package manager by adding another data block to the dict object in + `pako/package_manager_data.py`. + Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: System :: Software Distribution +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/pako.egg-info/SOURCES.txt new/pako-0.3.1/pako.egg-info/SOURCES.txt --- old/pako-0.2.3/pako.egg-info/SOURCES.txt 2019-02-15 07:43:48.000000000 +0100 +++ new/pako-0.3.1/pako.egg-info/SOURCES.txt 2021-03-09 12:40:11.000000000 +0100 @@ -1,4 +1,5 @@ LICENSE +README.md setup.py pako/__init__.py pako/__main__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pako-0.2.3/setup.py new/pako-0.3.1/setup.py --- old/pako-0.2.3/setup.py 2019-02-15 07:41:28.000000000 +0100 +++ new/pako-0.3.1/setup.py 2021-03-09 12:22:41.000000000 +0100 @@ -21,9 +21,12 @@ # under the License. from setuptools import setup +with open('README.md', 'r') as fh: + long_description = fh.read() + setup( name='pako', - version='0.2.3', + version='0.3.1', packages=['pako'], install_requires=['appdirs'], url='https://github.com/MycroftAI/pako', @@ -33,10 +36,23 @@ maintainer='Matthew Scholefield', maintainer_email='[email protected]', description='The universal package manager library', + long_description=long_description, + long_description_content_type='text/markdown', entry_points={ 'console_scripts': { 'pako=pako.__main__:main' } }, - data_files=[('pako', ['LICENSE'])] + data_files=[('pako', ['LICENSE'])], + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Libraries', + 'Topic :: System :: Software Distribution', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + ], )
