Update to upstream 0.1.6, modules 0.0.4, add python3 subpackages.
Patch contributed by Jamie Nguyen <jamielinux@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
This commit is contained in:
parent
a364bb88e8
commit
b1a906c0c3
2
.gitignore
vendored
2
.gitignore
vendored
@ -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
|
||||
|
@ -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@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@lists.fedoraproject.org> - 0.1.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user