Skip to content

Commit

Permalink
www/py-urlwatch: Update to 2.25
Browse files Browse the repository at this point in the history
* Fix BUILD if DOCS option is unset as BINARY_ALIAS can only be used if
  textproc/py-sphinx (enabled via the DOCS option) is present.

* Add EXAMPLES option to let users choose to install the supplied
  examples.

Changelog:

https://github.com/thp/urlwatch/blob/2.25/CHANGELOG.md

MFH:		2022Q2
  • Loading branch information
knobix committed May 8, 2022
1 parent 27beb35 commit b693974
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
17 changes: 11 additions & 6 deletions www/py-urlwatch/Makefile
@@ -1,5 +1,5 @@
PORTNAME= urlwatch
DISTVERSION= 2.24
DISTVERSION= 2.25
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -10,9 +10,8 @@ COMMENT= Monitors webpages and sends notifications about changes
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}minidb>0:databases/py-minidb@${PY_FLAVOR} \
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}minidb>=2.0.6:databases/py-minidb@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}appdirs>0:devel/py-appdirs@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycodestyle>0:devel/py-pycodestyle@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}keyring>0:security/py-keyring@${PY_FLAVOR} \
Expand All @@ -21,6 +20,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}minidb>0:databases/py-minidb@${PY_FLAVOR} \
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pdftotext>0:textproc/py-pdftotext@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycodestyle>0:devel/py-pycodestyle@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}jq>0:textproc/py-jq@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytesseract>0:graphics/py-pytesseract@${PY_FLAVOR} \
Expand All @@ -30,13 +30,14 @@ USES= python:3.6+
USE_LOCALE= en_US.UTF-8
USE_PYTHON= autoplist concurrent distutils

BINARY_ALIAS= sphinx-build=sphinx-build-${PYTHON_VER}
NO_ARCH= yes

OPTIONS_DEFINE= DOCS
PORTEXAMPLES= hooks.py.example urls.yaml.example

OPTIONS_DEFINE= DOCS EXAMPLES
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
DOCS_PORTDOCS= html/* text/*
DOCS_VARS= USES+=gmake
DOCS_VARS= BINARY_ALIAS=sphinx-build=sphinx-build-${PYTHON_VER} USES+=gmake

post-build-DOCS-on:
cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} -j${MAKE_JOBS_NUMBER} html text
Expand All @@ -47,6 +48,10 @@ post-install-DOCS-on:
(cd ${WRKSRC}/docs/build && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR} "! -name .buildinfo")
(cd ${WRKSRC}/docs/build && ${COPYTREE_SHARE} text ${STAGEDIR}${DOCSDIR})

post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/share/urlwatch/examples && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}

do-test:
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v

Expand Down
6 changes: 3 additions & 3 deletions www/py-urlwatch/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1636312807
SHA256 (urlwatch-2.24.tar.gz) = f0b36db4bccd38923b178b66408c0d80d3103b7257f286b78e87d991283b86d7
SIZE (urlwatch-2.24.tar.gz) = 141175
TIMESTAMP = 1647542896
SHA256 (urlwatch-2.25.tar.gz) = 6802297d3318286e7f3d36b9a4567a2fb09b0ae779d4b76811dd29a7281c1f8a
SIZE (urlwatch-2.25.tar.gz) = 168241
15 changes: 15 additions & 0 deletions www/py-urlwatch/files/patch-setup.py
@@ -0,0 +1,15 @@
Let users decide to install the examples files via the EXAMPLES option.

--- setup.py.orig 2022-05-08 10:57:35 UTC
+++ setup.py
@@ -39,10 +39,6 @@ m['data_files'] = [
'share/man/man7/urlwatch-deprecated.7',
'share/man/man7/urlwatch-intro.7',
]),
- ('share/urlwatch/examples', [
- 'share/urlwatch/examples/hooks.py.example',
- 'share/urlwatch/examples/urls.yaml.example',
- ]),
]
m['project_urls'] = {
'Source': 'https://github.com/thp/urlwatch',

0 comments on commit b693974

Please sign in to comment.