]> git.pld-linux.org Git - packages/python-asn1crypto.git/blob - python-asn1crypto.spec
rebuild with tests and docs
[packages/python-asn1crypto.git] / python-asn1crypto.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # unit tests
6
7 %define         module          asn1crypto
8 %define         egg_name        asn1crypto
9 %define         pypi_name       asn1crypto
10 Summary:        Python ASN.1 library with a focus on performance and a pythonic API
11 Summary(pl.UTF-8):      Biblioteka ASN.1 dla Pythona zorientowana na wydajność i pythonowe API
12 Name:           python-%{pypi_name}
13 Version:        1.3.0
14 Release:        5
15 License:        MIT
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/asn1crypto/
18 Source0:        https://files.pythonhosted.org/packages/source/a/asn1crypto/%{pypi_name}-%{version}.tar.gz
19 # Source0-md5:  daad112940181917e3ff169b47b9bd9a
20 Source1:        https://files.pythonhosted.org/packages/source/a/asn1crypto_tests/asn1crypto_tests-%{version}.tar.gz
21 # Source1-md5:  caf691cf224d01d18a21bfdfaeb4b505
22 URL:            https://pypi.org/project/asn1crypto/
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with python2}
26 BuildRequires:  python-modules >= 1:2.6
27 BuildRequires:  python-setuptools
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.2
31 BuildRequires:  python3-setuptools
32 %endif
33 Requires:       python-modules
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Fast ASN.1 parser and serializer with definitions for private keys,
39 public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
40 PKCS#12, PKCS#5, X.509 and TSP.
41
42 %description -l pl.UTF-8
43 Szybki parser i serializer ASN1 z definicjami dla kluczy prywatnych,
44 kluczy publicznych, certyfikatów, CRL, OCSP, CMS, PKCS#3, PKCS#7,
45 PKCS#8, PKCS#12, PKCS#5, X.509 i TSP.
46
47 %package -n python3-%{pypi_name}
48 Summary:        Python ASN.1 library with a focus on performance and a pythonic API
49 Summary(pl.UTF-8):      Biblioteka ASN.1 dla Pythona zorientowana na wydajność i pythonowe API
50 Group:          Libraries/Python
51 Requires:       python3-modules
52
53 %description -n python3-%{pypi_name}
54 Fast ASN.1 parser and serializer with definitions for private keys,
55 public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
56 PKCS#12, PKCS#5, X.509 and TSP.
57
58 %description -n python3-%{pypi_name} -l pl.UTF-8
59 Szybki parser i serializer ASN1 z definicjami dla kluczy prywatnych,
60 kluczy publicznych, certyfikatów, CRL, OCSP, CMS, PKCS#3, PKCS#7,
61 PKCS#8, PKCS#12, PKCS#5, X.509 i TSP.
62
63 %prep
64 %setup -q -n %{pypi_name}-%{version} %{?with_tests:-a1}
65
66 %if %{with tests}
67 %{__mv} asn1crypto_tests-%{version} tests
68 %endif
69
70 %build
71 %if %{with python2}
72 %py_build %{?with_tests:test}
73 %endif
74
75 %if %{with python3}
76 %py3_build %{?with_tests:test}
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python2}
83 %py_install
84
85 %py_postclean
86 %endif
87
88 %if %{with python3}
89 %py3_install
90 %endif
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %files
97 %defattr(644,root,root,755)
98 %doc LICENSE changelog.md readme.md
99 %{py_sitescriptdir}/%{module}
100 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
101 %endif
102
103 %if %{with python3}
104 %files -n python3-%{pypi_name}
105 %defattr(644,root,root,755)
106 %doc LICENSE changelog.md readme.md
107 %{py3_sitescriptdir}/%{module}
108 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
109 %endif
This page took 0.132599 seconds and 3 git commands to generate.