# # spec file for package python-pyasn1 # # Copyright (c) 2015 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-pyasn1 Version: 0.1.7 Release: 44.24 Summary: ASN.1 types and codecs License: BSD-2-Clause Group: Development/Languages/Python Url: http://pyasn1.sf.net/ Source: http://pypi.python.org/packages/source/p/pyasn1/pyasn1-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-pytest BuildRequires: python-setuptools Provides: python-asn1 = %{version} Obsoletes: python-asn1 < 0.1.2 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 %description This is an implementation of ASN.1 types and codecs in Python programming language. It has been first written to support particular protocol (SNMP) but then generalized to be suitable for a wide range of protocols based on ASN.1 specification. %prep %setup -q -n pyasn1-%{version} %build python setup.py build %check python setup.py test %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} %files %defattr(-,root,root,-) %doc CHANGES LICENSE README THANKS TODO doc %{python_sitelib}/* %changelog * Wed Apr 22 2015 mcihar@suse.cz - Run testsuite in %%check * Tue Mar 3 2015 lchiquitto@suse.com - Reflect license change (from BSD-3-Clause to BSD-2-Clause) which happened in version 0.1.7 in the spec file * Thu Oct 24 2013 speilicke@suse.com - Require python-setuptools instead of distribute (upstreams merged) - Fix changes file * Tue May 7 2013 michael@stroeder.com - updated to upstrean release 0.1.7 - License updated to vanilla BSD 2-Clause to ease package use (http://opensource.org/licenses/BSD-2-Clause). - Test suite made discoverable by unittest/unittest2 discovery feature. - Fix to decoder working on indefinite length substrate -- end-of-octets marker is now detected by both tag and value. Otherwise zero values may interfere with end-of-octets marker. - Fix to decoder to fail in cases where tagFormat indicates inappropriate format for the type (e.g. BOOLEAN is always PRIMITIVE, SET is always CONSTRUCTED and OCTET STRING is either of the two) - Fix to REAL type encoder to force primitive encoding form encoding. - Fix to CHOICE decoder to handle explicitly tagged, indefinite length mode encoding - Fix to REAL type decoder to handle negative REAL values correctly. Test case added. * Fri Jan 18 2013 michael@stroeder.com - updated to upstrean release 0.1.6 - The compact (valueless) way of encoding zero INTEGERs introduced in 0.1.5 seems to fail miserably as the world is filled with broken BER decoders. So we had to back off the *encoder* for a while. There's still the IntegerEncoder.supportCompactZero flag which enables compact encoding form whenever it evaluates to True. - Report package version on debugging code initialization. - Changes from version 0.1.5: - Documentation updated and split into chapters to better match web-site contents. - Make prettyPrint() working for non-initialized pyasn1 data objects. It used to throw an exception. - Fix to encoder to produce empty-payload INTEGER values for zeros - Fix to decoder to support empty-payload INTEGER and REAL values - Fix to unit test suites imports to be able to run each from their current directory * Fri Jul 27 2012 michael@stroeder.com - updated to upstrean release 0.1.4 * A built-in de/serialization debugging facility added * Package versioning added (pyasn1.__version__) * Leading sub-OIDs overflow condition handled * REAL type exponent encoding implemented properly at BER codec * Boolean BER decoder fixed to allow arbitrary payload * Leading 0x80 octet now handled properly by DER/CER/DER ObjectIdentifier decoder - includes fix needed by python-ldap's module ldap.syncrepl * Wed Apr 25 2012 michael@stroeder.com - updated to upstrean release 0.1.3 - Include class name into asn1 value constraint violation exception. - Fix to OctetString.prettyOut() method that looses leading zero when building hex string. * Wed Apr 18 2012 saschpe@suse.de - Fix obsoletes for python-asn1 instead * Tue Apr 17 2012 dmueller@suse.com - remove self-obsoletes * Fri Mar 23 2012 michael@stroeder.com - updated to upstrean release 0.1.2 - Fix to __long__() to actually return longs on py2k - Fix to OctetString.__str__() workings of a non-initialized object. - Fix to quote initializer of OctetString.__repr__() - Minor fix towards ObjectIdentifier.prettyIn() reliability - ObjectIdentifier.__str__() is aliased to prettyPrint() - Exlicit repr() calls replaced with '%%r' * Thu Dec 8 2011 coolo@suse.com - fix license to be in spdx.org format * Tue Nov 8 2011 highwaystar.ru@gmail.com - updated to 0.1.1 * Hex/bin string initializer to OctetString object reworked (in a backward-incompatible manner) * Fixed float() infinity compatibility issue (affects 2.5 and earlier) * Fixed a bug/typo at Boolean CER encoder * Major overhawl for Python 2.4 -- 3.2 compatibility + get rid of old-style types + drop string module usage + switch to rich comparation + drop explicit long integer type use + map()/filter() replaced with list comprehension + apply() replaced with */**args + switched to use 'key' sort() callback function + support both __nonzero__() and __bool__() methods + modified not to use py3k-incompatible exception syntax + getslice() operator fully replaced with getitem() + dictionary operations made 2K/3K compatible + base type for encoding substrate and OctetString-based types is now 'bytes' when running py3k and 'str' otherwise + OctetString and derivatives now unicode compliant. + OctetString now supports two python-neutral getters: asOcts() & asInts() + print OctetString content in hex whenever it is not printable otherwise + in test suite, implicit relative import replaced with the absolute one + in test suite, string constants replaced with numerics * Wed Aug 31 2011 saschpe@gmx.de - Packaged documentation * Wed Aug 31 2011 saschpe@suse.de - Initial version, obsoletes 'python-asn1'