You are not logged in.
Dear all,
while packaging python software is mostly straight forward, I kindly ask for your review as its the first time I do that.
flat-responive: An extension for Django admin that makes interfaces mobile friendly
Should I mention python as a dependency or is this implicit by python-django
Is it preferred to do a split package for python 2/3, or is it ok to package python 3 only, as I don't need python 2 support
The arch packaging guideline for python mentions that the source should be taken from [1]. However, I can't find the sources of my packages using this URL scheme. Is my source also ok?
# Maintainer: Wolfgang Mader <Wolfgang dot Mader at brain-frog dot de>
_name=django-flat-responsive
pkgname=("python-${_name}")
pkgver=2.0
pkgrel=1
pkgdesc="An extension for Django admin that makes interface mobile friendly"
arch=('any')
url="https://pypi.python.org/pypi/django-flat-responsive"
license=('BSD')
depends=('python-django')
makedepends=('python-setuptools')
source=("https://pypi.python.org/packages/02/c9/35732ae69908854d4ef9a2bfaa75c9ca002f62decbff711ea1c9541f1142/${_name}-${pkgver}.tar.gz")
md5sums=("0b861d898fcdb40488b0dffe4f38aba6")
build() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py build
}
package() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py install --root="$pkgdir/" --optimize=1
}
Language detect: Language detection library ported from Google's language-detection
# Maintainer: Wolfgang Mader <Wolfgang dot Mader at brain-frog dot de>
_name=langdetect
pkgname=("python-${_name}")
pkgver=1.0.7
pkgrel=1
pkgdesc="Language detection library ported from Google's language-detection"
arch=('any')
url="https://github.com/Mimino666/langdetect"
license=('apache-ant')
depends=('python')
makedepends=('python-setuptools')
source=("https://pypi.python.org/packages/59/59/4bc44158a767a6d66de18c4136c8aa90491d56cc951c10b74dd1e13213c9/${_name}-${pkgver}.zip")
md5sums=("6675db2d8abccb97246372767270e912")
build() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py build
}
package() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py install --root="$pkgdir/" --optimize=1
}
Thank you for your comments. Let's keep the AUR clean!
Best,
Wolfgang
Offline
Should I mention python as a dependency or is this implicit by python-django
See PKGBUILD#Dependencies it is not required but it is not prohibited.
python-django also has python-setuptools as a dependency so you could choose to remove that.
The BSD license is a special case see PKGBUILD#license also I do not see apache-ant in the licenses package.
Edit:
https://github.com/Mimino666/langdetect … er/LICENSE so license APACHE
Edit2:
Using source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") on python-django-flat-responsive
$ makepkg -odd
==> Making package: python-django-flat-responsive 2.0-1 (Thu 18 Jan 21:17:50 GMT 2018)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Downloading django-flat-responsive-2.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6350 100 6350 0 0 6350 0 0:00:01 --:--:-- 0:00:01 6350
==> Validating source files with md5sums...
django-flat-responsive-2.0.tar.gz ... Passed
==> Extracting sources...
-> Extracting django-flat-responsive-2.0.tar.gz with bsdtar
==> Sources are ready.
Using source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.zip") on python-langdetect (needs .zip instead of .tar.gz)
$ makepkg -odd
==> Making package: python-langdetect 1.0.7-1 (Thu 18 Jan 21:28:10 GMT 2018)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Downloading langdetect-1.0.7.zip...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 974k 100 974k 0 0 974k 0 0:00:01 --:--:-- 0:00:01 974k
==> Validating source files with md5sums...
langdetect-1.0.7.zip ... Passed
==> Extracting sources...
-> Extracting langdetect-1.0.7.zip with bsdtar
==> Sources are ready.
Last edited by loqs (2018-01-18 21:30:18)
Offline
Thank you, especially for the correction on the Source field. I will improve accordingly.
Offline