Re: [aur-general] Help with PKGBUILD for python-txtorcon
On 06/29/2017 11:13 AM, Storm Dragon via aur-general wrote: > Howdy, > My package requires a new dependancy called python-txtorcon. I wanted to > provide both python2 and python3 versions of this package, so I made the > PKGBUILD using the package python-twisted as a guide. I think I have done > pretty much everything right, and it works for me, but there are some who are > having trouble with it: > https://aur.archlinux.org/packages/magic-wormhole/?comments=all > I have attached the PKGBUILD for python-txtorcon. Can someone please take a > look at it and see if there is anything wrong? > Thanks for the help :) That package provides a module, not a tool, therefore it should indeed be python-txtorcon rather than the pre-existing txtorcon. So you made the right call[1] -- next step is to submit a deletion/merge request for the txtorcon package which should not exist at all. The only real criticism I have of your PKGBUILD is that the source should look like: "${_pkgname}-${pkgver}.tar.gz::https://github.com/meejah/$_pkgname/archive/v$pkgver.tar.gz; This will rename the file download so it doesn't clash with other PKGBUILDs in the event that users have set $SRCDEST to some communal download location. Also consider having the python2 package provide "txtorcon" for the sake of packages which had a dependency on the old pkgname. (That being said, only one package depends on it and that already has two unresolvable dependencies...) Also while I am at it, your "magic-wormhole" package should use a more predictable source URL since PyPI sucks by default, see the Wiki for details[1]. This will prevent you from having to update a hardcoded URL by hand each time you update, and instead allow you to rely on the $pkgver variable. [1] https://wiki.archlinux.org/index.php/Python_package_guidelines -- Eli Schwartz signature.asc Description: OpenPGP digital signature
[aur-general] Help with PKGBUILD for python-txtorcon
Howdy, My package requires a new dependancy called python-txtorcon. I wanted to provide both python2 and python3 versions of this package, so I made the PKGBUILD using the package python-twisted as a guide. I think I have done pretty much everything right, and it works for me, but there are some who are having trouble with it: https://aur.archlinux.org/packages/magic-wormhole/?comments=all I have attached the PKGBUILD for python-txtorcon. Can someone please take a look at it and see if there is anything wrong? Thanks for the help :) Storm -- Powered by Arch Linux! I am registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.tk/ get my public PGP key: gpg --keyserver wwwkeys.pgp.net --recv-key 43DDC193 Twitter and Facebook are so ... yesteryear. Get your 2MB Social account TODAY! http://2mb.social/main/register How many Internet mail list subscribers does it take to change a lightbulb? http://goo.gl/eO4PJ "Every day is Halloween" Type O Negative - Black No. One # maintainer Storm Dragonpkgbase='python-txtorcon' _pkgname='txtorcon' pkgname=('python2-txtorcon' 'python-txtorcon') pkgver=0.19.3 pkgrel=1 pkgdesc='A Twisted-based Python asynchronous controller library for Tor' arch=('any') url='https://txtorcon.readthedocs.org/' license=('MIT') makedepends=('python-setuptools' 'python2-setuptools') source=("https://github.com/meejah/$_pkgname/archive/v$pkgver.tar.gz;) sha256sums=('37b87507e96e4210988c5bb45b64273238e101c77b51702535d2cd46d241b3e3') prepare() { cp -a ${_pkgname}-${pkgver}{,-py2} sed -i 's:^#!/usr/bin/env python$:\02:' ${_pkgname}-${pkgver}-py2/examples/*.py } build() { cd "$srcdir"/${_pkgname}-${pkgver} python setup.py build cd "$srcdir"/${_pkgname}-${pkgver}-py2 python2 setup.py build } package_python-txtorcon() { depends=('python-geoip' 'python-ipaddress' 'python-twisted') cd "$srcdir/$_pkgname-$pkgver" python setup.py install --root="$pkgdir/" --optimize=1 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } package_python2-txtorcon() { depends=('python2-geoip' 'python2-ipaddress' 'python2-twisted') cd "$srcdir/${_pkgname}-$pkgver-py2" python2 setup.py install --root="$pkgdir/" --optimize=1 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } # vim:set ts=2 sw=2 et: signature.asc Description: PGP signature