diff options
author | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2019-10-27 21:23:56 +0100 |
---|---|---|
committer | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2019-11-01 00:32:05 +0100 |
commit | 14e51044d72d68de036fd855af35ab6ef7cbaba7 (patch) | |
tree | 2fc088e465ec3d53c29277c8e61ab3f7229b42bf | |
parent | 5329e65e4697801a05c3725bc78cb8e4691abd98 (diff) |
sqlparse: add python3 package
This is a dependency for django-cors-headers.
Install sqlformat without using pkg-resources:
Upstream uses the entry_point function to call the __main__.py script.
We copy it for avoiding the dependency on pkg_resources and full python3 in turn.
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
-rw-r--r-- | lang/python/python3-sqlparse/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lang/python/python3-sqlparse/Makefile b/lang/python/python3-sqlparse/Makefile new file mode 100644 index 000000000..4df4dcd03 --- /dev/null +++ b/lang/python/python3-sqlparse/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=sqlparse +PKG_VERSION:=0.3.0 +PKG_RELEASE:=1 + +PYPI_NAME:=sqlparse +PKG_HASH:=7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873 + +PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at> +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-sqlparse + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Non-validating SQL parser module. + URL:=https://github.com/andialbrecht/sqlparse + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-sqlparse/description + A non-validating SQL parser module. It provides support for parsing, splitting and formatting SQL statements. +endef + +define Py3Package/python3-sqlparse/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/sqlparse/__main__.py \ + $(1)/usr/bin/sqlformat +endef + +$(eval $(call Py3Package,python3-sqlparse)) +$(eval $(call BuildPackage,python3-sqlparse)) +$(eval $(call BuildPackage,python3-sqlparse-src)) |