Import py-blurhash, a python implementation of the blurhash algorithm,

used by the mastodon software to hide sensitive images using compact
placeholders.

OK kmos phessler
This commit is contained in:
pamela 2020-09-13 03:15:53 +00:00
parent 2707d7cf95
commit 3478840ab4
5 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/09/13 03:15:53 pamela Exp $
COMMENT = python implementation of the blurhash algorithm
MODPY_EGG_VERSION = 1.1.4
DISTNAME = blurhash-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = graphics
HOMEPAGE = https://github.com/halcy/blurhash-python
MAINTAINER = Pamela Mosiejczuk <pamela@openbsd.org>
# MIT
PERMIT_PACKAGE = Yes
MODULES = lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
MODPY_PYTEST = Yes
TEST_DEPENDS = graphics/py-Pillow${MODPY_FLAVOR} \
math/py-numpy${MODPY_FLAVOR}
FLAVORS = python3
FLAVOR = python3
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (blurhash-1.1.4.tar.gz) = 2laxY+WoFuStBxcvVjkodpjgnX89w40Y2XJtnB28TO4=
SIZE (blurhash-1.1.4.tar.gz) = 4738

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-setup_cfg,v 1.1.1.1 2020/09/13 03:15:53 pamela Exp $
Fixed pytest error by removing reference to coverage.
Index: setup.cfg
--- setup.cfg.orig
+++ setup.cfg
@@ -4,9 +4,6 @@ universal = 1
[aliases]
test = pytest
-[tool:pytest]
-addopts = --cov=blurhash
-
[egg_info]
tag_build =
tag_date = 0

View File

@ -0,0 +1,6 @@
Blurhash is an algorithm that lets you transform image data into a small
text representation of a blurred version of the image. This is useful
since this small textual representation can be included when sending
objects that may have images attached around, which then can be used to
quickly create a placeholder for images that are still loading or that
should be hidden behind a content warning.

View File

@ -0,0 +1,13 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/09/13 03:15:53 pamela Exp $
lib/python${MODPY_VERSION}/site-packages/blurhash/
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt
lib/python${MODPY_VERSION}/site-packages/blurhash-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
lib/python${MODPY_VERSION}/site-packages/blurhash/__init__.py
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/blurhash/${MODPY_PYCACHE}/
lib/python${MODPY_VERSION}/site-packages/blurhash/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/blurhash/${MODPY_PYCACHE}blurhash.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/blurhash/blurhash.py