From: W. Trevor King Date: Fri, 12 Aug 2016 20:50:30 +0000 (-0700) Subject: libthumbor-9999.ebuild: Add ebuild X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=refs%2Fheads%2Fdev-python%2Flibthumbor;p=wtk-overlay.git libthumbor-9999.ebuild: Add ebuild I've submitted the setup.py sed upstream [1]. [1]: https://github.com/thumbor/libthumbor/pull/31 Subject: Cleanup tests/ packaging --- ea64a92dad79be0b8d5d33c3fe09ec8d072cdb64 diff --git a/libthumbor-9999.ebuild b/libthumbor-9999.ebuild new file mode 100644 index 0000000..b220b43 --- /dev/null +++ b/libthumbor-9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="git://github.com/heynemann/${PN}.git" + SRC_URI="" +else + SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +fi + +DESCRIPTION="Generate Thumbor URLs from Python" +HOMEPAGE="https://github.com/thumbor/libthumbor https://pypi.python.org/pypi/libthumbor" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=" + dev-python/six[${PYTHON_USEDEP}] + " + +DEPEND=" + test? ( + ${RDEPEND} + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/flake8[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/preggy[${PYTHON_USEDEP}] + )" + +python_prepare_all() { + sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests', 'tests.*'])/" setup.py || die + distutils-r1_python_prepare_all +} + +python_test() { + "${EPYTHON}" -c 'import coverage; coverage.main()' run --branch $(command -v nosetests) --nocapture tests || + die "tests failed with ${EPYTHON}" +}