[arch-commits] Commit in (4 files)

Eli Schwartz eschwartz at archlinux.org
Thu Sep 19 00:50:33 UTC 2019


    Date: Thursday, September 19, 2019 @ 00:50:33
  Author: eschwartz
Revision: 511126

Initial upload: python-pastel 0.1.1-1

Needed in order to package python-poetry

Added:
  python-pastel/
  python-pastel/repos/
  python-pastel/trunk/
  python-pastel/trunk/PKGBUILD

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Added: python-pastel/trunk/PKGBUILD
===================================================================
--- python-pastel/trunk/PKGBUILD	                        (rev 0)
+++ python-pastel/trunk/PKGBUILD	2019-09-19 00:50:33 UTC (rev 511126)
@@ -0,0 +1,53 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=pastel
+pkgbase=python-pastel
+pkgname=('python-pastel' 'python2-pastel')
+pkgver=0.1.1
+pkgrel=1
+pkgdesc="Bring colors to your terminal"
+arch=('any')
+url="https://github.com/sdispater/${_pkgname}"
+license=('MIT')
+makedepends=('python-dephell' 'python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('bf3b1901b2442ea0d8ab9a390594e5b0c9584709d543a3113506fe8b28cbace3')
+b2sums=('b3f9840e1e92342f9c2836005b33b5fd3f3e5a22f99fdb5be29eb42bd72b6cf3ca1109186b0bb85fc8c8dca8810c54c72ca85726a3eea23cf29d4052056ac741')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # poetry does not generate correct setup.py, nuke it and recreate from scratch
+    dephell deps convert --from pyproject.toml --to setup.py
+}
+
+build(){
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+    python2 setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python -m pytest
+    python2 -m pytest
+}
+
+package_python-pastel() {
+    depends=('python')
+
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python2-pastel() {
+    depends=('python2')
+
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+    python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}


More information about the arch-commits mailing list