]>
Commit | Line | Data |
---|---|---|
d6fd38f4 | 1 | # |
a798df93 JK |
2 | # Conditional build: |
3 | %bcond_without tests # do not perform "make test" | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
a2199741 JK |
7 | %define module pyasn1 |
8 | ||
9 | Summary: ASN.1 tools for Python | |
5d1902c7 | 10 | Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona |
a2199741 | 11 | Name: python-%{module} |
360405e7 | 12 | Version: 0.1.9 |
ea88cc4c | 13 | Release: 2 |
a2199741 JK |
14 | License: BSD-like |
15 | Group: Libraries/Python | |
b3a167e9 | 16 | #Source0Download: https://pypi.python.org/simple/pyasn1/ |
eee9e686 | 17 | Source0: https://pypi.python.org/packages/source/p/pyasn1/%{module}-%{version}.tar.gz |
360405e7 | 18 | # Source0-md5: f00a02a631d4016818659d1cc38d229a |
a2199741 | 19 | URL: http://pyasn1.sourceforge.net/ |
41ad7633 | 20 | BuildRequires: rpmbuild(macros) >= 1.710 |
a798df93 | 21 | %if %{with python2} |
783e5f9a | 22 | BuildRequires: python >= 1:2.5 |
a798df93 | 23 | BuildRequires: python-modules >= 1:2.5 |
b3a167e9 JB |
24 | %if %{with tests} |
25 | %if "%{py_ver}" < "2.7" | |
26 | BuildRequires: python-unittest2 | |
27 | %endif | |
28 | %endif | |
a798df93 JK |
29 | %endif |
30 | %if %{with python3} | |
31 | BuildRequires: python3 >= 1:3.3 | |
a798df93 JK |
32 | BuildRequires: python3-modules >= 1:3.3 |
33 | %endif | |
783e5f9a | 34 | BuildRequires: rpm-pythonprov |
a2199741 | 35 | %pyrequires_eq python-modules |
e3aa0d7d | 36 | Obsoletes: python-pyasn1-examples |
a2199741 JK |
37 | BuildArch: noarch |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
9a5ce609 | 41 | This project is dedicated to implementation of ASN.1 types (concrete |
42 | syntax) and codecs (transfer syntaxes) for Python programming | |
43 | environment. | |
a2199741 | 44 | |
6afbe877 JR |
45 | %description -l pl.UTF-8 |
46 | Celem tego projektu jest implementacja typów (konkretnej składni) i | |
47 | kodowania (składni przesyłania) ASN.1 dla środowiska programowania | |
af206693 JB |
48 | Python. |
49 | ||
a798df93 JK |
50 | %package -n python3-%{module} |
51 | Summary: ASN.1 tools for Python | |
52 | Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona | |
53 | Group: Libraries/Python | |
54 | ||
55 | %description -n python3-%{module} | |
56 | This project is dedicated to implementation of ASN.1 types (concrete | |
57 | syntax) and codecs (transfer syntaxes) for Python programming | |
58 | environment. | |
59 | ||
60 | %description -n python3-%{module} -l pl.UTF-8 | |
61 | Celem tego projektu jest implementacja typów (konkretnej składni) i | |
62 | kodowania (składni przesyłania) ASN.1 dla środowiska programowania | |
63 | Python. | |
64 | ||
a2199741 JK |
65 | %prep |
66 | %setup -q -n %{module}-%{version} | |
67 | ||
68 | %build | |
a798df93 | 69 | %if %{with python2} |
0c0ff164 | 70 | %py_build %{?with_tests:test} |
a798df93 JK |
71 | %endif |
72 | %if %{with python3} | |
0c0ff164 | 73 | %py3_build %{?with_tests:test} |
a798df93 | 74 | %endif |
a2199741 JK |
75 | |
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
a798df93 | 79 | %if %{with python2} |
0c0ff164 | 80 | %py_install |
a2199741 | 81 | |
a798df93 JK |
82 | %py_postclean |
83 | %endif | |
a2199741 | 84 | |
a798df93 | 85 | %if %{with python3} |
0c0ff164 | 86 | %py3_install |
a798df93 | 87 | %endif |
a2199741 JK |
88 | |
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
a798df93 | 92 | %if %{with python2} |
a2199741 JK |
93 | %files |
94 | %defattr(644,root,root,755) | |
360405e7 | 95 | %doc CHANGES.txt LICENSE.txt README.txt THANKS.txt TODO.txt doc/*.html |
af206693 | 96 | %{py_sitescriptdir}/%{module} |
d6fd38f4 | 97 | %{py_sitescriptdir}/pyasn1-%{version}-py*.egg-info |
a798df93 JK |
98 | %endif |
99 | ||
100 | %if %{with python3} | |
101 | %files -n python3-%{module} | |
102 | %defattr(644,root,root,755) | |
360405e7 | 103 | %doc CHANGES.txt LICENSE.txt README.txt THANKS.txt TODO.txt doc/*.html |
a798df93 | 104 | %{py3_sitescriptdir}/%{module} |
d6fd38f4 | 105 | %{py3_sitescriptdir}/pyasn1-%{version}-py*.egg-info |
a798df93 | 106 | %endif |