diff --git a/package/jmm/python-pyusb/Makefile b/package/jmm/python-pyusb/Makefile new file mode 100644 index 0000000..9e68910 --- /dev/null +++ b/package/jmm/python-pyusb/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pyusb +PKG_VERSION:=1.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=pyusb-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/b9/8d/25c4e446a07e918eb39b5af25c4a83a89db95ae44e4ed5a46c3c53b0a4d6/ +PKG_HASH:=7d449ad916ce58aff60b89aae0b65ac130f289c24d6a5b7b317742eccffafc38 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyusb-$(PKG_VERSION) + +PKG_LICENSE:=BSD +PKG_MAINTAINER:=Micke Prag + +include $(INCLUDE_DIR)/package.mk +include ../../feeds/packages/python/../python-package.mk +include ../../feeds/packages/python3/../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-pyusb/Default + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://pyusb.github.io/pyusb/ +endef + +define Package/python-pyusb +$(call Package/python-pyusb/Default) + TITLE:=python-pyusb + DEPENDS:=+python-light +libusb-1.0 + VARIANT:=python +endef + +define Package/python3-pyusb +$(call Package/python-pyusb/Default) + TITLE:=python3-pyusb + DEPENDS:=+python3-light +libusb-1.0 + VARIANT:=python3 +endef + +define Package/python-pyusb/description +meh +endef + +define Package/python3-pyusb/description +$(call Package/python-pyusb/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-pyusb)) +$(eval $(call BuildPackage,python-pyusb)) +$(eval $(call BuildPackage,python-pyusb-src)) + +$(eval $(call Py3Package,python3-pyusb)) +$(eval $(call BuildPackage,python3-pyusb)) +$(eval $(call BuildPackage,python3-pyusb-src)) diff --git a/package/jmm/python-pyusb/patches/i-hate-python.patch b/package/jmm/python-pyusb/patches/i-hate-python.patch new file mode 100644 index 0000000..b977f06 --- /dev/null +++ b/package/jmm/python-pyusb/patches/i-hate-python.patch @@ -0,0 +1,22 @@ +--- python-pyusb-1.1.1/setup.cfg 2021-03-18 20:22:22.566592361 +0000 ++++ python-pyusb-1.1.1/setup.cfg 2021-03-18 20:22:22.566592361 +0000 +@@ -2,7 +2,7 @@ + description-file = README.rst + + [options] +-setup_requires = setuptools_scm ++setup_requires = setuptools_scm<5.0.2 + + [tool:pytest] + addopts = -v +--- python-pyusb-1.1.1/setup.py 2021-01-20 06:19:29.000000000 +0000 ++++ python-pyusb-1.1.1/setup.py 2021-01-20 06:19:29.000000000 +0000 +@@ -37,6 +37,8 @@ + setuptools_scm = 'setuptools_scm' + if LooseVersion(setuptools_version).version[0] < 12: + setuptools_scm += '<2.0' ++else: ++ setuptools_scm += '<5.0.2' + + + def pyusb_scm_version():