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.

24 lines
922 B

  1. #
  2. # Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. ifndef DUMP
  8. ifdef __package_mk
  9. $(warning pypi.mk should be included before package.mk)
  10. endif
  11. endif
  12. ifneq ($(strip $(PYPI_NAME)),)
  13. PYPI_SOURCE_NAME?=$(PYPI_NAME)
  14. PYPI_SOURCE_EXT?=tar.gz
  15. PYPI_NAME_FIRST_LETTER?=$(strip $(foreach a,$(chars_lower) $(chars_upper) 0 1 2 3 4 5 6 7 8 9 _ -,$(if $(PYPI_NAME:$a%=),,$a)))
  16. PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT)
  17. PKG_SOURCE_URL?=https://files.pythonhosted.org/packages/source/$(PYPI_NAME_FIRST_LETTER)/$(PYPI_NAME)
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/pypi/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PYPI_SOURCE_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
  19. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/pypi/$(PYPI_SOURCE_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
  20. endif