]>
Commit | Line | Data |
---|---|---|
dbb99fda AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
5c144cc7 ER |
5 | |
6 | %define module ecdsa | |
dbb99fda | 7 | Summary: ECDSA cryptographic signature library |
5c144cc7 | 8 | Name: python-%{module} |
85e04b5d | 9 | Version: 0.11 |
5a70f09b | 10 | Release: 4 |
dbb99fda AM |
11 | License: GPL |
12 | Group: Development/Languages/Python | |
5c144cc7 | 13 | Source0: http://pypi.python.org/packages/source/e/ecdsa/%{module}-%{version}.tar.gz |
85e04b5d | 14 | # Source0-md5: 8ef586fe4dbb156697d756900cb41d7c |
dbb99fda | 15 | URL: https://pypi.python.org/pypi/ecdsa |
5c144cc7 | 16 | BuildRequires: rpm-pythonprov |
dbb99fda AM |
17 | %if %{with python2} |
18 | BuildRequires: python-devel | |
19 | BuildRequires: python-modules | |
dbb99fda AM |
20 | %endif |
21 | %if %{with python3} | |
22 | BuildRequires: python3-2to3 | |
23 | BuildRequires: python3-devel | |
24 | BuildRequires: python3-modules | |
25 | %endif | |
5c144cc7 | 26 | Requires: python |
dbb99fda AM |
27 | BuildArch: noarch |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | This is an easy-to-use implementation of ECDSA cryptography (Elliptic | |
32 | Curve Digital Signature Algorithm), implemented purely in Python, | |
33 | released under the MIT license. With this library, you can quickly | |
34 | create keypairs (signing key and verifying key), sign messages, and | |
35 | verify the signatures. The keys and signatures are very short, making | |
36 | them easy to handle and incorporate into other protocols. | |
37 | ||
85e04b5d | 38 | %package -n python3-%{module} |
dbb99fda | 39 | Summary: ECDSA cryptographic signature library |
dbb99fda AM |
40 | Group: Libraries/Python |
41 | Requires: python3 | |
42 | ||
43 | %description -n python3-%{module} | |
44 | This is an easy-to-use implementation of ECDSA cryptography (Elliptic | |
45 | Curve Digital Signature Algorithm), implemented purely in Python, | |
46 | released under the MIT license. With this library, you can quickly | |
47 | create keypairs (signing key and verifying key), sign messages, and | |
48 | verify the signatures. The keys and signatures are very short, making | |
49 | them easy to handle and incorporate into other protocols. | |
50 | ||
51 | %prep | |
52 | %setup -q -n ecdsa-%{version} | |
53 | ||
54 | %build | |
55 | %if %{with python2} | |
0796a7a6 | 56 | %py_build --build-base py2 |
dbb99fda AM |
57 | %endif |
58 | %if %{with python3} | |
0796a7a6 | 59 | %py3_build --build-base py3 |
dbb99fda AM |
60 | %endif |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | %if %{with python2} | |
65 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} | |
0796a7a6 | 66 | %py_build \ |
dbb99fda AM |
67 | --build-base py2 \ |
68 | install \ | |
69 | --optimize 2 \ | |
70 | --root=$RPM_BUILD_ROOT | |
71 | %endif | |
72 | ||
73 | %if %{with python3} | |
74 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
0796a7a6 | 75 | %py3_build \ |
dbb99fda AM |
76 | --build-base py3 \ |
77 | install \ | |
78 | --optimize 2 \ | |
79 | --root=$RPM_BUILD_ROOT | |
80 | %endif | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %if %{with python2} | |
86 | %files | |
87 | %defattr(644,root,root,755) | |
88 | %doc LICENSE NEWS README.md | |
dbb99fda | 89 | %{py_sitescriptdir}/%{module} |
5c144cc7 ER |
90 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
91 | %{_examplesdir}/python-%{module}-%{version} | |
dbb99fda AM |
92 | %endif |
93 | ||
94 | %if %{with python3} | |
95 | %files -n python3-%{module} | |
96 | %defattr(644,root,root,755) | |
97 | %doc LICENSE NEWS README.md | |
dbb99fda | 98 | %{py3_sitescriptdir}/%{module} |
5c144cc7 ER |
99 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
100 | %{_examplesdir}/python3-%{module}-%{version} | |
dbb99fda | 101 | %endif |