PKGBUILD 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Maintainer: bill-auger <bill-auger@programmer.net>
  2. # Maintainer (AUR): tocic <tocic at protonmail dot ch>
  3. # Contributor: Carl George < arch at cgtx dot us >
  4. #_check=1
  5. pkgname=('python-falcon' 'python2-falcon')
  6. pkgver=1.4.1
  7. pkgrel=1
  8. pkgdesc="An unladen web framework for building APIs and app backends."
  9. arch=('i686' 'x86_64')
  10. url=https://falconframework.org
  11. license=('Apache')
  12. makedepends=('cython' 'python-setuptools' 'cython2' 'python2-setuptools')
  13. [[ -v ${_run_check} ]] && checkdepends=('python-pytest>=3.0.1' 'python-jsonschema'
  14. 'python-msgpack' 'python-requests'
  15. 'python-six>=1.4.0' 'python-testtools' 'python-yaml'
  16. 'python2-pytest>=3.0.1' 'python2-jsonschema'
  17. 'python2-msgpack' 'python2-requests'
  18. 'python2-six>=1.4.0' 'python2-testtools' 'python2-yaml')
  19. _upstream_name='falcon'
  20. _release=${_upstream_name}-${pkgver}
  21. source=(https://files.pythonhosted.org/packages/source/${_upstream_name:0:1}/${_upstream_name}/${_release}.tar.gz)
  22. sha256sums=('3981f609c0358a9fcdb25b0e7fab3d9e23019356fb429c635ce4133135ae1bc4')
  23. build()
  24. {
  25. cd "${srcdir}/${_release}"
  26. python setup.py build
  27. python2 setup.py build
  28. }
  29. check()
  30. {
  31. cd "${srcdir}/${_release}"
  32. if [[ -v _check ]] ; then pytest tests ; pytest2 tests ; fi ;
  33. }
  34. package_python-falcon()
  35. {
  36. depends=('python-six>=1.4.0' 'python-mimeparse>=1.5.2')
  37. cd "${srcdir}/${_release}"
  38. python setup.py install --skip-build --root="${pkgdir}" --optimize=1
  39. }
  40. package_python2-falcon()
  41. {
  42. depends=('python2-six>=1.4.0' 'python2-mimeparse>=1.5.2')
  43. cd "${srcdir}/${_release}"
  44. python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
  45. mv "${pkgdir}/usr/bin/falcon-bench" "${pkgdir}/usr/bin/falcon-bench-python2"
  46. mv "${pkgdir}/usr/bin/falcon-print-routes" "${pkgdir}/usr/bin/falcon-print-routes-python2"
  47. }