recipe 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Build recipe for setuptools.
  2. #
  3. # Copyright (C) 2020-2023 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=setuptools
  19. version=67.6.1
  20. release=1
  21. pkgname=python-${program}
  22. # Define a category for the output of the package name
  23. pkgcategory=python
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch=https://files.pythonhosted.org/packages/b6/21/cb9a8d0b2c8597c83fce8e9c02884bce3d4951e41e807fc35791c6b23d9a/$tarname
  27. description="
  28. Easily build and distribute Python packages.
  29. Setuptools is a fully-featured, actively-maintained, and stable library
  30. designed to facilitate packaging Python projects, where packaging
  31. includes:
  32. - Python package and module definitions
  33. - Distribution package metadata
  34. - Test hooks
  35. - Project installation
  36. - Platform-specific details
  37. - Python 3 support
  38. For more information, see https://setuptools.readthedocs.io/en/latest/
  39. "
  40. homepage=https://pypi.org/project/setuptools/
  41. license=MIT
  42. docs="CHANGES* LICENSE* PKG-INFO README*"
  43. docsdir="${docdir}/${pkgname}-${version}"
  44. build()
  45. {
  46. unpack "${tardir}/$tarname"
  47. cd "$srcdir"
  48. # Set sane permissions
  49. chmod -R u+w,go-w,a+rX-s .
  50. python3 setup.py build
  51. python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
  52. # Copy documentation
  53. mkdir -p "${destdir}/$docsdir"
  54. cp -p $docs "${destdir}/$docsdir"
  55. }