%global _empty_manifest_terminate_build 0
Name:		python-pako
Version:	0.3.1
Release:	1
Summary:	The universal package manager library
License:	Apache-2.0
URL:		https://github.com/MycroftAI/pako
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/0d/27/0c491946572618f32c174101facca4dfb7034317e045c1e3950ed4fee689/pako-0.3.1.tar.gz
BuildArch:	noarch

Requires:	python3-appdirs

%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`.




%package -n python3-pako
Summary:	The universal package manager library
Provides:	python-pako
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-pako
# 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`.




%package help
Summary:	Development documents and examples for pako
Provides:	python3-pako-doc
%description help
# 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`.




%prep
%autosetup -n pako-0.3.1

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-pako -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.1-1
- Package Spec generated