Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 2021 16:16:28 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: af826bb9a862 - main - textproc/py-hashids: Add py-hashids 1.3.1
Message-ID:  <202107141616.16EGGSKV008209@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af826bb9a862aeffb896e8a621b31d4a382e2496

commit af826bb9a862aeffb896e8a621b31d4a382e2496
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-07-14 15:48:11 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-07-14 16:09:35 +0000

    textproc/py-hashids: Add py-hashids 1.3.1
    
    hashids is a Python port of the JavaScript hashids implementation. It generates
    YouTube-like hashes from one or many numbers. Use hashids when you do not want
    to expose your database ids to the user.
    
    WWW: https://github.com/davidaurelio/hashids-python
---
 textproc/Makefile                  |  1 +
 textproc/py-hashids/Makefile       | 28 ++++++++++++++++++++++++++++
 textproc/py-hashids/distinfo       |  3 +++
 textproc/py-hashids/files/setup.py | 18 ++++++++++++++++++
 textproc/py-hashids/pkg-descr      |  5 +++++
 5 files changed, 55 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 7cbdf8c9d171..833f0a829841 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1294,6 +1294,7 @@
     SUBDIR += py-googletrans
     SUBDIR += py-grako
     SUBDIR += py-guess-language
+    SUBDIR += py-hashids
     SUBDIR += py-hexdump
     SUBDIR += py-hieroglyph
     SUBDIR += py-hjson
diff --git a/textproc/py-hashids/Makefile b/textproc/py-hashids/Makefile
new file mode 100644
index 000000000000..38aa8c65a293
--- /dev/null
+++ b/textproc/py-hashids/Makefile
@@ -0,0 +1,28 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	hashids
+PORTVERSION=	1.3.1
+CATEGORIES=	textproc python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Implement the hashids algorithm in python
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
+
+USES=		python:3.5+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+post-patch:
+	@${CP} ${FILESDIR}/setup.py ${WRKSRC}/
+
+do-test:
+	cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v
+
+.include <bsd.port.mk>
diff --git a/textproc/py-hashids/distinfo b/textproc/py-hashids/distinfo
new file mode 100644
index 000000000000..36cdaa8f19fd
--- /dev/null
+++ b/textproc/py-hashids/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1625585426
+SHA256 (hashids-1.3.1.tar.gz) = 6c3dc775e65efc2ce2c157a65acb776d634cb814598f406469abef00ae3f635c
+SIZE (hashids-1.3.1.tar.gz) = 7884
diff --git a/textproc/py-hashids/files/setup.py b/textproc/py-hashids/files/setup.py
new file mode 100644
index 000000000000..f8b9328f2033
--- /dev/null
+++ b/textproc/py-hashids/files/setup.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# setup.py generated by flit for tools that don't yet use PEP 517
+
+from distutils.core import setup
+
+extras_require = \
+{'test': ['pytest >=2.1.0']}
+
+setup(name='hashids',
+      version='1.3.1',
+      description='Implements the hashids algorithm in python. For more information, visit http://hashids.org/',
+      author='David Aurelio',
+      author_email='dev@david-aurelio.com',
+      url='https://hashids.org/python/',
+      py_modules=['hashids'],
+      extras_require=extras_require,
+      python_requires='>=2.7',
+     )
diff --git a/textproc/py-hashids/pkg-descr b/textproc/py-hashids/pkg-descr
new file mode 100644
index 000000000000..f93395bc96e6
--- /dev/null
+++ b/textproc/py-hashids/pkg-descr
@@ -0,0 +1,5 @@
+hashids is a Python port of the JavaScript hashids implementation. It generates
+YouTube-like hashes from one or many numbers. Use hashids when you do not want
+to expose your database ids to the user.
+
+WWW: https://github.com/davidaurelio/hashids-python



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107141616.16EGGSKV008209>