textproc/py-normality: Update to 2.1.1

* Switch to GitHub for a while to make use of the test suite.

* Add default option ICU to reflect the requirements given in setup.py.

* Also add a workaround to avoid configure/build errors with Python < 3.7.

Changelog since 1.0.0:

https://github.com/pudo/normality/compare/1.0.0...2.1.1
This commit is contained in:
Kai Knoblich 2020-12-16 12:12:55 +00:00
parent 548aff72ad
commit 3dc7909274
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=558222
3 changed files with 38 additions and 12 deletions

View File

@ -1,9 +1,8 @@
# $FreeBSD$
PORTNAME= normality
DISTVERSION= 1.0.0
DISTVERSION= 2.1.1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= kai@FreeBSD.org
@ -12,18 +11,31 @@ COMMENT= Micro-library to normalize text strings
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.11.0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}banal>=0.4.1:devel/py-banal@${PY_FLAVOR} \
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}banal>=1.0.1:devel/py-banal@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyicu>=1.9.3:devel/py-pyicu@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}text-unidecode>=0:converters/py-text-unidecode@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
USES= python:3.5+
USE_GITHUB= yes
GH_ACCOUNT= pudo
USE_PYTHON= distutils autoplist
NO_ARCH= yes
post-extract:
# Prevents that the tests directory will be installed into site-packages
@(cd ${WRKSRC} && ${MV} tests test)
OPTIONS_DEFINE= ICU
OPTIONS_DEFAULT= ICU
.include <bsd.port.mk>
ICU_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyicu>=1.9.3:devel/py-pyicu@${PY_FLAVOR}
.include <bsd.port.pre.mk>
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
.if ${PYTHON_REL} < 3700
USE_LOCALE= en_US.UTF-8
.endif
do-test:
@cd ${WRKSRC} && ${SET_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1553384072
SHA256 (normality-1.0.0.tar.gz) = 94c1f8f72c14ffc82296351fafba70bcfdc6b4c79bc385318de1b1fbe9985b22
SIZE (normality-1.0.0.tar.gz) = 7608
TIMESTAMP = 1607595816
SHA256 (pudo-normality-2.1.1_GH0.tar.gz) = 26aa1cd461344eb717d8b12f844003ff44ccb9a514c6c03322f355fe4f7e2222
SIZE (pudo-normality-2.1.1_GH0.tar.gz) = 8485

View File

@ -0,0 +1,14 @@
Really exclude "tests" directory to be installed into
${PYTHONPREFIX_SITELIBDIR}
--- setup.py.orig 2020-06-21 09:47:38 UTC
+++ setup.py
@@ -24,7 +24,7 @@ setup(
url='http://github.com/pudo/normality',
license='MIT',
package_data={'banal': ['py.typed']},
- packages=find_packages(exclude=['ez_setup', 'examples', 'test']),
+ packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
namespace_packages=[],
include_package_data=True,
zip_safe=False,