You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2015-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-gmpy2
  9. PKG_VERSION:=2.0.8
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=gmpy2-$(PKG_VERSION).zip
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gmpy2
  13. PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-gmpy2-$(PKG_VERSION)
  15. PKG_LICENSE:=LGPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING.LESSER
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. include ../python3-package.mk
  21. PKG_UNPACK:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE); mv -f $(PKG_BUILD_DIR)/gmpy2-$(PKG_VERSION)/* $(PKG_BUILD_DIR)
  22. PYTHON_PKG_SETUP_ARGS:=--nompfr
  23. PYTHON3_PKG_SETUP_ARGS:=--nompfr
  24. define Package/python-gmpy2/Default
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. SUBMENU:=Python
  28. TITLE:=GMP/MPIR, MPFR, and MPC interface
  29. URL:=https://github.com/aleaxit/gmpy
  30. DEPENDS:=+libgmp
  31. endef
  32. define Package/python-gmpy2
  33. $(call Package/python-gmpy2/Default)
  34. DEPENDS+=+PACKAGE_python-gmpy2:python-light
  35. VARIANT:=python
  36. endef
  37. define Package/python3-gmpy2
  38. $(call Package/python-gmpy2/Default)
  39. DEPENDS+=+PACKAGE_python3-gmpy2:python3-light
  40. VARIANT:=python3
  41. endef
  42. define Package/python-gmpy2/description
  43. gmpy2 is a C-coded Python extension module that supports multiple-precision
  44. arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module
  45. only supported the GMP multiple-precision library. gmpy2 adds support for the
  46. MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly
  47. rounded complex floating-point arithmetic) libraries. gmpy2 also updates the
  48. API and naming conventions to be more consistent and support the additional
  49. functionality.
  50. endef
  51. define Package/python3-gmpy2/description
  52. $(call Package/python-gmpy2/description)
  53. .
  54. (Variant for Python3)
  55. endef
  56. $(eval $(call PyPackage,python-gmpy2))
  57. $(eval $(call BuildPackage,python-gmpy2))
  58. $(eval $(call BuildPackage,python-gmpy2-src))
  59. $(eval $(call Py3Package,python3-gmpy2))
  60. $(eval $(call BuildPackage,python3-gmpy2))
  61. $(eval $(call BuildPackage,python3-gmpy2-src))