SPECS/ecdsa/ecdsa.spec
ba174b20
 %{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
31f34db4
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
5f0e5f3f
 
31f34db4
 Summary:        ECDSA cryptographic signature library (pure python)
 Name:           ecdsa
 Version:        0.13
a848bcf8
 Release:        5%{?dist}
31f34db4
 License:        MIT
 Group:          System Environment/Security
 Vendor:         VMware, Inc.
 Distribution:   Photon
 URL:            https://pypi.python.org/pypi/ecdsa
5f0e5f3f
 
31f34db4
 Source0:        https://pypi.python.org/packages/source/e/ecdsa/%{name}-%{version}.tar.gz
 %define         sha1 ecdsa=7bcf6d1773d08bcc4bdd28cd05c545969f5aa162
 
 BuildArch:      noarch
5f0e5f3f
 
 BuildRequires:  python-setuptools
 BuildRequires:  python2-devel
 
31f34db4
 Requires:       python2
5f0e5f3f
 
 %description
 This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
 Digital Signature Algorithm), implemented purely in Python, released under
 the MIT license. With this library, you can quickly create keypairs (signing
 key and verifying key), sign messages, and verify the signatures. The keys
 and signatures are very short, making them easy to handle and incorporate
 into other protocols.
 
31f34db4
 %package -n     python3-ecdsa
 Summary:        python3-ecdsa
 BuildRequires:  python3-devel
a848bcf8
 BuildRequires:  python3-setuptools
 BuildRequires:  python3-xml
31f34db4
 Requires:       python3
 %description -n python3-ecdsa
 
 Python 3 version.
5f0e5f3f
 
 %prep
 %setup -q
 
 %build
ba174b20
 python2 setup.py build
31f34db4
 python3 setup.py build
5f0e5f3f
 
 %install
 %{__rm} -rf %{buildroot}
ba174b20
 python2 setup.py install -O1 --skip-build \
5f0e5f3f
     --root "%{buildroot}" \
     --single-version-externally-managed
 
31f34db4
 python3 setup.py install -O1 --skip-build \
     --root "%{buildroot}" \
     --single-version-externally-managed
 
e122ff48
 %check
ba174b20
 python2 setup.py test
31f34db4
 python3 setup.py test
e122ff48
 
5f0e5f3f
 %clean
 %{__rm} -rf %{buildroot}
 
 %files
 %defattr(-, root, root)
ba174b20
 %{python2_sitelib}/*
5f0e5f3f
 
31f34db4
 %files -n python3-ecdsa
 %defattr(-, root, root)
 %{python3_sitelib}/*
 
5f0e5f3f
 %changelog
a848bcf8
 *   Mon Jun 19 2017 Xiaolin Li <xiaolinl@vmware.com> 0.13-5
 -   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
ba174b20
 *   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.13-4
 -   Use python2 explicitly
31f34db4
 *   Mon Feb 27 2017 Xiaolin Li <xiaolinl@vmware.com> 0.13-3
 -   Added python3 site-packages.
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.13-2
 -   GA - Bump release of all rpms
 *   Tue Jan 5 2016 Xiaolin Li <xiaolinl@vmware.com> 0.13-1
 -   Initial build.  First version