]> git.pld-linux.org Git - packages/python-pyasn1.git/blame - python-pyasn1.spec
- versioned Obsoletes
[packages/python-pyasn1.git] / python-pyasn1.spec
CommitLineData
d6fd38f4 1#
a798df93 2# Conditional build:
80c47c79 3%bcond_without apidocs # Sphinx documentation
ebcb78ee 4%bcond_without tests # unit tests
a798df93
JK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
a2199741
JK
8%define module pyasn1
9
10Summary: ASN.1 tools for Python
5d1902c7 11Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona
a2199741 12Name: python-%{module}
ebcb78ee 13Version: 0.4.8
c8e8b1ed 14Release: 2
a2199741
JK
15License: BSD-like
16Group: Libraries/Python
b0ec96e4 17#Source0Download: https://pypi.org/simple/pyasn1/
80c47c79 18Source0: https://files.pythonhosted.org/packages/source/p/pyasn1/%{module}-%{version}.tar.gz
ebcb78ee 19# Source0-md5: dffae4ff9f997a83324b3f33fe62be54
b0ec96e4 20URL: https://github.com/etingof/pyasn1
80c47c79 21BuildRequires: rpmbuild(macros) >= 1.714
a798df93 22%if %{with python2}
783e5f9a 23BuildRequires: python >= 1:2.5
a798df93 24BuildRequires: python-modules >= 1:2.5
95b685d3 25BuildRequires: python-setuptools
b3a167e9
JB
26%if %{with tests}
27%if "%{py_ver}" < "2.7"
28BuildRequires: python-unittest2
29%endif
30%endif
a798df93
JK
31%endif
32%if %{with python3}
33BuildRequires: python3 >= 1:3.3
a798df93 34BuildRequires: python3-modules >= 1:3.3
95b685d3 35BuildRequires: python3-setuptools
a798df93 36%endif
783e5f9a 37BuildRequires: rpm-pythonprov
80c47c79
JB
38%if %{with apidocs}
39BuildRequires: python3-sphinx_rtd_theme
40BuildRequires: sphinx-pdg
41%endif
42Requires: python-modules >= 1:2.5
bce55d69 43Obsoletes: python-pyasn1-examples < 0.0.13
a2199741
JK
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
9a5ce609 48This project is dedicated to implementation of ASN.1 types (concrete
49syntax) and codecs (transfer syntaxes) for Python programming
50environment.
a2199741 51
6afbe877
JR
52%description -l pl.UTF-8
53Celem tego projektu jest implementacja typów (konkretnej składni) i
54kodowania (składni przesyłania) ASN.1 dla środowiska programowania
af206693
JB
55Python.
56
a798df93
JK
57%package -n python3-%{module}
58Summary: ASN.1 tools for Python
59Summary(pl.UTF-8): Narzędzia ASN.1 dla Pythona
60Group: Libraries/Python
80c47c79 61Requires: python3-modules >= 1:3.3
a798df93
JK
62
63%description -n python3-%{module}
64This project is dedicated to implementation of ASN.1 types (concrete
65syntax) and codecs (transfer syntaxes) for Python programming
66environment.
67
68%description -n python3-%{module} -l pl.UTF-8
69Celem tego projektu jest implementacja typów (konkretnej składni) i
70kodowania (składni przesyłania) ASN.1 dla środowiska programowania
71Python.
72
80c47c79
JB
73%package apidocs
74Summary: Documentation for ASN.1 Python module
75Summary(pl.UTF-8): Dokumentacja do modułu Pythona ASN.1
76Group: Documentation
77
78%description apidocs
79Documentation for ASN.1 Python module.
80
81%description apidocs -l pl.UTF-8
82Dokumentacja do modułu Pythona ASN.1.
83
a2199741
JK
84%prep
85%setup -q -n %{module}-%{version}
86
87%build
a798df93 88%if %{with python2}
0c0ff164 89%py_build %{?with_tests:test}
a798df93
JK
90%endif
91%if %{with python3}
0c0ff164 92%py3_build %{?with_tests:test}
a798df93 93%endif
a2199741 94
80c47c79
JB
95%if %{with apidocs}
96PYTHONPATH=$(pwd)/build-py3/lib \
95b685d3 97%{__make} -C docs html
80c47c79
JB
98%endif
99
a2199741
JK
100%install
101rm -rf $RPM_BUILD_ROOT
102
a798df93 103%if %{with python2}
0c0ff164 104%py_install
a2199741 105
a798df93
JK
106%py_postclean
107%endif
a2199741 108
a798df93 109%if %{with python3}
0c0ff164 110%py3_install
a798df93 111%endif
a2199741
JK
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
a798df93 116%if %{with python2}
a2199741
JK
117%files
118%defattr(644,root,root,755)
95b685d3 119%doc CHANGES.rst LICENSE.rst README.md TODO.rst
af206693 120%{py_sitescriptdir}/%{module}
d6fd38f4 121%{py_sitescriptdir}/pyasn1-%{version}-py*.egg-info
a798df93
JK
122%endif
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
95b685d3 127%doc CHANGES.rst LICENSE.rst README.md TODO.rst
a798df93 128%{py3_sitescriptdir}/%{module}
d6fd38f4 129%{py3_sitescriptdir}/pyasn1-%{version}-py*.egg-info
a798df93 130%endif
80c47c79
JB
131
132%if %{with apidocs}
133%files apidocs
134%defattr(644,root,root,755)
95b685d3 135%doc docs/build/html/{_static,pyasn1,*.html,*.js}
80c47c79 136%endif
This page took 0.074943 seconds and 4 git commands to generate.