Accepting request 491188 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/491188
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-construct?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2017-04-28 08:53:59 +00:00 committed by Git OBS Bridge
commit 5522a5833c
5 changed files with 29 additions and 35 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9030e9db1163b7786d2c058a97ad92640f45d38f2795384cbac5e2ece77921b9
size 719537

3
construct-2.8.11.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d59bdef0209678c54805120dff03a0423d88989018eaa559e713ecb13ab6eb1
size 719949

View File

@ -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

View File

@ -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

View File

@ -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