recipe 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Build recipe for six.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  4. # Copyright (C) 2018-2022 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. # Exit immediately on any error
  18. set -e
  19. program=six
  20. version=1.16.0
  21. release=1
  22. pkgname=python-${program}
  23. # Define a category for the output of the package name
  24. pkgcategory=python
  25. tarname=${program}-${version}.tar.gz
  26. # Remote source(s)
  27. fetch=https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/$tarname
  28. description="
  29. A Python 2 and 3 compatibility library.
  30. It provides utility functions for smoothing over the differences
  31. between the Python versions with the goal of writing Python code
  32. that is compatible on both Python versions.
  33. "
  34. homepage=https://github.com/benjaminp/six
  35. license=MIT
  36. docs="CHANGES LICENSE PKG-INFO README.rst"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. python3 setup.py build
  45. python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
  46. # Copy documentation
  47. mkdir -p "${destdir}/$docsdir"
  48. cp -p $docs "${destdir}/$docsdir"
  49. }