From 6c5b9ed9c34b8bd24d1bf8a85b73e1fd6dd391552255a5c0926757aeb4e3da36 Mon Sep 17 00:00:00 2001 From: Matwey Kornilov Date: Wed, 26 Apr 2017 05:34:51 +0000 Subject: [PATCH] Accepting request 489942 from home:alois:branches:devel:languages:python Updated and converted to single-spec OBS-URL: https://build.opensuse.org/request/show/489942 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-construct?expand=0&rev=15 --- construct-2.8.10.tar.gz | 3 --- construct-2.8.11.tar.gz | 3 +++ python-construct.changes | 8 ++++++++ python-construct.spec | 26 ++++++++++++++------------ split_debug.patch | 24 ++++-------------------- 5 files changed, 29 insertions(+), 35 deletions(-) delete mode 100644 construct-2.8.10.tar.gz create mode 100644 construct-2.8.11.tar.gz diff --git a/construct-2.8.10.tar.gz b/construct-2.8.10.tar.gz deleted file mode 100644 index 81b9cf6..0000000 --- a/construct-2.8.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9030e9db1163b7786d2c058a97ad92640f45d38f2795384cbac5e2ece77921b9 -size 719537 diff --git a/construct-2.8.11.tar.gz b/construct-2.8.11.tar.gz new file mode 100644 index 0000000..8a9fbdb --- /dev/null +++ b/construct-2.8.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d59bdef0209678c54805120dff03a0423d88989018eaa559e713ecb13ab6eb1 +size 719949 diff --git a/python-construct.changes b/python-construct.changes index 0342895..fb363be 100644 --- a/python-construct.changes +++ b/python-construct.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Apr 22 16:20:52 UTC 2017 - aloisio@gmx.com + +- Update to 2.8.11 +- Converted to single-spec +- Set proper source URL +- Refreshed split_debug.patch + ------------------------------------------------------------------- Thu Jan 26 09:26:29 UTC 2017 - matwey.kornilov@gmail.com diff --git a/python-construct.spec b/python-construct.spec index 161ff02..b8e9013 100644 --- a/python-construct.spec +++ b/python-construct.spec @@ -16,25 +16,25 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-construct -Version: 2.8.10 +Version: 2.8.11 Release: 0 Summary: A powerful declarative parser/builder for binary data License: MIT Group: Development/Languages/Python Url: http://construct.readthedocs.org -Source: https://github.com/construct/construct/archive/v%{version}/construct-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/c/construct/construct-%{version}.tar.gz # PATCH-FEATURE-OPENSUSE split_debug.patch matwey.kornilov@gmail.com -- make debug.py non-loadable Patch0: split_debug.patch -BuildRequires: python-devel -BuildRequires: python-six +BuildRequires: %{python_module devel} +BuildRequires: %{python_module six} +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-six BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description Construct is a powerful declarative parser (and builder) for binary data. @@ -49,14 +49,16 @@ and in the other direction, convert ("build") objects into binary data. %patch0 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%files +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst -%{python_sitelib}/* +%{python_sitelib}/construct +%{python_sitelib}/construct-%{version}-py%{python_version}.egg-info %changelog diff --git a/split_debug.patch b/split_debug.patch index cc7a694..1d3defe 100644 --- a/split_debug.patch +++ b/split_debug.patch @@ -1,28 +1,12 @@ -Index: construct-2.8.10/construct/__init__.py +Index: construct-2.8.11/construct/__init__.py =================================================================== ---- construct-2.8.10.orig/construct/__init__.py -+++ construct-2.8.10/construct/__init__.py +--- construct-2.8.11.orig/construct/__init__.py ++++ construct-2.8.11/construct/__init__.py @@ -21,7 +21,6 @@ Hands-on example: from construct.core import * - from construct.expr import this, Path, Path2, PathFunc, len_, sum_, min_, max_, abs_, obj_, True_, False_ + from construct.expr import this, Path, Path2, PathFunc, len_, sum_, min_, max_, abs_, obj_ -from construct.debug import Probe, ProbeInto, Debugger from construct.version import version, version_string, release_date from construct import lib -@@ -40,8 +39,12 @@ __version__ = version_string - # exposed names - #=============================================================================== - __all__ = [ -- 'AdaptationError', 'Alias', 'Aligned', 'AlignedStruct', 'Array', 'Bit', 'BitIntegerError', 'BitStruct', 'Bitwise', 'CString', 'Construct', 'ConstructError', 'Container', 'Debugger', 'EmbeddedBitStruct', 'Enum', 'ExprAdapter', 'FieldError', 'Flag', 'FlagsContainer', 'FlagsEnum', 'Bytes', 'FormatField', 'GreedyRange', 'HexDump', 'HexString', 'If', 'IfThenElse', 'Indexing', 'LazyBound', 'LazyContainer', 'ListContainer', 'Mapping', 'MappingError', 'Nibble', 'NoneOf', 'Octet', 'OnDemand', 'OnDemandPointer', 'OneOf', 'Optional', 'OverwriteError', 'Packer', 'Padding', 'PaddingError', 'PascalString', 'Pass', 'Peek', 'Pointer', 'PrefixedArray', 'Probe', 'Range', 'RangeError', 'Renamed', 'RepeatUntil', 'Select', 'SelectError', 'Sequence', 'SizeofError', 'Slicing', 'String', 'Struct', 'Subconstruct', 'Switch', 'SwitchError', 'SymmetricMapping', 'Terminated', 'TerminatedError', 'UnionError', 'Union', 'ValidationError', 'Validator', 'Computed', 'Byte', 'Bytes', 'Tunnel', 'Embedded', 'Const', 'ConstError', 'VarInt', 'StringError', 'Checksum', 'ByteSwapped', 'LazyStruct', 'Numpy', 'Adapter', 'SymmetricAdapter', 'Tunnel', 'Compressed', 'GreedyBytes', 'Prefixed', 'Padded', 'GreedyString', 'RawCopy', 'LazyRange', 'LazySequence', 'LazySequenceContainer', 'BitsInteger', 'BytesInteger', '__author__', '__version__','Restreamed', 'RestreamedBytesIO', 'Bytewise', 'LazyRangeContainer', 'BitsSwapped', 'RebufferedBytesIO','Rebuffered','version','version_string','lib','Seek','Tell','setglobalstringencoding','globalstringencoding','NamedTuple','ExprValidator','Filter','Hex','Error','ExplicitError','release_date','Rebuild','Check','len_','sum_','min_','max_','abs_','obj_','singleton','singletonfunction', 'this', 'Path','Path2','PathFunc','FocusedSeq','FocusedError','ExprSymmetricAdapter','True_','False_','BoundBytesIO','ProbeInto','Default', -- --] + ["Int%s%s%s" % (n,us,bln) for n in (8,16,32,64) for us in "us" for bln in "bln"] + ["Int24ub","Int24ul","Int24sb","Int24sl"] + ["Float%s%s" % (n,bl) for n in (32,64) for bl in "bl"] + ["Single","Double"] -+ 'AdaptationError', 'Alias', 'Aligned', 'AlignedStruct', 'Array', 'Bit', 'BitIntegerError', 'BitStruct', 'Bitwise', 'CString', 'Construct', 'ConstructError', 'Container', 'EmbeddedBitStruct', 'Enum', 'ExprAdapter', 'FieldError', 'Flag', 'FlagsContainer', 'FlagsEnum', 'Bytes', 'FormatField', 'GreedyRange', 'HexDump', 'HexString', 'If', 'IfThenElse', 'Indexing', 'LazyBound', 'LazyContainer', 'ListContainer', 'Mapping', 'MappingError', 'Nibble', 'NoneOf', 'Octet', 'OnDemand', 'OnDemandPointer', 'OneOf', 'Optional', 'OverwriteError', 'Packer', 'Padding', 'PaddingError', 'PascalString', 'Pass', 'Peek', 'Pointer', 'PrefixedArray', 'Range', 'RangeError', 'Renamed', 'RepeatUntil', 'Select', 'SelectError', 'Sequence', 'SizeofError', 'Slicing', 'String', 'Struct', 'Subconstruct', 'Switch', 'SwitchError', 'SymmetricMapping', 'Terminated', 'TerminatedError', 'UnionError', 'Union', 'ValidationError', 'Validator', 'Computed', 'Byte', 'Bytes', 'Tunnel', 'Embedded', 'Const', 'ConstError', 'VarInt', 'StringError', 'Checksum', 'ByteSwapped', 'LazyStruct', 'Numpy', 'Adapter', 'SymmetricAdapter', 'Tunnel', 'Compressed', 'GreedyBytes', 'Prefixed', 'Padded', 'GreedyString', 'RawCopy', 'LazyRange', 'LazySequence', 'LazySequenceContainer', 'BitsInteger', 'BytesInteger', '__author__', '__version__', 'Restreamed', 'RestreamedBytesIO', 'Bytewise', 'LazyRangeContainer', 'BitsSwapped', 'RebufferedBytesIO', 'Rebuffered', 'version', 'version_string', 'lib', 'Seek', 'Tell', 'setglobalstringencoding', 'globalstringencoding', 'NamedTuple', 'ExprValidator', 'Filter', 'Hex', 'Error', 'ExplicitError', 'release_date', 'Rebuild', 'Check', 'len_', 'sum_', 'min_', 'max_', 'abs_', 'obj_', 'singleton', 'singletonfunction', 'this', 'Path', 'Path2', 'PathFunc', 'FocusedSeq', 'FocusedError', 'ExprSymmetricAdapter', 'True_', 'False_', 'BoundBytesIO', 'Default', - -+] + ["Int%s%s%s" % (n, us, bln) for n in (8, 16, 32, 64) for us in "us" for bln in "bln"] + ["Int24ub", "Int24ul", "Int24sb", "Int24sl"] + ["Float%s%s" % (n, bl) for n in (32, 64) for bl in "bl"] + ["Single", "Double"] - -+try: -+ from construct.debug import Probe, Debugger, ProbeInto -+ __all__ = __all__ + ['Debugger', 'Probe', 'ProbeInto'] -+except ImportError: -+ pass