]> git.pld-linux.org Git - packages/python-ecdsa.git/blob - python-ecdsa.spec
1b8413a6a9bdbdbbfa3b2285abbfd2240ec0eb15
[packages/python-ecdsa.git] / python-ecdsa.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2.x module
4 %bcond_without  python3         # Python 3.x module
5
6 %define         module  ecdsa
7 Summary:        ECDSA cryptographic signature library
8 Name:           python-%{module}
9 Version:        0.11
10 Release:        3
11 License:        GPL
12 Group:          Development/Languages/Python
13 Source0:        http://pypi.python.org/packages/source/e/ecdsa/%{module}-%{version}.tar.gz
14 # Source0-md5:  8ef586fe4dbb156697d756900cb41d7c
15 URL:            https://pypi.python.org/pypi/ecdsa
16 BuildRequires:  rpm-pythonprov
17 %if %{with python2}
18 BuildRequires:  python-devel
19 BuildRequires:  python-modules
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-2to3
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-modules
25 %endif
26 Requires:       python
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
38 %package -n python3-%{module}
39 Summary:        ECDSA cryptographic signature library
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}
56 %py_build --build-base py2
57 %endif
58 %if %{with python3}
59 %py3_build --build-base py3
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}
66 %py_build \
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}
75 %py3_build \
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
89 %{py_sitescriptdir}/%{module}
90 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
91 %{_examplesdir}/python-%{module}-%{version}
92 %endif
93
94 %if %{with python3}
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
97 %doc LICENSE NEWS README.md
98 %{py3_sitescriptdir}/%{module}
99 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
100 %{_examplesdir}/python3-%{module}-%{version}
101 %endif
This page took 0.050262 seconds and 2 git commands to generate.