From e06b4ca8634d6ddd8cca00f022f169818119f9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 27 May 2020 22:19:52 +0200 Subject: [PATCH] python-tweepy: add python_version=2/3; fix LICENSE The download of LICENSE as a distfile does not work w/o create_wrksrc=yes which OTOH makes it impossible (for me that is) to build this package. Instead fetch the LICENSE text in th post_install() function and verify its digest which seems to change at least once per year. --- srcpkgs/python-tweepy/template | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python-tweepy/template b/srcpkgs/python-tweepy/template index 867b8b9a15c..2487511922a 100644 --- a/srcpkgs/python-tweepy/template +++ b/srcpkgs/python-tweepy/template @@ -12,13 +12,19 @@ short_desc="Twitter library for Python2" maintainer="Orphaned " license="MIT" homepage="https://github.com/tweepy/tweepy" -distfiles="${PYPI_SITE}/t/tweepy/tweepy-${version}.tar.gz - https://raw.githubusercontent.com/tweepy/tweepy/master/LICENSE>LICENSE.txt" -checksum="8abd828ba51a85a2b5bb7373715d6d3bb32d18ac624e3a4db02e4ef8ab48316b - bf9bc5b9dcb8421bb3c342bb7fd29194688e1262b50766bd71b21a07461e74b7" +distfiles="${PYPI_SITE}/t/tweepy/tweepy-${version}.tar.gz" +checksum=8abd828ba51a85a2b5bb7373715d6d3bb32d18ac624e3a4db02e4ef8ab48316b +python_version=2 post_install() { - vlicense ../LICENSE.txt + # We cannot fetch this as distfile without create_wrksrc=yes which + # OTOH makes it difficult to build. Just fetch the LICENSE text now. + $XBPS_FETCH_CMD -o LICENSE.txt https://raw.githubusercontent.com/tweepy/tweepy/master/LICENSE + digest=$($XBPS_DIGEST_CMD