|
|
db363b9 |
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
8464392 |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
8464392 |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
8464392 |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
8464392 |
%else
|
|
|
8464392 |
%global with_python3 1
|
|
|
8464392 |
%endif
|
|
|
8464392 |
|
|
|
8464392 |
%global srcname ecdsa
|
|
|
8464392 |
|
|
|
8464392 |
Name: python-%{srcname}
|
|
Orion Poplawski |
4a64ed5 |
Version: 0.13
|
|
|
8e282fc |
Release: 2%{?dist}
|
|
|
8464392 |
Summary: ECDSA cryptographic signature library
|
|
|
8464392 |
|
|
|
8464392 |
License: MIT
|
|
|
8464392 |
URL: https://pypi.python.org/pypi/ecdsa
|
|
Orion Poplawski |
4a64ed5 |
Source0: https://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
Orion Poplawski |
4a64ed5 |
# Fedora's openssl does not support 192 and 224 bit keys, so don't test against that
|
|
Orion Poplawski |
4a64ed5 |
Patch0: python-ecdsa-noweak.patch
|
|
|
8464392 |
|
|
|
8464392 |
BuildArch: noarch
|
|
|
8464392 |
BuildRequires: python2-devel
|
|
|
8464392 |
BuildRequires: python-setuptools
|
|
|
8464392 |
BuildRequires: python-six
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
BuildRequires: python3-devel
|
|
|
8464392 |
BuildRequires: python3-setuptools
|
|
|
8464392 |
BuildRequires: python3-six
|
|
|
8464392 |
%endif
|
|
|
8464392 |
# For tests
|
|
|
8464392 |
BuildRequires: openssl
|
|
|
8464392 |
|
|
|
8464392 |
%description
|
|
|
8464392 |
This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
|
|
|
8464392 |
Digital Signature Algorithm), implemented purely in Python, released under
|
|
|
8464392 |
the MIT license. With this library, you can quickly create keypairs (signing
|
|
|
8464392 |
key and verifying key), sign messages, and verify the signatures. The keys
|
|
|
8464392 |
and signatures are very short, making them easy to handle and incorporate
|
|
|
8464392 |
into other protocols.
|
|
|
8464392 |
|
|
Orion Poplawski |
4a64ed5 |
%package -n python2-%{srcname}
|
|
Orion Poplawski |
4a64ed5 |
Summary: ECDSA cryptographic signature library
|
|
Orion Poplawski |
4a64ed5 |
Requires: python-six
|
|
Orion Poplawski |
4a64ed5 |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
Orion Poplawski |
4a64ed5 |
|
|
Orion Poplawski |
4a64ed5 |
%description -n python2-%{srcname}
|
|
Orion Poplawski |
4a64ed5 |
This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
|
|
Orion Poplawski |
4a64ed5 |
Digital Signature Algorithm), implemented purely in Python, released under
|
|
Orion Poplawski |
4a64ed5 |
the MIT license. With this library, you can quickly create keypairs (signing
|
|
Orion Poplawski |
4a64ed5 |
key and verifying key), sign messages, and verify the signatures. The keys
|
|
Orion Poplawski |
4a64ed5 |
and signatures are very short, making them easy to handle and incorporate
|
|
Orion Poplawski |
4a64ed5 |
into other protocols.
|
|
|
8464392 |
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
%package -n python3-%{srcname}
|
|
|
8464392 |
Summary: ECDSA cryptographic signature library
|
|
|
8464392 |
Requires: python3-six
|
|
Orion Poplawski |
4a64ed5 |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
8464392 |
|
|
|
8464392 |
%description -n python3-%{srcname}
|
|
|
8464392 |
This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
|
|
|
8464392 |
Digital Signature Algorithm), implemented purely in Python, released under
|
|
|
8464392 |
the MIT license. With this library, you can quickly create keypairs (signing
|
|
|
8464392 |
key and verifying key), sign messages, and verify the signatures. The keys
|
|
|
8464392 |
and signatures are very short, making them easy to handle and incorporate
|
|
|
8464392 |
into other protocols.
|
|
|
8464392 |
%endif # with_python3
|
|
|
8464392 |
|
|
|
8464392 |
|
|
|
8464392 |
%prep
|
|
Orion Poplawski |
4a64ed5 |
%setup -q -n %{srcname}-%{version}
|
|
Orion Poplawski |
4a64ed5 |
%patch0 -p1 -b .noweak
|
|
|
8464392 |
rm -rf %{srcname}.egg-info
|
|
|
8464392 |
# Remove extraneous #!
|
|
|
8464392 |
find ecdsa -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d'
|
|
|
8464392 |
# Use system python-six
|
|
|
8464392 |
find -name \*.py | xargs sed -ie 's/from \(ecdsa\|\)\.six/from six/g'
|
|
|
8464392 |
rm ecdsa/six.py
|
|
|
8464392 |
|
|
|
8464392 |
|
|
|
8464392 |
%build
|
|
|
8464392 |
%{__python2} setup.py build
|
|
|
8464392 |
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
%{__python3} setup.py build
|
|
|
8464392 |
%endif # with_python3
|
|
|
8464392 |
|
|
|
8464392 |
|
|
|
8464392 |
%install
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
|
8464392 |
%endif # with_python3
|
|
|
8464392 |
|
|
|
8464392 |
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
|
8464392 |
|
|
|
8464392 |
|
|
|
8464392 |
%check
|
|
|
8464392 |
%{__python2} setup.py test
|
|
|
8464392 |
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
%{__python3} setup.py test
|
|
|
8464392 |
%endif # with_python3
|
|
|
8464392 |
|
|
|
8464392 |
|
|
Orion Poplawski |
4a64ed5 |
%files -n python2-%{srcname}
|
|
|
8464392 |
%doc LICENSE NEWS PKG-INFO README.md
|
|
|
8464392 |
%{python2_sitelib}/*
|
|
|
8464392 |
|
|
|
8464392 |
%if 0%{?with_python3}
|
|
|
8464392 |
%files -n python3-%{srcname}
|
|
|
8464392 |
%doc LICENSE NEWS PKG-INFO README.md
|
|
|
8464392 |
%{python3_sitelib}/*
|
|
|
8464392 |
%endif # with_python3
|
|
|
8464392 |
|
|
|
8464392 |
|
|
|
8464392 |
%changelog
|
|
|
8e282fc |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-2
|
|
|
8e282fc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
8e282fc |
|
|
Orion Poplawski |
4a64ed5 |
* Mon Dec 14 2015 Orion Poplawski <orion@cora.nwra.com> - 0.13-1
|
|
Orion Poplawski |
4a64ed5 |
- Update to 0.13
|
|
Orion Poplawski |
4a64ed5 |
- Modernize spec
|
|
Orion Poplawski |
4a64ed5 |
|
|
|
2414dd0 |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-5
|
|
|
2414dd0 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
2414dd0 |
|
|
|
c7a9e5f |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
|
|
|
c7a9e5f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
c7a9e5f |
|
|
|
cbf5e04 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3
|
|
|
cbf5e04 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
cbf5e04 |
|
|
Orion Poplawski |
e131819 |
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 0.11-2
|
|
Orion Poplawski |
e131819 |
- Rebuild for Python 3.4
|
|
Orion Poplawski |
e131819 |
|
|
Orion Poplawski |
e0bdb46 |
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 0.11-1
|
|
Orion Poplawski |
e0bdb46 |
- Update to 0.11
|
|
Orion Poplawski |
e0bdb46 |
|
|
|
8464392 |
* Mon Feb 24 2014 Orion Poplawski <orion@cora.nwra.com> - 0.10-3
|
|
|
8464392 |
- Add python3 package
|
|
|
8464392 |
|
|
|
8464392 |
* Mon Feb 24 2014 Orion Poplawski <orion@cora.nwra.com> - 0.10-2
|
|
|
8464392 |
- Use system python-six
|
|
|
8464392 |
- Remove extraneous #!s
|
|
|
8464392 |
|
|
|
8464392 |
* Fri Feb 21 2014 Orion Poplawski <orion@cora.nwra.com> - 0.10-1
|
|
|
8464392 |
- Initial package
|