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.

79 lines
2.3 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:=2
  11. PKG_SOURCE:=gmpy2-$(PKG_VERSION).zip
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/90/f4/9a2e384b325b69bc5827b9a6510a8fb4a51698c915c06a3f25a86458892a
  13. PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-gmpy2-$(PKG_VERSION)
  15. PKG_LICENSE:=LGPL-3.0+
  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. define Package/python-gmpy2/Default
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. URL:=http://code.google.com/p/gmpy/
  27. endef
  28. define Package/python-gmpy2
  29. $(call Package/python-gmpy2/Default)
  30. TITLE:=python-gmpy2
  31. DEPENDS:=+libgmp +PACKAGE_python-gmpy2:python-light
  32. VARIANT:=python
  33. endef
  34. define Package/python3-gmpy2
  35. $(call Package/python-gmpy2/Default)
  36. TITLE:=python3-gmpy2
  37. DEPENDS:=+libgmp +PACKAGE_python3-gmpy2:python3-light
  38. VARIANT:=python3
  39. endef
  40. define Package/python-gmpy2/description
  41. gmpy2 is a C-coded Python extension module that supports multiple-precision
  42. arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module
  43. only supported the GMP multiple-precision library. gmpy2 adds support for the
  44. MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly
  45. rounded complex floating-point arithmetic) libraries. gmpy2 also updates the
  46. API and naming conventions to be more consistent and support the additional
  47. functionality.
  48. endef
  49. define Package/python3-gmpy2/description
  50. $(call Package/python-gmpy2/description)
  51. .
  52. (Variant for Python3)
  53. endef
  54. define PyBuild/Compile
  55. $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
  56. endef
  57. define Py3Build/Compile
  58. $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
  59. endef
  60. $(eval $(call PyPackage,python-gmpy2))
  61. $(eval $(call BuildPackage,python-gmpy2))
  62. $(eval $(call Py3Package,python3-gmpy2))
  63. $(eval $(call BuildPackage,python3-gmpy2))