Advertisement
Guest User

PKBUILD python2-pillow

a guest
Apr 14th, 2021
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. # Maintainer: Eli Schwartz <eschwartz@archlinux.org>
  2. # Maintainer: Kyle Keen <keenerd@gmail.com>
  3. # Contributor: minder
  4.  
  5. _pkgname=Pillow
  6. pkgname=python2-pillow
  7. pkgver=6.2.2
  8. pkgrel=1
  9. pkgdesc="Python Imaging Library (PIL) fork."
  10. arch=('x86_64')
  11. url="https://python-pillow.github.io/"
  12. license=('BSD')
  13. depends=('python2' 'lcms2' 'libtiff' 'openjpeg2' 'libimagequant')
  14. makedepends=('python2-setuptools' 'freetype2' 'libraqm' 'libwebp' 'tk')
  15. optdepends=('freetype2: for the ImageFont module'
  16. 'ghostscript: for EPS images'
  17. 'libraqm: for complex text scripts'
  18. 'libwebp: for webp images'
  19. 'tk: for the ImageTK module'
  20. 'python2-olefile: OLE2 file support')
  21. checkdepends=('python2-pytest' 'xorg-server-xvfb' 'python2-olefile'
  22. 'python2-cffi' 'python2-numpy' 'ghostscript')
  23. provides=('python2-imaging' 'python2-pillow6')
  24. conflicts=('python2-imaging' 'python2-pillow6')
  25. replaces=('python2-imaging' 'python2-pillow6')
  26. source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
  27. md5sums=('46cad14f0044a5ac4b2d801271528893')
  28. b2sums=('fcea6b26dbb0abaefa618a8b204c95637018764b066b86da3bd98aebfaf5f9dea7b43cfe5fb248275e6504dac8adc02fb7b3ebcadc76e2af249aca64819d83b0')
  29.  
  30. build() {
  31. cd "${srcdir}"/${_pkgname}-${pkgver}
  32.  
  33. python2 setup.py build
  34. }
  35.  
  36. check() {
  37. cd "${srcdir}"/${_pkgname}-${pkgver}
  38.  
  39. export PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7"
  40. python2 selftest.py
  41. # 99.5% of tests pass, just some font rendering giving trouble?
  42. xvfb-run python2 -m pytest -k "not test_variation_set_by_axes and \
  43. not test_variation_set_by_name and \
  44. not test_complex_unicode_text and \
  45. not test_custom_metadata and \
  46. not test_text_direction_ttb and \
  47. not test_text_direction_ttb_stroke"
  48. }
  49.  
  50. package() {
  51. cd "${srcdir}"/${_pkgname}-${pkgver}
  52.  
  53. python2 setup.py install --root="${pkgdir}/" --optimize=1
  54. install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  55.  
  56. install -dm755 "${pkgdir}/usr/include/python2.7/"
  57. install -m644 -t "${pkgdir}/usr/include/python2.7/" src/libImaging/*.h
  58. }
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement