[python-pyasn1] Update to upstream 0.1.6, modules 0.0.4, add python3 subpackages.

rcritten rcritten at fedoraproject.org
Fri Feb 22 20:21:56 UTC 2013


commit b1a906c0c3e826c2db58a57be0ba211d242aefc8
Author: Rob Crittenden <rcritten at redhat.com>
Date:   Fri Feb 22 15:11:38 2013 -0500

    Update to upstream 0.1.6, modules 0.0.4, add python3 subpackages.
    
    Patch contributed by Jamie Nguyen <jamielinux at fedoraproject.org>
    
    - update to upstream release 0.1.6
    - update modules to 0.0.4
    - update description
    - add python3-pyasn1 subpackage
    - add versioned Requires for the module subpackages
    - add %%check section
    
    Bugzilla 909831

 .gitignore         |    2 +
 python-pyasn1.spec |   97 +++++++++++++++++++++++++++++++++++++++++++++++-----
 sources            |    4 +-
 3 files changed, 92 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 476bcf1..2c6532c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@ pyasn1-0.0.9a.tar.gz
 /pyasn1-0.0.12a.tar.gz
 /pyasn1-0.1.2.tar.gz
 /pyasn1-modules-0.0.2.tar.gz
+/pyasn1-0.1.6.tar.gz
+/pyasn1-modules-0.0.4.tar.gz
diff --git a/python-pyasn1.spec b/python-pyasn1.spec
index 84d27ff..51b4531 100644
--- a/python-pyasn1.spec
+++ b/python-pyasn1.spec
@@ -1,11 +1,15 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
 
 %global module pyasn1
-%global modules_version 0.0.2
+%global modules_version 0.0.4
 
 Name:           python-pyasn1
-Version:        0.1.2
-Release:        3%{?dist}
+Version:        0.1.6
+Release:        1%{?dist}
 Summary:        ASN.1 tools for Python
 License:        BSD
 Group:          System Environment/Libraries
@@ -16,21 +20,46 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python-devel python-setuptools
 
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+%endif
+
 %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.
+This is an implementation of ASN.1 types and codecs in the Python programming
+language.
 
 %package modules
 Summary:    Modules for pyasn1
-
+Requires:   python-pyasn1 >= %{version}-%{release}
 
 %description modules
-ASN.1 types modules.
+ASN.1 types modules for python-pyasn1.
+
+%package -n python3-pyasn1
+Summary:    ASN.1 tools for Python 3
+
+%description -n python3-pyasn1
+This is an implementation of ASN.1 types and codecs in the Python 3 programming
+language.
+
+%package -n python3-pyasn1-modules
+Summary:    Modules for pyasn1
+Requires:   python3-pyasn1 >= %{version}-%{release}
+
+%description -n python3-pyasn1-modules
+ASN.1 types modules for python3-pyasn1.
+
 
 %prep
 %setup -n %{module}-%{version} -q -b1
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+cp -a ../pyasn1-modules-%{modules_version} %{py3dir}-modules
+%endif
+
 
 %build
 %{__python} setup.py build
@@ -38,15 +67,45 @@ pushd ../pyasn1-modules-%{modules_version}
 %{__python} setup.py build
 popd
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+pushd %{py3dir}-modules
+%{__python3} setup.py build
+popd
+%endif
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+pushd %{py3dir}-modules
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif
+
 %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 pushd ../pyasn1-modules-%{modules_version}
 %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 popd
 
 
+%check
+# PYTHONPATH is required because the the tests expect python{,3}-pyasn1
+# to be installed.
+PYTHONPATH="$RPM_BUILD_ROOT%{python_sitelib}:$PYTHONPATH" %{__python2} test/suite.py
+%if %{with python3}
+pushd %{py3dir}
+PYTHONPATH="$RPM_BUILD_ROOT%{python3_sitelib}:$PYTHONPATH" %{__python3} test/suite.py
+popd
+%endif
+
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -62,8 +121,28 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/%{module}_modules/
 %{python_sitelib}/%{module}_modules-%{modules_version}-*.egg-info/
 
+%if 0%{?with_python3}
+%files -n python3-pyasn1
+%defattr(-,root,root,-)
+%doc README LICENSE doc/*.html
+%{python3_sitelib}/%{module}
+%{python3_sitelib}/%{module}-%{version}-*.egg-info/
+
+%files -n python3-pyasn1-modules
+%defattr(-,root,root,-)
+%{python3_sitelib}/%{module}_modules/
+%{python3_sitelib}/%{module}_modules-%{modules_version}-*.egg-info/
+%endif
 
 %changelog
+* Sat Feb 16 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 0.1.6-1
+- update to upstream release 0.1.6
+- update modules to 0.0.4
+- update description
+- add python3-pyasn1 subpackage
+- add versioned Requires for the module subpackages
+- add %%check section
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index 3aee379..fb65b04 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-a7c67f5880a16a347a4d3ce445862a47  pyasn1-0.1.2.tar.gz
-adc49aee6603a162f9d4a6830c8dc470  pyasn1-modules-0.0.2.tar.gz
+35fe440115a6edcb99f70e894ba23cfb  pyasn1-0.1.6.tar.gz
+12eb7a0eb10fe57cd02ec5cbb19be7a7  pyasn1-modules-0.0.4.tar.gz


More information about the scm-commits mailing list