%global _empty_manifest_terminate_build 0 Name: python-construct Version: 2.10.68 Release: 1 Summary: A powerful declarative symmetric parser/builder for binary data License: MIT URL: http://construct.readthedocs.org Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e0/b7/a4a032e94bcfdff481f2e6fecd472794d9da09f474a2185ed33b2c7cad64/construct-2.10.68.tar.gz BuildArch: noarch %description Construct is a powerful **declarative** and **symmetrical** parser and builder for binary data. Instead of writing *imperative code* to parse a piece of data, you declaratively define a *data structure* that describes your data. As this data structure is not code, you can use it in one direction to *parse* data into Pythonic objects, and in the other direction, to *build* objects into binary data. The library provides both simple, atomic constructs (such as integers of various sizes), as well as composite ones which allow you form hierarchical and sequential structures of increasing complexity. Construct features **bit and byte granularity**, easy debugging and testing, an **easy-to-extend subclass system**, and lots of primitive constructs to make your work easier: * Fields: raw bytes or numerical types * Structs and Sequences: combine simpler constructs into more complex ones * Bitwise: splitting bytes into bit-grained fields * Adapters: change how data is represented * Arrays/Ranges: duplicate constructs * Meta-constructs: use the context (history) to compute the size of data * If/Switch: branch the computational path based on the context * On-demand (lazy) parsing: read and parse only what you require * Pointers: jump from here to there in the data stream * Tunneling: prefix data with a byte count or compress it %package -n python3-construct Summary: A powerful declarative symmetric parser/builder for binary data Provides: python-construct BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-construct Construct is a powerful **declarative** and **symmetrical** parser and builder for binary data. Instead of writing *imperative code* to parse a piece of data, you declaratively define a *data structure* that describes your data. As this data structure is not code, you can use it in one direction to *parse* data into Pythonic objects, and in the other direction, to *build* objects into binary data. The library provides both simple, atomic constructs (such as integers of various sizes), as well as composite ones which allow you form hierarchical and sequential structures of increasing complexity. Construct features **bit and byte granularity**, easy debugging and testing, an **easy-to-extend subclass system**, and lots of primitive constructs to make your work easier: * Fields: raw bytes or numerical types * Structs and Sequences: combine simpler constructs into more complex ones * Bitwise: splitting bytes into bit-grained fields * Adapters: change how data is represented * Arrays/Ranges: duplicate constructs * Meta-constructs: use the context (history) to compute the size of data * If/Switch: branch the computational path based on the context * On-demand (lazy) parsing: read and parse only what you require * Pointers: jump from here to there in the data stream * Tunneling: prefix data with a byte count or compress it %package help Summary: Development documents and examples for construct Provides: python3-construct-doc %description help Construct is a powerful **declarative** and **symmetrical** parser and builder for binary data. Instead of writing *imperative code* to parse a piece of data, you declaratively define a *data structure* that describes your data. As this data structure is not code, you can use it in one direction to *parse* data into Pythonic objects, and in the other direction, to *build* objects into binary data. The library provides both simple, atomic constructs (such as integers of various sizes), as well as composite ones which allow you form hierarchical and sequential structures of increasing complexity. Construct features **bit and byte granularity**, easy debugging and testing, an **easy-to-extend subclass system**, and lots of primitive constructs to make your work easier: * Fields: raw bytes or numerical types * Structs and Sequences: combine simpler constructs into more complex ones * Bitwise: splitting bytes into bit-grained fields * Adapters: change how data is represented * Arrays/Ranges: duplicate constructs * Meta-constructs: use the context (history) to compute the size of data * If/Switch: branch the computational path based on the context * On-demand (lazy) parsing: read and parse only what you require * Pointers: jump from here to there in the data stream * Tunneling: prefix data with a byte count or compress it %prep %autosetup -n construct-2.10.68 %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-construct -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 2.10.68-1 - Package Spec generated