# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify CentOS Linux and Scientific Linux as rhel %if "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "sl" || "%{__distinit}" == "sls" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" 2>/dev/null)} %global pythonver %(python -c "import sys; print sys.version[:3]" 2>/dev/null || echo 0.0) Name: python-pyasn1 Version: 0.0.13b Release: 3.%{__distinit}%{__distvers} Summary: ASN.1 tools for Python License: BSD Group: System Environment/Libraries Source0: http://downloads.sf.net/pyasn1/pyasn1-%{version}.tar.gz URL: http://pyasn1.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: python2-devel python-setuptools %description This project is dedicated to implementation of ASN.1 types (concrete syntax) and codecs (transfer syntaxes) for Python programming environment. ASN.1 compiler is planned for implementation in the future. %prep %setup -n pyasn1-%{version} -q %build python setup.py build %install rm -rf %{buildroot} python setup.py install --skip-build --root %{buildroot} # See if there's any egg-info if [ -d %{buildroot}%{python_sitelib}/pyasn1-%{version}-py%{pythonver}.egg-info ]; then echo %{python_sitelib}/pyasn1-%{version}-py%{pythonver}.egg-info/ fi > egg-info %check PYTHONPATH=%{buildroot}%{python_sitelib} python test/suite.py %clean rm -rf %{buildroot} %files -f egg-info %defattr(-,root,root,-) %doc CHANGES README LICENSE THANKS TODO doc/pyasn1-tutorial.html %{python_sitelib}/pyasn1/ %changelog * Mon Nov 7 2011 Paul Howarth - 0.0.13b-3 - Package upstream CHANGES file * Thu Aug 4 2011 Paul Howarth - 0.0.13b-2 - Fix dist tag for CentOS 6 and Scientific Linux * Thu Apr 21 2011 Paul Howarth - 0.0.13b-1 - Update to 0.0.13b - Major codec re-design - Documentation significantly improved - ASN.1 Any type is now supported - ASN.1 Real type is now supported properly - All example ASN.1 modules moved to separate pyasn1-modules package - Fix to initial sub-OID overflow condition detection an encoder - BitString initialization value verification improved - The Set/Sequence.getNameByPosition() method implemented - Fix to proper behaviour of PermittedAlphabetConstraint object - Fix to improper Boolean substrate handling at CER/DER decoders - Objects of Constructed types now support __setitem__() - Set/Sequence objects can now be addressed by their field names (string index) and position (integer index) - Typo fix to ber.SetDecoder code that prevented guided decoding operation - Fix to explicitly tagged items decoding support - Fix to OctetString.prettyPrint() to better handle non-printable content - Fix to repr() workings of Choice objects - Changes towards performance improvement: - All dict.has_key() & dict.get() invocations replaced with modern syntax (this breaks compatibility with Python 2.1 and older) - Tag and tagset caches introduced to decoder - decoder code improved to prevent unnecessary pyasn1 objects creation - Allow disabling components verification when setting components to structured types; this is used by decoder whilst running in guided mode - BER decoder for integer values now looks up a small set of pre-computed substrate values to save on decoding - A few pre-computed values configured to ObjectIdentifier BER encoder - ChoiceDecoder split-off SequenceOf one to save on unnecessary checks - Replace slow hasattr()/getattr() calls with isinstance() introspection - Track the number of initialized components of Constructed types to save on default/optional components initialization - Added a shortcut ObjectIdentifier.asTuple() to be used instead of __getitem__() in hotspots - Use Tag.asTuple() and pure integers at tag encoder - Introduce and use in decoder the baseTagSet attribute of the built-in ASN.1 types - Drop patch for Any type, now supported upstream - Package THANKS, TODO and pyasn1-tutorial.html - Drop examples and notes.html documentation no longer provided by upstream * Wed Apr 20 2011 Paul Howarth - 0.0.12a-3 - Import from Fedora * Tue Feb 08 2011 Fedora Release Engineering - 0.0.12a-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Dec 22 2010 Rob Crittenden - 0.0.12a-1 - Update to upstream version 0.0.12a * Thu Jul 22 2010 David Malcolm - 0.0.9a-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Mon Nov 16 2009 Rob Crittenden - 0.0.9a-1 - Update to upstream version 0.0.9a - Include patch that adds parsing for the Any type * Wed Sep 2 2009 Rob Crittenden - 0.0.8a-5 - Include doc/notes.html in the package * Sun Jul 26 2009 Fedora Release Engineering - 0.0.8a-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 0.0.8a-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.0.8a-2 - Rebuild for Python 2.6 * Tue Sep 9 2008 Paul P. Komkoff Jr - 0.0.8a-1 - Update to upstream version 0.0.8a * Wed Jan 16 2008 Rob Crittenden - 0.0.7a-4 - Use setuptools to install the package - Simplify the files included in the rpm so it includes the .egg-info * Mon Jan 14 2008 Rob Crittenden - 0.0.7a-3 - Rename to python-pyasn1 - Spec file cleanups * Mon Nov 19 2007 Karl MacMillan - 0.0.7a-2 - Update rpm to be more fedora friendly * Thu Nov 8 2007 Simo Sorce 0.0.7a-1 - New release * Mon May 28 2007 Andreas Hasenack 0.0.6a-1mdv2008.0 - Revision: 31989 - Fixed (build)requires - Import pyasn1