From c56dd0fb8e2dc30458b13e1366a9c1402d9c945a Mon Sep 17 00:00:00 2001 From: Louis Sautier Date: Sun, 10 May 2020 12:22:24 +0200 Subject: www-misc/urlwatch: fix failure when pycodestyle is not installed Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Louis Sautier --- .../urlwatch-2.18-pycodestyle-requirement.patch | 15 +++++ www-misc/urlwatch/urlwatch-2.18-r1.ebuild | 64 ++++++++++++++++++++++ www-misc/urlwatch/urlwatch-2.18.ebuild | 60 -------------------- 3 files changed, 79 insertions(+), 60 deletions(-) create mode 100644 www-misc/urlwatch/files/urlwatch-2.18-pycodestyle-requirement.patch create mode 100644 www-misc/urlwatch/urlwatch-2.18-r1.ebuild delete mode 100644 www-misc/urlwatch/urlwatch-2.18.ebuild (limited to 'www-misc/urlwatch') diff --git a/www-misc/urlwatch/files/urlwatch-2.18-pycodestyle-requirement.patch b/www-misc/urlwatch/files/urlwatch-2.18-pycodestyle-requirement.patch new file mode 100644 index 000000000000..587a55ab03c8 --- /dev/null +++ b/www-misc/urlwatch/files/urlwatch-2.18-pycodestyle-requirement.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index 5f85aaf..7466787 100644 +--- a/setup.py ++++ b/setup.py +@@ -17,9 +17,7 @@ if sys.version_info < (3, 3): + m['name'] = 'urlwatch' + m['author'], m['author_email'] = re.match(r'(.*) <(.*)>', m['author']).groups() + m['description'], m['long_description'] = docs[0].strip().split('\n\n', 1) +-m['install_requires'] = ['minidb', 'PyYAML', 'requests', 'keyring', 'pycodestyle', 'appdirs', 'lxml', 'cssselect'] +-if sys.version_info < (3, 4): +- m['install_requires'].extend(['enum34']) ++m['install_requires'] = ['minidb', 'PyYAML', 'requests', 'keyring', 'appdirs', 'lxml', 'cssselect'] + if sys.platform == 'win32': + m['install_requires'].extend(['colorama']) + m['entry_points'] = {"console_scripts": ["urlwatch=urlwatch.cli:main"]} diff --git a/www-misc/urlwatch/urlwatch-2.18-r1.ebuild b/www-misc/urlwatch/urlwatch-2.18-r1.ebuild new file mode 100644 index 000000000000..d8fcfd698a28 --- /dev/null +++ b/www-misc/urlwatch/urlwatch-2.18-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +# The package uses entry points but setup.py is weird +# so the eclass doesn't detect it +DISTUTILS_USE_SETUPTOOLS=manual + +inherit distutils-r1 + +DESCRIPTION="A tool for monitoring webpages for updates" +HOMEPAGE="https://thp.io/2008/urlwatch/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-python/appdirs[${PYTHON_USEDEP}] + dev-python/cssselect[${PYTHON_USEDEP}] + dev-python/keyring[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/minidb[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pycodestyle[${PYTHON_USEDEP}] + ) +" + +# This will be in the next release +# https://github.com/thp/urlwatch/commit/44e862282d39a6e23f67c3c0240a93cccbb41a55 +PATCHES=( "${FILESDIR}/${P}-pycodestyle-requirement.patch" ) + +DOCS=( CHANGELOG.md README.md ) + +distutils_enable_tests nose + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + if ! has_version dev-python/chump; then + elog "Install 'dev-python/chump' to enable Pushover" \ + "notifications support" + fi + if ! has_version dev-python/pushbullet-py; then + elog "Install 'dev-python/pushbullet-py' to enable" \ + "Pushbullet notifications support" + fi + elog "HTML parsing can be improved by installing one of the following packages" + elog "and changing the html2text subfilter parameter:" + elog "dev-python/beautifulsoup:4" + elog "app-text/html2text" + elog "dev-python/html2text" + elog "www-client/lynx" + fi +} diff --git a/www-misc/urlwatch/urlwatch-2.18.ebuild b/www-misc/urlwatch/urlwatch-2.18.ebuild deleted file mode 100644 index 4c0c01c582b3..000000000000 --- a/www-misc/urlwatch/urlwatch-2.18.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -# The package uses entry points but setup.py is weird -# so the eclass doesn't detect it -DISTUTILS_USE_SETUPTOOLS=manual - -inherit distutils-r1 - -DESCRIPTION="A tool for monitoring webpages for updates" -HOMEPAGE="https://thp.io/2008/urlwatch/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -RDEPEND=" - dev-python/appdirs[${PYTHON_USEDEP}] - dev-python/cssselect[${PYTHON_USEDEP}] - dev-python/keyring[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/minidb[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - ${RDEPEND} - dev-python/nose[${PYTHON_USEDEP}] - dev-python/pycodestyle[${PYTHON_USEDEP}] - ) -" - -DOCS=( CHANGELOG.md README.md ) - -distutils_enable_tests nose - -pkg_postinst() { - if [[ -z "${REPLACING_VERSIONS}" ]]; then - if ! has_version dev-python/chump; then - elog "Install 'dev-python/chump' to enable Pushover" \ - "notifications support" - fi - if ! has_version dev-python/pushbullet-py; then - elog "Install 'dev-python/pushbullet-py' to enable" \ - "Pushbullet notifications support" - fi - elog "HTML parsing can be improved by installing one of the following packages" - elog "and changing the html2text subfilter parameter:" - elog "dev-python/beautifulsoup:4" - elog "app-text/html2text" - elog "dev-python/html2text" - elog "www-client/lynx" - fi -} -- cgit v1.2.3-65-gdbad