diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 13:35:30 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 13:35:30 +0000 |
commit | da70495e2ac256cf0d760159cc20c4ec0e1d64ae (patch) | |
tree | 5e8f5705d1d6f7637ce89c017f0129d8d5399060 | |
parent | 71da981cd48f5d8c672676ee3da985b563bcd149 (diff) |
automatic import of python-construct
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-construct.spec | 108 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 110 insertions, 0 deletions
@@ -0,0 +1 @@ +/construct-2.10.68.tar.gz diff --git a/python-construct.spec b/python-construct.spec new file mode 100644 index 0000000..d57a18b --- /dev/null +++ b/python-construct.spec @@ -0,0 +1,108 @@ +%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 +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.10.68-1 +- Package Spec generated @@ -0,0 +1 @@ +e426d3dd1566066e4ef1a03fe474dec0 construct-2.10.68.tar.gz |