diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-07-14 15:48:11 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-07-14 16:09:35 +0000 |
commit | af826bb9a862aeffb896e8a621b31d4a382e2496 (patch) | |
tree | fcd63458cd5155df07054d81752cf909baab2f36 | |
parent | 3482259da6b939bedcde374ce94d3833a333a748 (diff) | |
download | ports-af826bb9a862aeffb896e8a621b31d4a382e2496.tar.gz ports-af826bb9a862aeffb896e8a621b31d4a382e2496.zip |
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
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/py-hashids/Makefile | 28 | ||||
-rw-r--r-- | textproc/py-hashids/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-hashids/files/setup.py | 18 | ||||
-rw-r--r-- | textproc/py-hashids/pkg-descr | 5 |
5 files changed, 55 insertions, 0 deletions
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 |