3 %bcond_without apidocs # Sphinx documentation
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
10 Summary: ASN.1 tools for Python
11 Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona
12 Name: python-%{module}
16 Group: Libraries/Python
17 #Source0Download: https://pypi.python.org/simple/pyasn1/
18 Source0: https://files.pythonhosted.org/packages/source/p/pyasn1/%{module}-%{version}.tar.gz
19 # Source0-md5: 79f98135071c8dd5c37b6c923c51be45
20 Patch0: %{name}-missing.patch
21 URL: http://pyasn1.sourceforge.net/
22 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: python >= 1:2.5
25 BuildRequires: python-modules >= 1:2.5
27 %if "%{py_ver}" < "2.7"
28 BuildRequires: python-unittest2
33 BuildRequires: python3 >= 1:3.3
34 BuildRequires: python3-modules >= 1:3.3
36 BuildRequires: rpm-pythonprov
38 BuildRequires: python3-sphinx_rtd_theme
39 BuildRequires: sphinx-pdg
41 Requires: python-modules >= 1:2.5
42 Obsoletes: python-pyasn1-examples
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 This project is dedicated to implementation of ASN.1 types (concrete
48 syntax) and codecs (transfer syntaxes) for Python programming
51 %description -l pl.UTF-8
52 Celem tego projektu jest implementacja typów (konkretnej składni) i
53 kodowania (składni przesyłania) ASN.1 dla środowiska programowania
56 %package -n python3-%{module}
57 Summary: ASN.1 tools for Python
58 Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona
59 Group: Libraries/Python
60 Requires: python3-modules >= 1:3.3
62 %description -n python3-%{module}
63 This project is dedicated to implementation of ASN.1 types (concrete
64 syntax) and codecs (transfer syntaxes) for Python programming
67 %description -n python3-%{module} -l pl.UTF-8
68 Celem tego projektu jest implementacja typów (konkretnej składni) i
69 kodowania (składni przesyłania) ASN.1 dla środowiska programowania
73 Summary: Documentation for ASN.1 Python module
74 Summary(pl.UTF-8): Dokumentacja do modułu Pythona ASN.1
78 Documentation for ASN.1 Python module.
80 %description apidocs -l pl.UTF-8
81 Dokumentacja do modułu Pythona ASN.1.
84 %setup -q -n %{module}-%{version}
89 %py_build %{?with_tests:test}
92 %py3_build %{?with_tests:test}
96 PYTHONPATH=$(pwd)/build-py3/lib \
101 rm -rf $RPM_BUILD_ROOT
114 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %doc CHANGES.rst LICENSE.rst README.md THANKS.txt TODO.rst
120 %{py_sitescriptdir}/%{module}
121 %{py_sitescriptdir}/pyasn1-%{version}-py*.egg-info
125 %files -n python3-%{module}
126 %defattr(644,root,root,755)
127 %doc CHANGES.rst LICENSE.rst README.md THANKS.txt TODO.rst
128 %{py3_sitescriptdir}/%{module}
129 %{py3_sitescriptdir}/pyasn1-%{version}-py*.egg-info
134 %defattr(644,root,root,755)
135 %doc doc/build/html/{_static,docs,*.html,*.js}