commit 493227f8a5b2ec28e856b8de8299099bcdb6cca5 Author: tubalu Date: Tue Nov 26 11:07:36 2019 +0800 package init diff --git a/construct-2.5.1.tar.gz b/construct-2.5.1.tar.gz new file mode 100644 index 0000000..4ac14f4 Binary files /dev/null and b/construct-2.5.1.tar.gz differ diff --git a/python-construct-2.5.1-relative.patch b/python-construct-2.5.1-relative.patch new file mode 100644 index 0000000..fe59d01 --- /dev/null +++ b/python-construct-2.5.1-relative.patch @@ -0,0 +1,13 @@ +diff --git a/construct/protocols/layer3/ipv6.py b/construct/protocols/layer3/ipv6.py +index 18a0955..fde16ba 100644 +--- a/construct/protocols/layer3/ipv6.py ++++ b/construct/protocols/layer3/ipv6.py +@@ -2,7 +2,7 @@ + Internet Protocol version 6 (TCP/IP protocol stack) + """ + from construct import * +-from ipv4 import ProtocolEnum ++from .ipv4 import ProtocolEnum + from binascii import unhexlify + import six + diff --git a/python-construct.spec b/python-construct.spec new file mode 100644 index 0000000..1e6b496 --- /dev/null +++ b/python-construct.spec @@ -0,0 +1,64 @@ +Name: python-construct +Version: 2.5.1 +Release: 19 +Summary: A powerful declarative and symmetrical parser and builder for binary data +License: MIT +URL: http://construct.readthedocs.org +Source0: https://pypi.python.org/packages/source/c/construct/construct-%{version}.tar.gz + +Patch0000: python-construct-2.5.1-relative.patch + +BuildArch: noarch + +BuildRequires: python2-devel python3-devel + +%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. + +%package -n python2-construct +Summary: A powerful declarative and symmetrical parser and builder for binary data +Requires: python2-six +%{?python_provide:%python_provide python2-construct} + +%description -n python2-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. + +%package -n python3-construct +Summary: A powerful declarative and symmetrical parser and builder for binary data +Requires: python3-six + +%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. + +%prep +%autosetup -n construct-%{version} -p1 + +%build +%{py2_build} +%{py3_build} + +%install +%{py2_install} +%{py3_install} + +%files -n python2-construct +%license LICENSE +%doc README.rst +%{python2_sitelib}/construct +%{python2_sitelib}/construct-%{version}-py?.?.egg-info + +%files -n python3-construct +%license LICENSE +%doc README.rst +%{python3_sitelib}/construct +%{python3_sitelib}/construct-%{version}-py?.?.egg-info + +%changelog +* Fri Nov 15 2019 openEuler Buildteam - 2.5.1-19 +- Package init