diff --git a/construct-2.8.12.tar.gz b/construct-2.8.12.tar.gz deleted file mode 100644 index 16cd43f..0000000 --- a/construct-2.8.12.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67ee2c69a11bdadc0705c7e0de0ff16ef74b730932537e22ac1f64f479240ffa -size 720277 diff --git a/python-construct.changes b/python-construct.changes index 4299492..d8ee6b2 100644 --- a/python-construct.changes +++ b/python-construct.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jan 2 09:36:53 UTC 2019 - Tomáš Chvátal + +- Version update to 2.9.45: + * No obvious changelog present +- Remove obsolete split_debug.patch +- Use github tarball in order to be able to run tests + ------------------------------------------------------------------- Tue Dec 4 12:46:54 UTC 2018 - Matej Cepl diff --git a/python-construct.spec b/python-construct.spec index f75ff66..ce0fcda 100644 --- a/python-construct.spec +++ b/python-construct.spec @@ -1,7 +1,7 @@ # # spec file for package python-construct # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,19 +18,26 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-construct -Version: 2.8.12 +Version: 2.9.45 Release: 0 Summary: A declarative parser/builder for binary data License: MIT Group: Development/Languages/Python -URL: http://construct.readthedocs.org -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 +URL: https://github.com/construct/construct +Source: https://github.com/construct/construct/archive/v%{version}.tar.gz +BuildRequires: %{python_module arrow} +BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +Requires: python-arrow BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six +BuildRequires: python2-enum34 +%ifpython2 +Requires: python-enum34 +%endif BuildArch: noarch %python_subpackages @@ -44,7 +51,9 @@ and in the other direction to convert ("build") objects into binary data. %prep %setup -q -n construct-%{version} -%patch0 -p1 +# remove gallery tests that require in place stuff +rm -rf tests/gallery +rm -rf tests/deprecated_gallery %build %python_build @@ -53,6 +62,9 @@ and in the other direction to convert ("build") objects into binary data. %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} + %files %{python_files} %license LICENSE %doc README.rst diff --git a/split_debug.patch b/split_debug.patch deleted file mode 100644 index addaccb..0000000 --- a/split_debug.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: construct-2.8.11/construct/__init__.py -=================================================================== ---- construct-2.8.11.orig/construct/__init__.py -+++ construct-2.8.11/construct/__init__.py -@@ -21,7 +21,6 @@ - - from construct.core import * - 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,6 +39,12 @@ - # exposed names - #=============================================================================== - __all__ = [ -- 'AdaptationError', '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', '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','ProbeInto','Default','ChecksumError','StopIf', 'setglobalfullprinting','getglobalfullprinting','Byte','Short','Int','Long', -+ 'AdaptationError', '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', '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','Default','ChecksumError','StopIf', 'setglobalfullprinting','getglobalfullprinting','Byte','Short','Int','Long', - - ] + ["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 diff --git a/v2.9.45.tar.gz b/v2.9.45.tar.gz new file mode 100644 index 0000000..17224f5 --- /dev/null +++ b/v2.9.45.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28718d4d598acaaf5eca201037c47b234166c92a355cc3d7045646554bb5e7b7 +size 1042299