summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD31
-rw-r--r--tinyec.install4
3 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a40d3aa55b0b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = python-tinyec
+ pkgdesc = Tiny library to perform arithmetic operations on elliptic curves
+ pkgver = 0.4.0
+ pkgrel = 1
+ url = https://github.com/alexmgr/tinyec
+ install = tinyec.install
+ arch = any
+ license = GPL3
+ checkdepends = python-nose
+ makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
+ depends = python
+ source = python-tinyec-0.4.0.tar.gz::https://files.pythonhosted.org/packages/source/t/tinyec/tinyec-0.4.0.tar.gz
+ sha256sums = b0364aab3b9af632b64f24eafae0c8e56cc64b4845648752610f48f2ab0547a3
+
+pkgname = python-tinyec
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..24be81ce327e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+
+pkgname=python-tinyec
+_name="${pkgname#python-}"
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="Tiny library to perform arithmetic operations on elliptic curves"
+arch=('any')
+url="https://github.com/alexmgr/tinyec"
+license=('GPL3')
+depends=('python')
+makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
+checkdepends=('python-nose')
+install=tinyec.install
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('b0364aab3b9af632b64f24eafae0c8e56cc64b4845648752610f48f2ab0547a3')
+
+build() {
+ cd "$_name-$pkgver"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$_name-$pkgver"
+ nosetests
+}
+
+package() {
+ cd "$_name-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
+}
diff --git a/tinyec.install b/tinyec.install
new file mode 100644
index 000000000000..9105bd00d00b
--- /dev/null
+++ b/tinyec.install
@@ -0,0 +1,4 @@
+post_install() {
+ echo ':: WARNING'
+ echo ':: This library is not suitable for production!'
+}