%global _empty_manifest_terminate_build 0
Name:		python-catbuffer
Version:	1.0.0
Release:	1
Summary:	Symbol Catbuffer Builders
License:	Apache 2.0
URL:		https://github.com/nemtech/catbuffer-generators
Source0:	https://mirrors.aliyun.com/pypi/web/packages/54/f7/7141b059a870f35e0a067e16923f837bceddec869f019fd649ccbf16e523/catbuffer-1.0.0.tar.gz
BuildArch:	noarch


%description
# catbuffer

This is the Python version of the catbuffer library. It is generated using [catbuffer-generators](https://github.com/nemtech/catbuffer-generators) from the [catbuffer](https://github.com/nemtech/catbuffer) specification. 

The generated code is in Python version 3.7. 

This library helps serialize and deserialize NEM's Catapult entities in Python applications. 

The library's main client is (symbol-sdk-core-python). We suggest not using this library directly.

Right now only transactions and related objects are generated in sensible manner, support ffor state-related objects will be added in future.

## Installation & Usage
### pip install

The python catbuffer package is hosted on [PyPI](https://pypi.org/project/catbuffer).

To install the latest release:

```sh
pip install catbuffer
```
(you may need to run `pip` with root permission: `sudo pip install catbuffer`)

To install a specific version or a snapshot:

```sh
pip install catbuffer=={version}
```

Example:

```sh
pip3 install catbuffer==1.0.0.20210413.152059a1
```




%package -n python3-catbuffer
Summary:	Symbol Catbuffer Builders
Provides:	python-catbuffer
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-catbuffer
# catbuffer

This is the Python version of the catbuffer library. It is generated using [catbuffer-generators](https://github.com/nemtech/catbuffer-generators) from the [catbuffer](https://github.com/nemtech/catbuffer) specification. 

The generated code is in Python version 3.7. 

This library helps serialize and deserialize NEM's Catapult entities in Python applications. 

The library's main client is (symbol-sdk-core-python). We suggest not using this library directly.

Right now only transactions and related objects are generated in sensible manner, support ffor state-related objects will be added in future.

## Installation & Usage
### pip install

The python catbuffer package is hosted on [PyPI](https://pypi.org/project/catbuffer).

To install the latest release:

```sh
pip install catbuffer
```
(you may need to run `pip` with root permission: `sudo pip install catbuffer`)

To install a specific version or a snapshot:

```sh
pip install catbuffer=={version}
```

Example:

```sh
pip3 install catbuffer==1.0.0.20210413.152059a1
```




%package help
Summary:	Development documents and examples for catbuffer
Provides:	python3-catbuffer-doc
%description help
# catbuffer

This is the Python version of the catbuffer library. It is generated using [catbuffer-generators](https://github.com/nemtech/catbuffer-generators) from the [catbuffer](https://github.com/nemtech/catbuffer) specification. 

The generated code is in Python version 3.7. 

This library helps serialize and deserialize NEM's Catapult entities in Python applications. 

The library's main client is (symbol-sdk-core-python). We suggest not using this library directly.

Right now only transactions and related objects are generated in sensible manner, support ffor state-related objects will be added in future.

## Installation & Usage
### pip install

The python catbuffer package is hosted on [PyPI](https://pypi.org/project/catbuffer).

To install the latest release:

```sh
pip install catbuffer
```
(you may need to run `pip` with root permission: `sudo pip install catbuffer`)

To install a specific version or a snapshot:

```sh
pip install catbuffer=={version}
```

Example:

```sh
pip3 install catbuffer==1.0.0.20210413.152059a1
```




%prep
%autosetup -n catbuffer-1.0.0

%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-catbuffer -f filelist.lst
%dir %{python3_sitelib}/*

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

%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0-1
- Package Spec generated