[python-ecdsa] Initial import

Orion Poplawski orion at fedoraproject.org
Tue Feb 25 19:17:00 UTC 2014


commit 8464392df8c09f3ea03ddfcf018a435a311b1978
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Feb 25 12:17:52 2014 -0700

    Initial import

 .gitignore        |    1 +
 python-ecdsa.spec |  129 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources           |    1 +
 3 files changed, 131 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..85c43ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ecdsa-0.10-clean.tar.gz
diff --git a/python-ecdsa.spec b/python-ecdsa.spec
new file mode 100644
index 0000000..6419970
--- /dev/null
+++ b/python-ecdsa.spec
@@ -0,0 +1,129 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%else
+%global with_python3 1
+%endif
+
+%global srcname ecdsa
+
+Name:           python-%{srcname}
+Version:        0.10
+Release:        3%{?dist}
+Summary:        ECDSA cryptographic signature library
+
+License:        MIT
+URL:            https://pypi.python.org/pypi/ecdsa
+# Remove the prime192v1 and secp224r1 curves for now
+# https://bugzilla.redhat.com/show_bug.cgi?id=1067697
+Source0:        %{srcname}-%{version}-clean.tar.gz
+#Source0:        https://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+BuildRequires:  python-six
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-six
+%endif
+# For tests
+BuildRequires:  openssl
+Requires:       python-six
+
+%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.
+
+NOTE: The prime192v1 and secp224r1 curves are currently disabled.
+
+%if 0%{?with_python3}
+%package -n python3-%{srcname}
+Summary:        ECDSA cryptographic signature library
+Requires:       python3-six
+
+%description -n python3-%{srcname}
+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.
+
+NOTE: The prime192v1 and secp224r1 curves are currently disabled.
+%endif # with_python3
+
+
+%prep
+%setup -q -n %{srcname}-%{version}-clean
+rm -rf %{srcname}.egg-info
+# Remove extraneous #!
+find ecdsa -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d'
+# Use system python-six
+find -name \*.py | xargs sed -ie 's/from \(ecdsa\|\)\.six/from six/g'
+rm ecdsa/six.py
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+
+%check
+%{__python2} setup.py test
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif # with_python3
+
+ 
+%files
+%doc LICENSE NEWS PKG-INFO README.md
+%{python2_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-%{srcname}
+%doc LICENSE NEWS PKG-INFO README.md
+%{python3_sitelib}/*
+%endif # with_python3
+
+
+%changelog
+* Mon Feb 24 2014 Orion Poplawski <orion at cora.nwra.com> - 0.10-3
+- Add python3 package
+
+* Mon Feb 24 2014 Orion Poplawski <orion at cora.nwra.com> - 0.10-2
+- Use system python-six
+- Remove extraneous #!s
+
+* Fri Feb 21 2014 Orion Poplawski <orion at cora.nwra.com> - 0.10-1
+- Initial package
diff --git a/sources b/sources
index e69de29..72f4a47 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e54020389303d27b8db9b18cfd2130c6  ecdsa-0.10-clean.tar.gz


More information about the scm-commits mailing list