mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-06 23:23:51 +02:00
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.
This commit is contained in:
parent
94d5337d3f
commit
e06b4ca863
1 changed files with 13 additions and 6 deletions
|
@ -12,13 +12,19 @@ short_desc="Twitter library for Python2"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
homepage="https://github.com/tweepy/tweepy"
|
homepage="https://github.com/tweepy/tweepy"
|
||||||
distfiles="${PYPI_SITE}/t/tweepy/tweepy-${version}.tar.gz
|
distfiles="${PYPI_SITE}/t/tweepy/tweepy-${version}.tar.gz"
|
||||||
https://raw.githubusercontent.com/tweepy/tweepy/master/LICENSE>LICENSE.txt"
|
checksum=8abd828ba51a85a2b5bb7373715d6d3bb32d18ac624e3a4db02e4ef8ab48316b
|
||||||
checksum="8abd828ba51a85a2b5bb7373715d6d3bb32d18ac624e3a4db02e4ef8ab48316b
|
python_version=2
|
||||||
bf9bc5b9dcb8421bb3c342bb7fd29194688e1262b50766bd71b21a07461e74b7"
|
|
||||||
|
|
||||||
post_install() {
|
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 <LICENSE.txt)
|
||||||
|
if [ "$digest" != "ae8fd13a3925130beb68500cccb62b559e1fbefd8b14e73d6eb208e2e4277841" ]; then
|
||||||
|
msg_error "LICENSE digest changed: $digest\n"
|
||||||
|
fi
|
||||||
|
vlicense LICENSE.txt
|
||||||
# remove examples from site-packages root
|
# remove examples from site-packages root
|
||||||
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/examples
|
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/examples
|
||||||
}
|
}
|
||||||
|
@ -28,8 +34,9 @@ python3-tweepy_package() {
|
||||||
pycompile_module="tweepy"
|
pycompile_module="tweepy"
|
||||||
depends="python3-requests-oauthlib python3-six python3-pysocks"
|
depends="python3-requests-oauthlib python3-six python3-pysocks"
|
||||||
short_desc="${short_desc/Python2/Python3}"
|
short_desc="${short_desc/Python2/Python3}"
|
||||||
|
python_version=3
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/lib/python3*
|
vmove usr/lib/python3*
|
||||||
vlicense ../LICENSE.txt
|
vlicense LICENSE.txt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue