You are not logged in.

#1 2017-06-01 18:52:32

rich_c
Member
Registered: 2016-08-21
Posts: 7

PKGBUILD Review Request

Good afternoon, everyone!

I am submitting my first PKGBUILD for review.  This is for installing the Python module 'quandl', which allows use of an API to access the data more easily than downloading .csv files, etc.

I read through the Wiki and documentation, and looked at several examples from other Python-related AUR packages.  I commented out lines that I was unsure of, but didn't want to delete outright.

Thank you, in advance, for the help!

# Maintainer: Rich Carpenter <cpl3043usmc@gmail.com>

pkgname=python-quandl
pkgver=3.1.0
pkgrel=1
pkgdesc="Python module for quandl API access"
arch=('any')
url="https://github.com/quandl/quandl-python"
license=('MIT')
# groups=()
depends=('python' 'python-numpy' 'python-pandas')
makedepends=('python' 'python-numpy' 'python-pandas')
# optdepends=()
# install=()
# changelog=()
source=('https://pypi.python.org/packages/84/68/877bcb3b0fd9c6a31ff8227c772b3d4c007cd23d918b78acdcb7fdf7d41e/Quandl-3.1.0.tar.gz#md5=19d74e408c15d5ac529588f7849a1083')
# noextract=()
md5sums=('19d74e408c15d5ac529588f7849a1083')

# build() {
#    cd "$srcdir/$pkgname-$pkgver"
#    python setup.py build
# }

package() {
    cd "$srcdir/$pkgname-$pkgver"
    python setup.py install --root="$pkgdir/" --optimize=1
}

Last edited by rich_c (2017-06-01 18:53:47)

Offline

#2 2017-06-01 19:41:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: PKGBUILD Review Request

I'm not much help on python-specifics (e.g. whether the build function should be used at all), but you should get rid of the makedepends as they are all already in the depends array so they should not be listed.

The group, install, changelog and noextract can all also be removed; if there was anything to put there, you'd know it already.  Optdepends can be deleted if it remains empty, but it is possible there could be optdepends that may not yet be immediately obvious.  Of course commented out lines have no affect on functionality, but it's handy to trim them out for cleanliness.

For the source array, I doubt the anchor tag is needed.  If it isn't, then trim that (the '#' and everything after it in the url).

Other than that, this looks good from here (though I've not tested it).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB