diff --git a/openwrt/feeds/packages/lang/python/Flask/Makefile b/openwrt/feeds/packages/lang/python/Flask/Makefile index 6ff14a25..08131551 100644 --- a/openwrt/feeds/packages/lang/python/Flask/Makefile +++ b/openwrt/feeds/packages/lang/python/Flask/Makefile @@ -5,39 +5,39 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Flask -PKG_VERSION:=0.12.2 +PKG_VERSION:=1.1.1 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/eb/12/1c7bd06fcbd08ba544f25bf2c6612e305a70ea51ca0eda8007344ec3f123/ -PKG_HASH:=49f44461237b69ecd901cc7ce66feea0319b9158743dd27a2899962ab214dac1 -PKG_BUILD_DEPENDS:=python python3 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.rst +PKG_CPE_ID:=cpe:/a:palletsprojects:flask +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-flask SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://github.com/pallets/flask/ - TITLE:=python3-flask + TITLE:=Flask + URL:=https://palletsprojects.com/p/flask/ DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \ - +python3-itsdangerous +python3-jinja2 +python3-light +python3-logging \ - +python3-markupsafe +python3-multiprocessing +python3-werkzeug + +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \ + +python3-markupsafe +python3-multiprocessing +python3-setuptools \ + +python3-werkzeug VARIANT:=python3 endef define Package/python3-flask/description -Flask is a microframework for Python based on Werkzeug, Jinja 2 and good -intentions. And before you ask: It.s BSD licensed! + Flask is a microframework for Python based on Werkzeug, Jinja 2 and good + intentions. And before you ask: It.s BSD licensed! endef $(eval $(call Py3Package,python3-flask)) $(eval $(call BuildPackage,python3-flask)) +$(eval $(call BuildPackage,python3-flask-src)) diff --git a/openwrt/feeds/packages/lang/python/Jinja2/Makefile b/openwrt/feeds/packages/lang/python/Jinja2/Makefile index 8b625696..7322b1bc 100644 --- a/openwrt/feeds/packages/lang/python/Jinja2/Makefile +++ b/openwrt/feeds/packages/lang/python/Jinja2/Makefile @@ -5,30 +5,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Jinja2 -PKG_VERSION:=2.9.6 +PKG_VERSION:=2.10.1 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/ -PKG_HASH:=ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff -PKG_BUILD_DEPENDS:=python3 +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013 + +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_CPE_ID:=cpe:/a:pocoo:jinja2 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-jinja2 SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=Jinja2 URL:=http://jinja.pocoo.org/ - TITLE:=python3-jinja2 - DEPENDS:=+python3-light + DEPENDS:=+python3-light +python3-markupsafe VARIANT:=python3 endef @@ -40,3 +38,4 @@ endef $(eval $(call Py3Package,python3-jinja2)) $(eval $(call BuildPackage,python3-jinja2)) +$(eval $(call BuildPackage,python3-jinja2-src)) diff --git a/openwrt/feeds/packages/lang/python/MarkupSafe/Makefile b/openwrt/feeds/packages/lang/python/MarkupSafe/Makefile index 0083516e..dde6dede 100644 --- a/openwrt/feeds/packages/lang/python/MarkupSafe/Makefile +++ b/openwrt/feeds/packages/lang/python/MarkupSafe/Makefile @@ -5,36 +5,34 @@ include $(TOPDIR)/rules.mk PKG_NAME:=MarkupSafe -PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_VERSION:=1.1.1 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/ -PKG_HASH:=a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665 -PKG_BUILD_DEPENDS:=python python3 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.rst +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-markupsafe SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://github.com/pallets/markupsafe/ - TITLE:=python3-markupsafe + TITLE:=MarkupSafe + URL:=https://palletsprojects.com/p/markupsafe/ DEPENDS:=+python3-light VARIANT:=python3 endef define Package/python3-markupsafe/description -MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python + MarkupSafe implements a text object that escapes characters so it is safe to use in HTML and XML. endef $(eval $(call Py3Package,python3-markupsafe)) $(eval $(call BuildPackage,python3-markupsafe)) +$(eval $(call BuildPackage,python3-markupsafe-src)) diff --git a/openwrt/feeds/packages/lang/python/README.md b/openwrt/feeds/packages/lang/python/README.md new file mode 100644 index 00000000..4c241b82 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/README.md @@ -0,0 +1,400 @@ +# Python packages folder + +:warning: **Python 2 will soon be unsupported and removed from the feed - [see below](#python-2-end-of-life)** :warning: + +## Table of contents + +1. [Description](#description) +2. [Python 2 end-of-life](#python-2-end-of-life) + 1. [Transition policy / schedule](#transition-policy--schedule) +3. [Introduction](#introduction) +4. [Using Python[3] in external/other package feeds](#using-python3-in-externalother-package-feeds) +5. [Build considerations](#build-considerations) +6. [General folder structure](#general-folder-structure) +7. [Building a Python[3] package](#building-a-python3-package) + 1. [PKG_BUILD_DIR](#pkg_build_dir) + 2. [PKG_UNPACK](#pkg_unpack) + 3. [Include python[3]-package.mk](#include-python3-packagemk) + 4. [Add Package/ OpenWrt definitions](#add-packagepkg_name-openwrt-definitions) + 5. [Wrapping things up so that they build](#wrapping-things-up-so-that-they-build) + 6. [Customizing things](#customizing-things) + 7. [Host-side Python packages for build](#host-side-python-packages-for-build) + +## Description + +This section describes specifics for the Python packages that are present in this repo, and how things are structured. + +In terms of license, contributing guide, etc, all of that information is described in the top [README.md](README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python/Python3 packages, and maybe some explanations about how things are (and why they are as they are). + +## Python 2 end-of-life + +Python 2 will not be maintained past [1 January 2020](https://pythonclock.org/). As such, we will be transitioning Python 2 programs and libraries to Python 3, and Python 2 packages will be removed in early 2020. + +(Discussion for how to handle this transition can be found in [#8520](https://github.com/openwrt/packages/issues/8520).) + +### Transition policy / schedule + +A mass removal event ("The Snap") will occur on 31 March 2020, or 2 weeks before the freeze for a 20.x release, whichever is sooner. The exact date will be confirmed when the 20.x release schedule is known, or by 15 March 2020. + +All Python 2 packages (the Python 2 interpreter, programs that depend on Python 2, and Python 2-only libraries) will be removed during this event. + +Leading up to "The Snap": + +* In general, new Python 2 packages are no longer accepted + * Exceptions can be made on a case-by-case basis, given extraordinary circumstances or reasons, until 31 May 2019 + * From 31 May 2019 onward, absolutely no new Python 2 packages will be accepted + +* The Python 2 interpreter will remain in the feed until "The Snap" + * The interpreter will continue to be updated, including the last release in January 2020 (if there is one) + +* Programs that depend on Python 2 will be transitioned to Python 3 (see [#8893](https://github.com/openwrt/packages/issues/8893)) + * If a program cannot be transitioned, a suitable replacement will be found + * If a replacement cannot be found, the program will be removed during "The Snap" + +* Python 2 libraries will remain in the feed until "The Snap" + * For any Python 2-only libraries, a Python 3 version will be added (or a suitable replacement found), if its Python 3 version is a dependency of another package in the feed + * Python 2 libraries will receive normal updates until 31 October 2019 + * From 31 October 2019 onward: + * Python 2-only libraries will receive security updates only + * Python 2 libraries that share the same Makefile as their Python 3 version will continue to receive normal updates + +## Introduction + +This sub-tree came to exist after a number of contributions (Python packages) were made to this repo, and the [lang](lang) subtree grew to a point where a decision was made to move all Python packages under [lang/python](lang/python). + +It contains the 2 Python interpreters (Python & Python3) and Python packages. Most of the Python packages are downloaded from [pypi.org](https://pypi.org/). Python packages from [pypi.org](https://pypi.org/) are typically preferred when adding new packages. + +If more packages (than the ones packaged here) are needed, they can be downloaded via [pip or pip3](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python & Python3 packages (yes, Python & Python3 come packaged with `pip` & `setuptools`). + +## Using Python[3] in external/other package feeds + +In the feeds.conf (or feeds.conf.default file, whatever is preferred), the packages repo should be present. + +Example +``` +src-git packages https://git.openwrt.org/feed/packages.git +src-git luci https://git.openwrt.org/project/luci.git +src-git routing https://git.openwrt.org/feed/routing.git +src-git telephony https://git.openwrt.org/feed/telephony.git +# +# +src-git someotherfeed https://github.com// +``` + +Assuming that there are Python packages in the ``, they should include `python[3]-package.mk` like this: +``` +include $(TOPDIR)/feeds/packages/lang/python/python-package.mk +include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk +``` + +Same rules apply for `python[3]-package.mk` as the Python packages in this repo. +And if only 1 of `python-package.mk` or `python3-package.mk` is needed, then only the needed mk file should be included (though it's not an issue if both are included). + +**One important consideration:**: if the local name is not `packages`, it's something else, like `openwrt-packages`. And in `feeds.conf[.default]` it's: +``` +src-git openwrt-packages https://git.openwrt.org/feed/packages.git +``` + +Then, the inclusions also change: +``` +include $(TOPDIR)/feeds/openwrt-packages/lang/python/python-package.mk +include $(TOPDIR)/feeds/openwrt-packages/lang/python/python3-package.mk +``` + +Each maintainer[s] of external packages feeds is responsible for the local name, and relative inclusion path back to this feed (which is named `packages` by default). + +In case there is a need/requirement such that the local package feed is named something else than `packages`, one approach to make the package flexible to change is: + +``` +PYTHON_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python-package.mk) + +# verify that there is only one single file returned +ifneq (1,$(words $(PYTHON_PACKAGE_MK))) +ifeq (0,$(words $(PYTHON_PACKAGE_MK))) +$(error did not find python-package.mk in any feed) +else +$(error found multiple python-package.mk files in the feeds) +endif +else +$(info found python-package.mk at $(PYTHON_PACKAGE_MK)) +endif + +include $(PYTHON_PACKAGE_MK) +``` + +Same can be done for `python3-package.mk`. +This should solve the corner-case where the `python[3]-package.mk` can be in some other feed, or if the packages feed will be named something else locally. + +## Build considerations + +In order to build the Python[3] interpreters, a host Python/Python3 interpreter needs to be built, in order to process some of the build for the target Python/Python3 build. The host Python[3] interpreters are also needed so that Python bytecodes are generated, so the host interpreters need to be the exact versions as on the target. And finally, the host Python[3] interpreters also provide pip & pip3, so that they may be used to install some Python[3] packages that are required to build other Python[3] packages. +That's why you'll also see a Python/Python3 build & staging directories. + +As you're probably thinking, this sounds [and is] somewhat too much complication [just for packaging], but the status of things is-as-it-is, and it's probably much worse than what's currently visible on the surface [with respect to packaging Python[3] & packages]. + +As mentioned earlier, Python[3] packages are shipped with bytecodes, and the reason for this is simply performance & size. +The thought/discussion matrix derives a bit like this: +* shipping both Python source-code & bytecodes takes too much space on some devices ; Python source code & byte-code take about similar disk-size +* shipping only Python source code has a big performance penalty [on some lower end systems] ; something like 500 msecs (Python source-only) -> 70 msecs (Python byte-codes) time reduction for a simple "Hello World" script +* shipping only Python byte-codes seems like a good trade-off, and this means that `python-src` & `python3-src` can be provided for people that want the source code + +By default, automatic Python[3] byte-code generation is disabled when running a Python script, in order to prevent a disk from accidentally filling up. Since some disks reside in RAM, this also means not filling up the RAM. If someone wants to convert Python source to byte-code then he/she is free to compile it [directly on the device] manually via the Python interpreter & library. + +## General folder structure + +The basis of all these packages are: +* [lang/python/python](lang/python/python) - The Python 2.7.y interpreter (supposedly, there won't ever by a 2.8.y) +* [lang/python/python3](lang/python/python3) - The Python 3.x.y interpreter + +These 2 are normal OpenWrt packages, which will build the Python interpreters. They also provide `python[3]-pip` & `python[3]-setuptools`. Each Python or Python3 package is actually split into multiple sub-packages [e.g. python-email, python-sqlite3, etc]. This can be viewed inside [lang/python/python/files](lang/python/python/files) & [lang/python/python3/files](lang/python/python3/files). + +The reason for this splitting, is purely to offer a way for some people to package Python/Python3 in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python[3] installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there are the `python[3]-base` packages which bring that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people. + +The Python[3] interpreters are structured like this: +* `python-base` (and `python3-base`), which is just the minimal package to startup Python[3] and run basic commands +* `python` (and `python3`) are meta-packages, which install almost everything (python[3]-base [plus] Python[3] library [minus] some unit-tests & some windows-y things) +* `python-light` (and `python3-light`) are `python` (and `python3`) [minus] packages that are in [lang/python/python/files](lang/python/python/files) or [lang/python/python3/files](lang/python/python3/files) ; the size of these 2 packages may be sensible (and interesting) to another group of people + +All other Python & Python3 packages (aside from the 2 intepreters) typically use these files: +* **python[3]-host.mk** - this file contains paths and build rules for running the Python[3] interpreters on the host-side; they also provide paths to host interprete, host Python lib-dir & so on +* **python[3]-package.mk** + * includes **python[3]-host.mk** + * contains all the default build rules for Python[3] packages; these will be detailed below in the [Building a Python[3] package](#Building a Python[3] package) section + +**Note** that Python/Python3 packages don't need to use these files (i.e. `python[3]-package.mk` & `python[3]-host.mk`), but they do provide some ease-of-use & reduction of duplicate code, especially when packaging for both Python & Python3. And they do contain some learned-lessons about packaging Python/Python3 packages, so it's a good idea to use them. + +## Building a Python[3] package + +A Python package can be packaged for either Python or Python3 or both. + +This section will describe both, and then it can be inferred which is for which. + +Packaging for both Python & Python3 uses the `VARIANT` mechanism for packaging inside OpenWrt. (#### FIXME: find a link for this later if it exists) + +### Include python[3]-package.mk + +If packaging for Python, add this after `include $(INCLUDE_DIR)/package.mk` +``` +include ../python-package.mk +``` + +If packaging for Python3, add this after `include $(INCLUDE_DIR)/package.mk` +``` +include ../python3-package.mk +``` + +Order doesn't matter between `python-package.mk` & `python3-package.mk`. + +These will make sure that build rules for Python or Python3 can be specified and picked up for build. + +### Include pypi.mk (optional) + +If the package source code will be downloaded from [pypi.org](https://pypi.org/), including `pypi.mk` can help simplify the package Makefile. + +To use `pypi.mk`, add this **before** `include $(INCLUDE_DIR)/package.mk`: +``` +include ../pypi.mk +``` + +`pypi.mk` has several `PYPI_*` variables that must/can be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line. + +`pypi.mk` also provides default values for `PKG_SOURCE` and `PKG_SOURCE_URL`, so these variables may be omitted. + +One variable is required: + +* `PYPI_NAME`: Package name on pypi.org. This should match the PyPI name exactly. + + For example (from the `python-yaml` package): + ``` + PYPI_NAME:=PyYAML + ``` + +These variables are optional: + +* `PYPI_SOURCE_NAME`: Package name component of the source tarball filename + Default: Same value as `PYPI_NAME` + +* `PYPI_SOURCE_EXT`: File extension of the source tarball filename + Default: `tar.gz` + +`pypi.mk` constructs the default `PKG_SOURCE` value from these variables (and `PKG_VERSION`): +``` +PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT) +``` + +The `PYPI_SOURCE_*` variables allow this default `PKG_SOURCE` value to be customized as necessary. + +### Add Package/ OpenWrt definitions + +This part is similar to default OpenWrt packages. +It's usually recommended to have a `Package//Default` section that's common for both Python & Python3. + +Example: +``` +define Package/python-lxml/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://lxml.de + DEPENDS:=+libxml2 +libxslt +libexslt +endef +``` + +Then for each variant do something like: +``` +define Package/python-lxml +$(call Package/python-lxml/Default) + TITLE:=python-lxml + DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs + VARIANT:=python +endef + +define Package/python3-lxml +$(call Package/python-lxml/Default) + TITLE:=python3-lxml + DEPENDS+=+PACKAGE_python3-lxml:python3-light + VARIANT:=python3 +endef +``` + +Some considerations here (based on the example above): +* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` (see **[note-encodings](#note-encodings)**) +* consider adding conditional DEPENDS for each variant ; so for each Python[3] package add `+PACKAGE_python-lxml:` as seen in the above example ; the reason for this is build-time reduction ; if you want to build Python3 only packages, this won't build Python & Python packages + dependencies ; this is a known functionality of OpenWrt build deps + * this should not happen anymore, but if adding `+PACKAGE_python-lxml` conditional deps creates circular dependencies, then open an issue so this can be resolved again. +* `VARIANT=python` or `VARIANT=python3` must be added +* typically each variant package is named `Package/python-` & `Package/python3-` ; this convention makes things easier to follow, though it could work without naming things this way +* `TITLE` can be something a bit more verbose/neat ; typically the name is short as seen above + +**note-encodings**: That's because some character encodings are needed, which are present in `python3-base` but not in `python-light` (but are present in `python-codecs`) ; this is because Python3 is designed to be more Unicode friendly than Python2 (it's one of the fundamental differences between the 2), and Python3 won't start without those encodings being present. + + +Following these, 2 more definitions are required: +``` +define Package/python-lxml/description +The lxml XML toolkit is a Pythonic binding +for the C libraries libxml2 and libxslt. +endef + +define Package/python3-lxml/description +$(call Package/python-lxml/description) +. +(Variant for Python3) +endef +``` + +Typically, the description is the same for both, so just mentioning that one is a variant of the other is sufficient. + +### Wrapping things up so that they build + +If all the above prerequisites have been met, all that's left is: + +``` +$(eval $(call PyPackage,python-lxml)) +$(eval $(call BuildPackage,python-lxml)) + +$(eval $(call Py3Package,python3-lxml)) +$(eval $(call BuildPackage,python3-lxml)) +``` + +The `$(eval $(call PyPackage,python-lxml))` part will instantiate all the default Python build rules so that the final Python package is packaged into an OpenWrt. +And `$(eval $(call BuildPackage,python-lxml))` will bind all the rules generated with `$(eval $(call PyPackage,python-lxml))` into the OpenWrt build system. + +These packages will contain byte-codes and binaries (shared libs & other stuff). + +If a user wishes to ship source code, adding 2 more lines creates 2 more packages that ship Python source code: +``` +$(eval $(call PyPackage,python-lxml)) +$(eval $(call BuildPackage,python-lxml)) +$(eval $(call BuildPackage,python-lxml-src)) + +$(eval $(call Py3Package,python3-lxml)) +$(eval $(call BuildPackage,python3-lxml)) +$(eval $(call BuildPackage,python3-lxml-src)) +``` + +The name `*-src` must be the Python package name; so for `python-lxml-src` a equivalent `python-lxml` name must exist. + +### Customizing things + +Some packages need custom build rules (because they do). + +The default package build and install processes are defined in `python[3]-package.mk`. + +#### Building + +The default build process calls `setup.py install` inside the directory where the Python source package is extracted (`PKG_BUILD_DIR`). This "installs" the Python package to an intermediate location (`PKG_INSTALL_DIR`) where it is used by the default install process. + +There are several Makefile variables that can be used to customize this process (all optional): + +* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`). + Default: empty value (`setup.py` is in the package directory) +* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`. + Default: empty value +* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command. + Default: empty value +* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command. + Default: `--single-version-externally-managed` + +Conceptually, these variables are used in this way (using a Python 2 package as an example): + +``` +cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR) +$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS) +``` + +The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile. + +#### Installing + +The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives. + +This default process uses 2 build rules: +* `PyPackage//filespec` & `Py3Package//filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder +* `PyPackage//install` & `Py3Package//install` is similar to `Package//install` ; these allow binary (or other files) to be installed on the target + +Both the 2 above rules generate a `Package//install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages. + +The `PyPackage//filespec` & `Py3Package//filespec` rules contain one or more lines of the following format (whitespace added for clarity): + +``` + | | +``` + +The initial character controls the action that will be taken: + +* `+`: Install the given path. If the path is a directory, all files and subdirectories inside are installed. + * If file permissions is specified (optional), then the file or directory (and all files and subdirectories) are assigned the given permissions; if omitted, then the file or directory retains its original permissions. +* `-`: Remove the given path. Useful when most of a directory should be installed except for a few files or subdirectories. + * File permissions is not used / ignored in this case. +* `=`: Assign the given file permissions to the given path. File permissions is required in this case. + +As mentioned, the default `PyPackage//filespec` & `Py3Package//filespec` install `PYTHON[3]_PKG_DIR`: + +``` +define PyPackage/python-example/filespec ++|$(PYTHON_PKG_DIR) +endef +``` + +If the package installs a `example_package` directory inside `PYTHON_PKG_DIR`, and there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as: + +``` +define PyPackage/python-example/filespec ++|$(PYTHON_PKG_DIR) +-|$(PYTHON_PKG_DIR)/example_package/examples +-|$(PYTHON_PKG_DIR)/example_package/test_*.py +endef +``` + +### Host-side Python packages for build + +These can be installed via pip and ideally they should only be installed like this, because it's a bit simpler than running them through the OpenWrt build system. Build variants on the host-side build are more complicated (and nearly impossible to do sanely) in the current OpenWrt build system. + +Which is why [for example] if you need python cffi on the host build, it's easier to just add it via: +``` +HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" +``` +[cffi is one of those packages that needs a host-side package installed for both Python & Python3]. + +This works reasonably well in the current OpenWrt build system, as binaries get built for this package and get installed in the staging-dir `$(STAGING_DIR)/usr/lib/pythonX.Y/site-packages`. diff --git a/openwrt/feeds/packages/lang/python/Werkzeug/Makefile b/openwrt/feeds/packages/lang/python/Werkzeug/Makefile index 0e647c89..deb3a51b 100644 --- a/openwrt/feeds/packages/lang/python/Werkzeug/Makefile +++ b/openwrt/feeds/packages/lang/python/Werkzeug/Makefile @@ -5,38 +5,34 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Werkzeug -PKG_VERSION:=0.12.2 +PKG_VERSION:=0.16.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/56/41/c095a77eb2dd69bf278dd664a97d3416af04e9ba1a00b8c138f772741d31/ -PKG_MD5SUM:=e385b2c5a7193cff24c689b31e1124dc -PKG_BUILD_DEPENDS:=python python3 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.rst +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-werkzeug SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://werkzeug.pocoo.org/ - TITLE:=python3-werkzeug + TITLE:=Werkzeug + URL:=https://palletsprojects.com/p/werkzeug/ DEPENDS:=+python3-light +python3-email VARIANT:=python3 endef define Package/python3-werkzeug/description -Werkzeug - -The Python WSGI Utility Library + The comprehensive WSGI web application library. endef $(eval $(call Py3Package,python3-werkzeug)) $(eval $(call BuildPackage,python3-werkzeug)) +$(eval $(call BuildPackage,python3-werkzeug-src)) diff --git a/openwrt/feeds/packages/lang/python/bcrypt/Makefile b/openwrt/feeds/packages/lang/python/bcrypt/Makefile new file mode 100644 index 00000000..07bc0848 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/bcrypt/Makefile @@ -0,0 +1,70 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bcrypt +PKG_VERSION:=3.1.7 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42 + +PKG_MAINTAINER:=Daniel Dickinson +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=libffi/host +HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.1" +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1" + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/bcrypt/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Modern password hashing + URL:=https://github.com/pyca/bcrypt/ +endef + +define Package/python-bcrypt +$(call Package/bcrypt/Default) + DEPENDS:= \ + +PACKAGE_python-bcrypt:python \ + +PACKAGE_python-bcrypt:python-cffi \ + +PACKAGE_python-bcrypt:python-six + VARIANT:=python +endef + +define Package/python3-bcrypt +$(call Package/bcrypt/Default) + DEPENDS:= \ + +PACKAGE_python3-bcrypt:python3 \ + +PACKAGE_python3-bcrypt:python3-cffi \ + +PACKAGE_python3-bcrypt:python3-six + VARIANT:=python3 +endef + +define Package/python-bcrypt/description + Good password hashing for your software and your servers. +endef + +define Package/python3-bcrypt/description +$(call Package/python-bcrypt/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-bcrypt)) +$(eval $(call BuildPackage,python-bcrypt)) +$(eval $(call BuildPackage,python-bcrypt-src)) + +$(eval $(call Py3Package,python3-bcrypt)) +$(eval $(call BuildPackage,python3-bcrypt)) +$(eval $(call BuildPackage,python3-bcrypt-src)) diff --git a/openwrt/feeds/packages/lang/python/chardet/Makefile b/openwrt/feeds/packages/lang/python/chardet/Makefile deleted file mode 100644 index 6343b4e7..00000000 --- a/openwrt/feeds/packages/lang/python/chardet/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=chardet -PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-2.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/chardet/ -PKG_MD5SUM:=25274d664ccb5130adae08047416e1a8 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/chardet - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Universal encoding detector for Python 2 and 3 - URL:=https://github.com/chardet/chardet - DEPENDS:=+python -endef - -define Package/chardet/description - Universal encoding detector for Python 2 and 3 -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/chardet/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \ - $(1)/usr/bin - # fix python exec path in scripts - sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect -endef - -$(eval $(call BuildPackage,chardet)) diff --git a/openwrt/feeds/packages/lang/python/click-log/Makefile b/openwrt/feeds/packages/lang/python/click-log/Makefile new file mode 100644 index 00000000..3da043a5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/click-log/Makefile @@ -0,0 +1,36 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=click-log +PKG_VERSION:=0.3.2 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PKG_SOURCE_URL:=https://codeload.github.com/click-contrib/click-log/tar.gz/$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=16babb66a2ebf22c37c1cf38753a84e6027eb8991fcf9a8487971591b8ca9812 +PKG_LICENSE:=MIT + +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-click-log + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=http://github.com/mitsuhiko/click + TITLE:=python3-click-log + DEPENDS:=+python3-click + VARIANT:=python3 +endef + +define Package/python3-click-log/description + Simple and beautiful logging for click applications +endef + +$(eval $(call Py3Package,python3-click-log)) +$(eval $(call BuildPackage,python3-click-log)) +$(eval $(call BuildPackage,python3-click-log-src)) diff --git a/openwrt/feeds/packages/lang/python/click/Makefile b/openwrt/feeds/packages/lang/python/click/Makefile index e52e9993..4d237083 100644 --- a/openwrt/feeds/packages/lang/python/click/Makefile +++ b/openwrt/feeds/packages/lang/python/click/Makefile @@ -5,36 +5,35 @@ include $(TOPDIR)/rules.mk PKG_NAME:=click -PKG_VERSION:=6.7 +PKG_VERSION:=7.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/ -PKG_HASH:=f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b -PKG_BUILD_DEPENDS:=python python3 +PYPI_NAME:=$(PKG_NAME) +PYPI_SOURCE_NAME:=Click +PKG_HASH:=5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7 + +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-click SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://github.com/mitsuhiko/click - TITLE:=python3-click + TITLE:=Click + URL:=https://palletsprojects.com/p/click/ DEPENDS:=+python3-light VARIANT:=python3 endef define Package/python3-click/description -A simple wrapper around optparse for powerful command line utilities. + Composable command line interface toolkit endef $(eval $(call Py3Package,python3-click)) $(eval $(call BuildPackage,python3-click)) +$(eval $(call BuildPackage,python3-click-src)) diff --git a/openwrt/feeds/packages/lang/python/dbus-python/Makefile b/openwrt/feeds/packages/lang/python/dbus-python/Makefile deleted file mode 100644 index 86fd9937..00000000 --- a/openwrt/feeds/packages/lang/python/dbus-python/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2008-2010 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:=dbus-python -PKG_VERSION:=1.2.4 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus-python/ -#PKG_MD5SUM:=562c78876219bf458d79a041af18293d - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -$(call include_mk, python-package.mk) - - -TARGET_LDFLAGS += \ - -Wl,-rpath=$(STAGING_DIR)/usr/lib - -define Package/dbus-python - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Python bindings for dbus - URL:=http://dbus.freedesktop.org/ - DEPENDS:=+python +python-expat +libdbus-glib -endef - -define Package/dbus-python/description - Python bindings for dbus. -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/dbus-1.0/dbus - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/include/dbus-1.0/dbus/* \ - $(1)/usr/include/dbus-1.0/dbus/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ - $(1)/usr/lib/pkgconfig -endef - -define Package/dbus-python/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.so \ - $(1)$(PYTHON_PKG_DIR) - - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/dbus - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/dbus/*.py \ - $(1)$(PYTHON_PKG_DIR)/dbus - - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/dbus/mainloop - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/dbus/mainloop/*.py \ - $(1)$(PYTHON_PKG_DIR)/dbus/mainloop - -endef - -$(eval $(call BuildPackage,dbus-python)) diff --git a/openwrt/feeds/packages/lang/python/dbus-python/patches/001-fix-python-config-shebang.patch b/openwrt/feeds/packages/lang/python/dbus-python/patches/001-fix-python-config-shebang.patch deleted file mode 100644 index ac291a8f..00000000 --- a/openwrt/feeds/packages/lang/python/dbus-python/patches/001-fix-python-config-shebang.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: dbus-python-1.2.4/configure.ac -=================================================================== ---- dbus-python-1.2.4.orig/configure.ac -+++ dbus-python-1.2.4/configure.ac -@@ -78,8 +78,8 @@ AS_IF([test "${PYTHON_LIBS+set}" = set], - [AC_MSG_NOTICE([PYTHON_LIBS overridden to: $PYTHON_LIBS])], - dnl else - [ -- AC_MSG_CHECKING([for Python library linker flags using ${PYTHON_CONFIG}]) -- PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)" -+ AC_MSG_CHECKING([for Python library linker flags using ${PYTHON} ${PYTHON_CONFIG}]) -+ PYTHON_LIBS="$($PYTHON $PYTHON_CONFIG --ldflags)" - AC_MSG_RESULT([$PYTHON_LIBS]) - ]) - -Index: dbus-python-1.2.4/m4/am-check-python-headers.m4 -=================================================================== ---- dbus-python-1.2.4.orig/m4/am-check-python-headers.m4 -+++ dbus-python-1.2.4/m4/am-check-python-headers.m4 -@@ -26,8 +26,8 @@ if test "${PYTHON_INCLUDES+set}" = set; - AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES]) - else - dnl deduce PYTHON_INCLUDES -- AC_MSG_CHECKING(for Python headers using $PYTHON_CONFIG --includes) -- PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` -+ AC_MSG_CHECKING(for Python headers using $PYTHON $PYTHON_CONFIG --includes) -+ PYTHON_INCLUDES=`$PYTHON $PYTHON_CONFIG --includes` - if test $? = 0; then - AC_MSG_RESULT($PYTHON_INCLUDES) - else diff --git a/openwrt/feeds/packages/lang/python/django-appconf/Makefile b/openwrt/feeds/packages/lang/python/django-appconf/Makefile index c06fa6a9..89623a9e 100644 --- a/openwrt/feeds/packages/lang/python/django-appconf/Makefile +++ b/openwrt/feeds/packages/lang/python/django-appconf/Makefile @@ -9,40 +9,60 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-appconf PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_RELEASE:=5 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/ -PKG_MD5SUM:=cc11511a47088bc56531df67cd5d6261 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-appconf +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A helper class for handling configuration defaults of packaged apps gracefully. - URL:=http://django-appconf.readthedocs.org/ - DEPENDS:=+python +django + TITLE:=Helper class for handling config defaults + URL:=https://$(PKG_NAME).readthedocs.io endef -define Package/django-appconf/description - A helper class for handling configuration defaults of packaged apps gracefully. +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python-$(PKG_NAME)/description + A helper class for handling configuration defaults of packaged apps gracefully endef -define Package/django-appconf/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -$(eval $(call BuildPackage,django-appconf)) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-compressor/Makefile b/openwrt/feeds/packages/lang/python/django-compressor/Makefile index 9cbceaf6..6b40b2ea 100644 --- a/openwrt/feeds/packages/lang/python/django-compressor/Makefile +++ b/openwrt/feeds/packages/lang/python/django-compressor/Makefile @@ -8,42 +8,69 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-compressor -PKG_VERSION:=2.1.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT +PKG_VERSION:=2.2 +PKG_RELEASE:=6 + +PYPI_NAME:=$(PKG_NAME) +PYPI_SOURCE_NAME:=django_compressor +PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f -PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/38/58/03098a826062b856956c7169a8f778ec2b8e2767ddc63da0629062df5621/ -PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/ -PKG_MD5SUM:=5e74141076b70272149ed07e6ce0ea56 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-compressor +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Compresses linked and inline JavaScript or CSS into single cached files. - URL:=http://django-compressor.readthedocs.org/ - DEPENDS:=+python +django + TITLE:=Compress CSS/JS into single cached files + URL:=https://$(PKG_NAME).readthedocs.io endef -define Package/django-compressor/description +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 \ + +PACKAGE_python-$(PKG_NAME):python-django-appconf \ + +PACKAGE_python-$(PKG_NAME):python-rcssmin + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description Compresses linked and inline JavaScript or CSS into single cached files. + Note that the JavaScript filter is not being installed as a dependency. + You'll need to build the rjsmin module (it is not par of the openwrt standard + feeds) to use JavaScript functionality. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django \ + +PACKAGE_python3-$(PKG_NAME):python3-django-appconf \ + +PACKAGE_python3-$(PKG_NAME):python3-rcssmin + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-compressor/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-compressor)) +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-constance/Makefile b/openwrt/feeds/packages/lang/python/django-constance/Makefile index 623cd4cf..fe159597 100644 --- a/openwrt/feeds/packages/lang/python/django-constance/Makefile +++ b/openwrt/feeds/packages/lang/python/django-constance/Makefile @@ -8,41 +8,60 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-constance -PKG_VERSION:=1.3.4 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_VERSION:=2.3.1 +PKG_RELEASE:=4 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/0c/19/74c6bbf29a7882bab377db7a4ca30b43e09173dc1e6cabe163dc8d6a3931/ -PKG_MD5SUM:=2e197701ed93082e5fa41df0f4742294 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-constance +define Package/python-django-constance/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=Django live settings with pluggable backends, including Redis. URL:=https://github.com/jazzband/django-constance - DEPENDS:=+python +django endef -define Package/django-constance/description +define Package/python-django-constance +$(call Package/python-django-constance/Default) + DEPENDS:= \ + +PACKAGE_python-django-constance:python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-django-constance/description Django live settings with pluggable backends, including Redis. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-django-constance +$(call Package/python-django-constance/Default) + DEPENDS:= \ + +PACKAGE_python3-django-constance:python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-constance/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-django-constance/description +$(call define Package/python-django-constance/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-constance)) +$(eval $(call PyPackage,python-django-constance)) +$(eval $(call BuildPackage,python-django-constance)) +$(eval $(call BuildPackage,python-django-constance-src)) + +$(eval $(call Py3Package,python3-django-constance)) +$(eval $(call BuildPackage,python3-django-constance)) +$(eval $(call BuildPackage,python3-django-constance-src)) diff --git a/openwrt/feeds/packages/lang/python/django-formtools/Makefile b/openwrt/feeds/packages/lang/python/django-formtools/Makefile new file mode 100644 index 00000000..863bfc96 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/django-formtools/Makefile @@ -0,0 +1,67 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-formtools +PKG_VERSION:=2.1 +PKG_RELEASE:=6 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/$(PKG_NAME)/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=High-level abstractions for Django forms + URL:=https://$(PKG_NAME).readthedocs.io +endef + +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description + Django "formtools" is a set of high-level abstractions for Django forms. + Currently for form previews and multi-step forms. +endef + +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-jsonfield/Makefile b/openwrt/feeds/packages/lang/python/django-jsonfield/Makefile index 40a9ff7c..42cdc6d0 100644 --- a/openwrt/feeds/packages/lang/python/django-jsonfield/Makefile +++ b/openwrt/feeds/packages/lang/python/django-jsonfield/Makefile @@ -9,40 +9,60 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-jsonfield PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_RELEASE:=5 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/ -PKG_MD5SUM:=2e5e737a3f93f3b5d7ae6026b1340167 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-jsonfield +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=JSONField for django models - URL:=https://github.com/bradjasper/django-jsonfield - DEPENDS:=+python +django + URL:=https://github.com/adamchainz/django-jsonfield endef -define Package/django-jsonfield/description +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description JSONField for django models endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-jsonfield/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-jsonfield)) +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-picklefield/Makefile b/openwrt/feeds/packages/lang/python/django-picklefield/Makefile index 0747796e..dff160f2 100644 --- a/openwrt/feeds/packages/lang/python/django-picklefield/Makefile +++ b/openwrt/feeds/packages/lang/python/django-picklefield/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,41 +8,61 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-picklefield -PKG_VERSION:=0.3.2 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT +PKG_VERSION:=1.1.0 +PKG_RELEASE:=4 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-picklefield/ -PKG_MD5SUM:=b2c17ca9e03704ce33890e6aefc7b2e5 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-picklefield +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=Pickled object field for Django - URL:=http://github.com/gintas/django-picklefield/ - DEPENDS:=+python +django + URL:=https://github.com/gintas/django-picklefield/ endef -define Package/django-picklefield/description +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description Pickled object field for Django endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-picklefield/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-picklefield)) +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-postoffice/Makefile b/openwrt/feeds/packages/lang/python/django-postoffice/Makefile index 18dce363..f75f509c 100644 --- a/openwrt/feeds/packages/lang/python/django-postoffice/Makefile +++ b/openwrt/feeds/packages/lang/python/django-postoffice/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,42 +8,65 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-postoffice -PKG_VERSION:=2.0.8 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT +PKG_VERSION:=3.1.0 +PKG_RELEASE:=5 + +PYPI_NAME:=django-post-office +PYPI_SOURCE_NAME:=django-post_office +PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030 -PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/52/25/cc0cfe923f183d7c19b162cac3bf8430ddaed7bad28202b8f93a97d248a4/ -PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/ -PKG_MD5SUM:=437bf62cef06381d346ae2bc087c0e3c -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-postoffice +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A Django app to monitor and send mail asynchronously, complete with template support. - URL:=https://github.com/ui/django-postoffice - DEPENDS:=+python +django +django-jsonfield + TITLE:=A Django app to monitor and send mail asynchronously + URL:=https://github.com/ui/django-post_office endef -define Package/django-postoffice/description - A Django app to monitor and send mail asynchronously, complete with template support. +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 \ + +PACKAGE_python-$(PKG_NAME):python-django-jsonfield + VARIANT:=python + MDEPENDS:=python-django1 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python-$(PKG_NAME)/description + A Django app to monitor and send mail asynchronously, complete with template + support endef -define Package/django-postoffice/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django \ + +PACKAGE_python3-$(PKG_NAME):python3-django-jsonfield + VARIANT:=python3 + MDEPENDS:=python3-django endef -$(eval $(call BuildPackage,django-postoffice)) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-ranged-response/Makefile b/openwrt/feeds/packages/lang/python/django-ranged-response/Makefile new file mode 100644 index 00000000..363c0c36 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/django-ranged-response/Makefile @@ -0,0 +1,66 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-ranged-response +PKG_VERSION:=0.2.0 +PKG_RELEASE:=6 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/$(PKG_NAME)/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Add Content-Range: to FileResponse + URL:=https://github.com/wearespindle/django-ranged-fileresponse +endef + +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description + Modified Django FileResponse that adds Content-Range headers. +endef + +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-restframework/Makefile b/openwrt/feeds/packages/lang/python/django-restframework/Makefile index bdf2ebe2..cb90f6a5 100644 --- a/openwrt/feeds/packages/lang/python/django-restframework/Makefile +++ b/openwrt/feeds/packages/lang/python/django-restframework/Makefile @@ -8,42 +8,61 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-restframework -PKG_VERSION:=3.5.4 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_VERSION:=3.9.0 +PKG_RELEASE:=5 + +PYPI_NAME:=djangorestframework +PKG_HASH:=607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136 -PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/e9/24/86dfe19fb82a40a3d7a4c50371a8bd85b9277d3506698bf332a6d41d08f6/ -PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION) -PKG_MD5SUM:=979808c387dad8d0ebb6025c39dc7b94 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.md +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-restframework +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=Web APIs for Django, made easy. - URL:=http://www.django-rest-framework.org/ - DEPENDS:=+python +django + URL:=https://www.django-rest-framework.org endef -define Package/django-restframework/description +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description Web APIs for Django, made easy. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-restframework/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-restframework)) +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-simple-captcha/Makefile b/openwrt/feeds/packages/lang/python/django-simple-captcha/Makefile new file mode 100644 index 00000000..54988b23 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/django-simple-captcha/Makefile @@ -0,0 +1,79 @@ +# +# Copyright (C) 2007-2016 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:=django-simple-captcha +PKG_VERSION:=0.5.12 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/mbi/django-simple-captcha/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=89db73a3883573ad5e22c511948a5500491f9848363174d835a2364750c81a77 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/$(PKG_NAME)/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Simple Django captcha application + URL:=https://github.com/mbi/django-simple-captcha +endef + +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + +PACKAGE_python-$(PKG_NAME):python-six \ + python-django1 \ + +PACKAGE_python-$(PKG_NAME):python-pillow \ + +PACKAGE_python-$(PKG_NAME):python-django-ranged-response + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description + Django Simple Captcha is an extremely simple, yet highly customizable Django + application to add captcha images to any Django form. +endef + +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + +PACKAGE_python3-$(PKG_NAME):python3-six \ + python3-django \ + +PACKAGE_python3-$(PKG_NAME):python3-pillow \ + +PACKAGE_python3-$(PKG_NAME):python3-django-ranged-response + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-statici18n/Makefile b/openwrt/feeds/packages/lang/python/django-statici18n/Makefile index da519be7..de9fe61d 100644 --- a/openwrt/feeds/packages/lang/python/django-statici18n/Makefile +++ b/openwrt/feeds/packages/lang/python/django-statici18n/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2017 OpenWrt.org +# Copyright (C) 2007-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,41 +8,61 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-statici18n -PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_VERSION:=1.8.2 +PKG_RELEASE:=5 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/86/6b/2c2e86a7e144ba7b064119eaafb2c8c67665c2a0e722f0819daa9657e551/ -PKG_MD5SUM:=61e22a6f2399f9f829308e4d91b36ee0 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/django-statici18n +define Package/$(PKG_NAME)/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A Django app that provides helper for generating JavaScript catalog to static files. - URL:=http://django-statici18n.readthedocs.org/ - DEPENDS:=+python +django + TITLE:=Helper for generating JavaScript catalog to static files + URL:=https://$(PKG_NAME).readthedocs.io endef -define Package/django-statici18n/description +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description A Django app that provides helper for generating JavaScript catalog to static files. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django endef -define Package/django-statici18n/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,django-statici18n)) +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django-webpack-loader/Makefile b/openwrt/feeds/packages/lang/python/django-webpack-loader/Makefile new file mode 100644 index 00000000..dd41c48b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/django-webpack-loader/Makefile @@ -0,0 +1,66 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-webpack-loader +PKG_VERSION:=0.6.0 +PKG_RELEASE:=6 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/$(PKG_NAME)/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Transparently use webpack in django + URL:=https://github.com/owais/django-webpack-loader +endef + +define Package/python-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python-$(PKG_NAME):python \ + python-django1 + VARIANT:=python + MDEPENDS:=python-django1 +endef + +define Package/python-$(PKG_NAME)/description + Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers. +endef + +define Package/python3-$(PKG_NAME) +$(call Package/$(PKG_NAME)/Default) + DEPENDS:= \ + +PACKAGE_python3-$(PKG_NAME):python3 \ + python3-django + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-$(PKG_NAME)/description +$(call define Package/python-$(PKG_NAME)/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME))) +$(eval $(call BuildPackage,python-$(PKG_NAME)-src)) + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/django/Makefile b/openwrt/feeds/packages/lang/python/django/Makefile index d208e18a..b6a3ebfd 100644 --- a/openwrt/feeds/packages/lang/python/django/Makefile +++ b/openwrt/feeds/packages/lang/python/django/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2017 OpenWrt.org +# Copyright (C) Alexandru Ardelean # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,58 +8,50 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django -PKG_VERSION:=1.8.17 -PKG_RELEASE=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/django/django.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=d3d12fc11da56e4ea8af37a22a9a0aa6579ab2d5 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_VERSION:=2.2.7 +PKG_RELEASE:=1 -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +PYPI_NAME:=Django +PKG_HASH:=16040e1288c6c9f68c6da2fe75ebde83c0a158f6f5d54f4c5177b0c1478c5b86 -define Package/django - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=The web framework for perfectionists with deadlines. - MAINTAINER:=Gergely Kiss - URL:=https://www.djangoproject.com/ - DEPENDS:=+python -endef +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE LICENSE.python +PKG_CPE_ID:=cpe:/a:djangoproject:django -define Package/django/description - The web framework for perfectionists with deadlines. +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/django/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The web framework for perfectionists with deadlines. + URL:=https://www.djangoproject.com/ + MENU:=1 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-django +$(call Package/django/Default) + DEPENDS:= \ + +PACKAGE_python3-django:python3 \ + +PACKAGE_python3-django:python3-pytz \ + +PACKAGE_python3-django:python3-sqlparse + VARIANT:=python3 endef -define Build/InstallDev - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ - $(1)/usr/bin +define Package/python3-django/description + The web framework for perfectionists with deadlines (LTS 2.2 series). + Python3 only. endef -define Package/django/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) +define Py3Package/python3-django/install $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ - $(1)/usr/bin - # fix python exec path - sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py + $(1)/usr/bin/django-admin endef -$(eval $(call BuildPackage,django)) +$(eval $(call Py3Package,python3-django)) +$(eval $(call BuildPackage,python3-django)) +$(eval $(call BuildPackage,python3-django-src)) diff --git a/openwrt/feeds/packages/lang/python/django1/Makefile b/openwrt/feeds/packages/lang/python/django1/Makefile new file mode 100644 index 00000000..b0690cf7 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/django1/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) Alexandru Ardelean +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django1 +PKG_VERSION:=1.11.26 +PKG_RELEASE:=1 + +PYPI_NAME:=Django +PKG_HASH:=861db7f82436ab43e1411832ed8dca81fc5fc0f7c2039c7e07a080a63092fb44 + +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE LICENSE.python +PKG_CPE_ID:=cpe:/a:djangoproject:django + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/django1/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The web framework for perfectionists with deadlines. + URL:=https://www.djangoproject.com/ + MENU:=1 +endef + +define Package/python-django1 +$(call Package/django1/Default) + DEPENDS:= \ + +PACKAGE_python-django1:python \ + +PACKAGE_python-django1:python-pytz + VARIANT:=python + CONFLICTS:=python3-django +endef + +define Package/python-django1/description + The web framework for perfectionists with deadlines (LTS 1.11 series). + Python2 only. +endef + +$(eval $(call PyPackage,python-django1)) +define Package/python-django1-src += + + MDEPENDS:=python-django1 +endef +$(eval $(call BuildPackage,python-django1)) +$(eval $(call BuildPackage,python-django1-src)) diff --git a/openwrt/feeds/packages/lang/python/et_xmlfile/Makefile b/openwrt/feeds/packages/lang/python/et_xmlfile/Makefile deleted file mode 100644 index f0c01397..00000000 --- a/openwrt/feeds/packages/lang/python/et_xmlfile/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=et_xmlfile -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/ -PKG_MD5SUM:=f47940fd9d556375420b2e276476cfaf -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/et_xmlfile - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=An implementation of lxml.xmlfile for the standard library - URL:=https://bitbucket.org/openpyxl/et_xmlfile - DEPENDS:=+python -endef - -define Package/et_xmlfile/description - An implementation of lxml.xmlfile for the standard library -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/et_xmlfile/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,et_xmlfile)) diff --git a/openwrt/feeds/packages/lang/python/flup/Makefile b/openwrt/feeds/packages/lang/python/flup/Makefile index b0514f4f..504b082a 100644 --- a/openwrt/feeds/packages/lang/python/flup/Makefile +++ b/openwrt/feeds/packages/lang/python/flup/Makefile @@ -8,41 +8,59 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flup -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause +PKG_VERSION:=1.0.3 +PKG_RELEASE:=3 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/ -PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=PKG-INFO +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/flup - SUBMENU:=Python +define Package/flup/Default SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss + SUBMENU:=Python TITLE:=Random assortment of WSGI servers - URL:=http://www.saddi.com/software/flup/ - DEPENDS:=+python + URL:=https://www.saddi.com/software/flup/ +endef + +define Package/python-flup +$(call Package/flup/Default) + DEPENDS+= \ + +PACKAGE_python-flup:python-light \ + +PACKAGE_python-flup:python-logging + VARIANT:=python endef -define Package/flup/description - Random assortment of WSGI servers +define Package/python3-flup +$(call Package/flup/Default) + DEPENDS+= \ + +PACKAGE_python3-flup:python3-light \ + +PACKAGE_python3-flup:python3-logging + VARIANT:=python3 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python-flup/description + Random assortment of WSGI servers. endef -define Package/flup/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-flup/description +$(call Package/python-flup/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,flup)) +$(eval $(call PyPackage,python-flup)) +$(eval $(call BuildPackage,python-flup)) +$(eval $(call BuildPackage,python-flup-src)) + +$(eval $(call Py3Package,python3-flup)) +$(eval $(call BuildPackage,python3-flup)) +$(eval $(call BuildPackage,python3-flup-src)) diff --git a/openwrt/feeds/packages/lang/python/gunicorn/Makefile b/openwrt/feeds/packages/lang/python/gunicorn/Makefile index efdf9f4a..0a6ca362 100644 --- a/openwrt/feeds/packages/lang/python/gunicorn/Makefile +++ b/openwrt/feeds/packages/lang/python/gunicorn/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,46 +8,109 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gunicorn -PKG_VERSION:=19.6.0 -PKG_RELEASE=1 -PKG_LICENSE:=MIT +PKG_VERSION:=19.9.0 +PKG_RELEASE=2 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/ -PKG_MD5SUM:=338e5e8a83ea0f0625f768dba4597530 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +define Package/gunicorn/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=WSGI HTTP Server for UNIX + URL:=https://gunicorn.org +endef + +define Package/python-gunicorn +$(call Package/gunicorn/Default) + DEPENDS:=+python + VARIANT:=python +endef + +define Package/python-gunicorn/description + WSGI HTTP Server for UNIX (libraries) +endef + +define PyPackage/python-gunicorn/filespec ++|$(PYTHON_PKG_DIR) +-|$(PYTHON_PKG_DIR)/gunicorn/workers/_gaiohttp.py +endef + +define Package/python3-gunicorn +$(call Package/gunicorn/Default) + DEPENDS:=+python3 + VARIANT:=python3 +endef + +define Package/python3-gunicorn/description +$(call define Package/python-gunicorn/description) +. +(Variant for Python3) +endef + +# Make sure that the binaries are not installed with the libraries +# That means adding some empty Py[3]Package/gunicorn[3]/install rules +define PyPackage/python-gunicorn/install + : +endef + +define Py3Package/python3-gunicorn/install + : +endef define Package/gunicorn - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=WSGI HTTP Server for UNIX - MAINTAINER:=Gergely Kiss - URL:=http://gunicorn.org/ - DEPENDS:=+python +python-setuptools +$(call Package/gunicorn/Default) + DEPENDS:=+python +python-pkg-resources +python-gunicorn endef define Package/gunicorn/description - WSGI HTTP Server for UNIX + WSGI HTTP Server for UNIX (daemon) endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/gunicorn/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(call PyShebang,$(1)/usr/bin/*) endef -define Package/gunicorn/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) +define Package/gunicorn3 +$(call Package/gunicorn/Default) + DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn +endef + +define Package/gunicorn3/description +$(call define Package/gunicorn/description) +. +(Variant for Python3) +endef + +define Package/gunicorn3/install $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \ - $(1)/usr/bin - # fix python exec path in scripts - $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn* + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/gunicorn \ + $(1)/usr/bin/gunicorn3 + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \ + $(1)/usr/bin/gunicorn3_paster + $(call Py3Shebang,$(1)/usr/bin/*) endef +$(eval $(call PyPackage,python-gunicorn)) +$(eval $(call BuildPackage,python-gunicorn)) +$(eval $(call BuildPackage,python-gunicorn-src)) $(eval $(call BuildPackage,gunicorn)) + +$(eval $(call Py3Package,python3-gunicorn)) +$(eval $(call BuildPackage,python3-gunicorn)) +$(eval $(call BuildPackage,python3-gunicorn-src)) +$(eval $(call BuildPackage,gunicorn3)) diff --git a/openwrt/feeds/packages/lang/python/itsdangerous/Makefile b/openwrt/feeds/packages/lang/python/itsdangerous/Makefile index e52603df..81cd669e 100644 --- a/openwrt/feeds/packages/lang/python/itsdangerous/Makefile +++ b/openwrt/feeds/packages/lang/python/itsdangerous/Makefile @@ -5,36 +5,35 @@ include $(TOPDIR)/rules.mk PKG_NAME:=itsdangerous -PKG_VERSION:=0.24 -PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/ -PKG_HASH:=cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519 -PKG_BUILD_DEPENDS:=python python3 +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19 + +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Daniel Golle - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-itsdangerous SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://github.com/mitsuhiko/itsdangerous - TITLE:=python3-itsdangerous + TITLE:=ItsDangerous + URL:=https://palletsprojects.com/p/itsdangerous/ DEPENDS:=+python3-light VARIANT:=python3 endef define Package/python3-itsdangerous/description -Various helpers to pass trusted data to untrusted environments and back. + Various helpers to pass trusted data to untrusted environments and back. endef $(eval $(call Py3Package,python3-itsdangerous)) $(eval $(call BuildPackage,python3-itsdangerous)) +$(eval $(call BuildPackage,python3-itsdangerous-src)) + diff --git a/openwrt/feeds/packages/lang/python/jdcal/Makefile b/openwrt/feeds/packages/lang/python/jdcal/Makefile deleted file mode 100644 index 34d3970f..00000000 --- a/openwrt/feeds/packages/lang/python/jdcal/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=jdcal -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/j/jdcal/ -PKG_MD5SUM:=ab8d5ba300fd1eb01514f363d19b1eb9 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/jdcal - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Julian dates from proleptic Gregorian and Julian calendars. - URL:=http://github.com/phn/jdcal - DEPENDS:=+python -endef - -define Package/jdcal/description - Julian dates from proleptic Gregorian and Julian calendars. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/jdcal/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,jdcal)) diff --git a/openwrt/feeds/packages/lang/python/micropython-lib/Makefile b/openwrt/feeds/packages/lang/python/micropython-lib/Makefile index 989506ae..4e02a73e 100644 --- a/openwrt/feeds/packages/lang/python/micropython-lib/Makefile +++ b/openwrt/feeds/packages/lang/python/micropython-lib/Makefile @@ -8,20 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=micropython-lib -PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.9.3 PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/micropython/micropython-lib/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=66e15380eb109613263beb6825b8eecb9191088270c1a59e8c7d922dd57183c7 + PKG_MAINTAINER:=Roger D PKG_LICENSE:=MIT, PSFL PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git -PKG_SOURCE_VERSION:=f81e979c56dddb771ad36ec381b7f2c6cd12111f - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/openwrt/feeds/packages/lang/python/micropython/Makefile b/openwrt/feeds/packages/lang/python/micropython/Makefile index 7ee58827..932ab947 100644 --- a/openwrt/feeds/packages/lang/python/micropython/Makefile +++ b/openwrt/feeds/packages/lang/python/micropython/Makefile @@ -8,20 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=micropython -PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.9.4 PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/micropython/micropython/releases/download/v$(PKG_VERSION) +PKG_HASH:=0db042011bffcbd65362b67eb3cca87eaefa9f2a55b747fa75e922c706b8ce1a + PKG_MAINTAINER:=Roger D PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/micropython/micropython.git -PKG_SOURCE_VERSION:=5a1d63fc14dae788f705403a43c2d8639b7dd9cd - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,7 +28,7 @@ define Package/micropython SECTION:=lang CATEGORY:=Languages TITLE:=Micro Python - URL:=http://micropython.org + URL:=https://micropython.org DEPENDS:=+libffi endef @@ -41,17 +38,17 @@ define Package/micropython/description endef -MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix +MAKE_FLAGS += -C $(PKG_BUILD_DIR)/ports/unix FROZEN_MPY_DIR= define Build/Compile - $(call Build/Compile/Default,axtls) - $(call Build/Compile/Default) + $(call Build/Compile/Default,axtls) + $(call Build/Compile/Default) endef define Package/micropython/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ports/unix/micropython $(1)/usr/bin/micropython endef $(eval $(call BuildPackage,micropython)) diff --git a/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors b/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors deleted file mode 100644 index 765f3e70..00000000 --- a/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors +++ /dev/null @@ -1,13 +0,0 @@ -Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile -=================================================================== ---- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile 2016-11-17 02:43:13.000000000 +0100 -+++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile 2016-11-17 16:49:02.937809018 +0100 -@@ -21,7 +21,7 @@ - INC += -I$(BUILD) - - # compiler settings --CWARN = -Wall -Werror -+CWARN = -Wall - CWARN += -Wpointer-arith -Wuninitialized - CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) - diff --git a/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors.patch b/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors.patch new file mode 100644 index 00000000..1ebfa430 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/micropython/patches/000-Makefile-no-errors.patch @@ -0,0 +1,13 @@ +diff --git a/ports/unix/Makefile b/ports/unix/Makefile +index cbdd3f3..0ab157d 100644 +--- a/ports/unix/Makefile ++++ b/ports/unix/Makefile +@@ -21,7 +21,7 @@ INC += -I$(TOP) + INC += -I$(BUILD) + + # compiler settings +-CWARN = -Wall -Werror ++CWARN = -Wall + CWARN += -Wpointer-arith -Wuninitialized + CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) + diff --git a/openwrt/feeds/packages/lang/python/openpyxl/Makefile b/openwrt/feeds/packages/lang/python/openpyxl/Makefile index ccfcae50..f0ea9326 100644 --- a/openwrt/feeds/packages/lang/python/openpyxl/Makefile +++ b/openwrt/feeds/packages/lang/python/openpyxl/Makefile @@ -7,42 +7,66 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=openpyxl -PKG_VERSION:=2.4.2 +PKG_NAME:=python-openpyxl +PKG_VERSION:=2.6.2 PKG_RELEASE:=1 + +PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENCE.rst -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/56/c6/a2a7c36196e4732acceca093ce5961db907f5a855b557d6a727a7f59b8b4/ -PKG_MD5SUM:=28b6b5f74f01e6249e8c7f526c57a2e7 -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=openpyxl +PKG_HASH:=1d2af392cef8c8227bd2ac3ebe3a28b25aba74fd4fa473ce106065f0b73bfe2e +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/openpyxl +define Package/python-openpyxl/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files URL:=https://openpyxl.readthedocs.org/ - DEPENDS:=+python +django endef -define Package/openpyxl/description - A Python library to read/write Excel 2010 xlsx/xlsm files +define Package/python-openpyxl + $(call Package/python-openpyxl/Default) + DEPENDS:= \ + +PACKAGE_python-openpyxl:python \ + +PACKAGE_python-openpyxl:python-defusedxml \ + +PACKAGE_python-openpyxl:python-et_xmlfile \ + +PACKAGE_python-openpyxl:python-jdcal + VARIANT:=python + # The PROVIDES below is deprecated and should be dropped with the next version. + PROVIDES:=openpyxl +endef + +define Package/python3-openpyxl + $(call Package/python-openpyxl/Default) + DEPENDS:= \ + +PACKAGE_python3-openpyxl:python3 \ + +PACKAGE_python3-openpyxl:python3-defusedxml \ + +PACKAGE_python3-openpyxl:python3-et_xmlfile \ + +PACKAGE_python3-openpyxl:python3-jdcal + VARIANT:=python3 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python-openpyxl/description + A Python library to read/write Excel 2010 xlsx/xlsm files endef -define Package/openpyxl/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-openpyxl/description +$(call Package/python-openpyxl/description) +. +(Variant for Python3) endef -$(eval $(call BuildPackage,openpyxl)) +$(eval $(call PyPackage,python-openpyxl)) +$(eval $(call BuildPackage,python-openpyxl)) +$(eval $(call BuildPackage,python-openpyxl-src)) + +$(eval $(call Py3Package,python3-openpyxl)) +$(eval $(call BuildPackage,python3-openpyxl)) +$(eval $(call BuildPackage,python3-openpyxl-src)) diff --git a/openwrt/feeds/packages/lang/python/passlib/Makefile b/openwrt/feeds/packages/lang/python/passlib/Makefile new file mode 100644 index 00000000..5a11e95c --- /dev/null +++ b/openwrt/feeds/packages/lang/python/passlib/Makefile @@ -0,0 +1,62 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=passlib +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=3d948f64138c25633613f303bcc471126eae67c04d5e3f6b7b8ce6242f8653e0 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk + +include ../python-package.mk +include ../python3-package.mk + +define Package/passlib/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Daniel Dickinson + TITLE:=Comprehensive password hashing framework + URL:=https://bitbucket.org/ecollins/passlib +endef + +define Package/python-passlib +$(call Package/passlib/Default) + DEPENDS:=+PACKAGE_python-passlib:python +PACKAGE_python-passlib:python-dateutil + VARIANT:=python +endef + +define Package/python3-passlib +$(call Package/passlib/Default) + DEPENDS:=+PACKAGE_python3-passlib:python3 +PACKAGE_python3-passlib:python3-dateutil + VARIANT:=python3 +endef + +define Package/python-passlib/description +Passlib is a password hashing library for Python 2 & 3, which provides +cross-platform implementations of over 30 password hashing algorithms, +as well as a framework for managing existing password hashes. It’s +designed to be useful for a wide range of tasks, from verifying a hash +found in /etc/shadow, to providing full-strength password hashing for +multi-user applications. +endef + +define Package/python3-passlib/description +$(call Package/python-passlib/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-passlib)) +$(eval $(call Py3Package,python3-passlib)) + +$(eval $(call BuildPackage,python-passlib)) +$(eval $(call BuildPackage,python-passlib-src)) +$(eval $(call BuildPackage,python3-passlib)) +$(eval $(call BuildPackage,python3-passlib-src)) diff --git a/openwrt/feeds/packages/lang/python/pillow/Makefile b/openwrt/feeds/packages/lang/python/pillow/Makefile index ee40d6c1..e51fc016 100644 --- a/openwrt/feeds/packages/lang/python/pillow/Makefile +++ b/openwrt/feeds/packages/lang/python/pillow/Makefile @@ -7,47 +7,71 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pillow -PKG_VERSION:=3.3.1 -PKG_RELEASE=1 -PKG_LICENSE:=CUSTOM -PKG_LICENSE_FILES:=LICENSE +PKG_VERSION:=6.2.1 +PKG_RELEASE:=1 + +PYPI_NAME:=Pillow +PKG_HASH:=bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/python-pillow/Pillow.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=aab33141f381d5577cdef9033b7fdff79122a10c -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=HPND +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:python:pillow +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/pillow - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=The friendly PIL fork - MAINTAINER:=Gergely Kiss - URL:=https://python-pillow.org/ - DEPENDS:=+python +libfreetype +libjpeg +zlib +libtiff +include ../python-package.mk +include ../python3-package.mk + +define Package/python-pillow/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The friendly PIL fork + URL:=https://python-pillow.org/ + DEPENDS:=+libfreetype +libjpeg +libtiff +zlib endef -define Package/pillow/description - The friendly PIL fork +define Package/python-pillow +$(call Package/python-pillow/Default) + DEPENDS+=+PACKAGE_python-pillow:python + VARIANT:=python endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python-pillow/description + The friendly PIL fork endef -define Package/pillow/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR)/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/LICENSE $(1)$(PYTHON_PKG_DIR)/PIL/ +define Package/python3-pillow +$(call Package/python-pillow/Default) + DEPENDS+=+PACKAGE_python3-pillow:python3 + VARIANT:=python3 endef -$(eval $(call BuildPackage,pillow)) +define Package/python3-pillow/description +$(call Package/python-pillow/description) +. +(Variant for Python3) +endef + +PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \ + --enable-zlib \ + --enable-jpeg \ + --enable-tiff \ + --enable-freetype \ + --disable-lcms \ + --disable-webp \ + --disable-webpmux \ + --disable-jpeg2000 \ + --disable-imagequant \ + --disable-platform-guessing + +PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS) + +$(eval $(call PyPackage,python-pillow)) +$(eval $(call BuildPackage,python-pillow)) +$(eval $(call BuildPackage,python-pillow-src)) + +$(eval $(call Py3Package,python3-pillow)) +$(eval $(call BuildPackage,python3-pillow)) +$(eval $(call BuildPackage,python3-pillow-src)) diff --git a/openwrt/feeds/packages/lang/python/pillow/patches/010-fix-paths.patch b/openwrt/feeds/packages/lang/python/pillow/patches/010-fix-paths.patch deleted file mode 100644 index a6b86bfe..00000000 --- a/openwrt/feeds/packages/lang/python/pillow/patches/010-fix-paths.patch +++ /dev/null @@ -1,182 +0,0 @@ -diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py ---- pillow-3.3.1.orig/setup.py 2016-08-22 17:45:05.000000000 +0200 -+++ pillow-3.3.1/setup.py 2016-08-22 18:09:51.947745155 +0200 -@@ -111,12 +111,12 @@ except (ImportError, OSError): - - NAME = 'Pillow' - PILLOW_VERSION = '3.3.1' --JPEG_ROOT = None -+JPEG_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr") - JPEG2K_ROOT = None --ZLIB_ROOT = None -+ZLIB_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr") - IMAGEQUANT_ROOT = None --TIFF_ROOT = None --FREETYPE_ROOT = None -+TIFF_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr") -+FREETYPE_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr") - LCMS_ROOT = None - - -@@ -221,161 +221,6 @@ class pil_build_ext(build_ext): - _add_directory(include_dirs, os.path.join(prefix, "include")) - - # -- # add platform directories -- -- if self.disable_platform_guessing: -- pass -- -- elif sys.platform == "cygwin": -- # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory -- _add_directory(library_dirs, -- os.path.join("/usr/lib", "python%s" % -- sys.version[:3], "config")) -- -- elif sys.platform == "darwin": -- # attempt to make sure we pick freetype2 over other versions -- _add_directory(include_dirs, "/sw/include/freetype2") -- _add_directory(include_dirs, "/sw/lib/freetype2/include") -- # fink installation directories -- _add_directory(library_dirs, "/sw/lib") -- _add_directory(include_dirs, "/sw/include") -- # darwin ports installation directories -- _add_directory(library_dirs, "/opt/local/lib") -- _add_directory(include_dirs, "/opt/local/include") -- -- # if Homebrew is installed, use its lib and include directories -- try: -- prefix = subprocess.check_output(['brew', '--prefix']).strip( -- ).decode('latin1') -- except: -- # Homebrew not installed -- prefix = None -- -- ft_prefix = None -- -- if prefix: -- # add Homebrew's include and lib directories -- _add_directory(library_dirs, os.path.join(prefix, 'lib')) -- _add_directory(include_dirs, os.path.join(prefix, 'include')) -- ft_prefix = os.path.join(prefix, 'opt', 'freetype') -- -- if ft_prefix and os.path.isdir(ft_prefix): -- # freetype might not be linked into Homebrew's prefix -- _add_directory(library_dirs, os.path.join(ft_prefix, 'lib')) -- _add_directory(include_dirs, -- os.path.join(ft_prefix, 'include')) -- else: -- # fall back to freetype from XQuartz if -- # Homebrew's freetype is missing -- _add_directory(library_dirs, "/usr/X11/lib") -- _add_directory(include_dirs, "/usr/X11/include") -- -- elif sys.platform.startswith("linux"): -- arch_tp = (plat.processor(), plat.architecture()[0]) -- if arch_tp == ("x86_64", "32bit"): -- # 32-bit build on 64-bit machine. -- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu") -- else: -- for platform_ in arch_tp: -- -- if not platform_: -- continue -- -- if platform_ in ["x86_64", "64bit"]: -- _add_directory(library_dirs, "/lib64") -- _add_directory(library_dirs, "/usr/lib64") -- _add_directory(library_dirs, -- "/usr/lib/x86_64-linux-gnu") -- break -- elif platform_ in ["i386", "i686", "32bit"]: -- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu") -- break -- elif platform_ in ["aarch64"]: -- _add_directory(library_dirs, "/usr/lib64") -- _add_directory(library_dirs, -- "/usr/lib/aarch64-linux-gnu") -- break -- elif platform_ in ["arm", "armv7l"]: -- _add_directory(library_dirs, -- "/usr/lib/arm-linux-gnueabi") -- break -- elif platform_ in ["ppc64"]: -- _add_directory(library_dirs, "/usr/lib64") -- _add_directory(library_dirs, -- "/usr/lib/ppc64-linux-gnu") -- _add_directory(library_dirs, -- "/usr/lib/powerpc64-linux-gnu") -- break -- elif platform_ in ["ppc"]: -- _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu") -- _add_directory(library_dirs, -- "/usr/lib/powerpc-linux-gnu") -- break -- elif platform_ in ["s390x"]: -- _add_directory(library_dirs, "/usr/lib64") -- _add_directory(library_dirs, -- "/usr/lib/s390x-linux-gnu") -- break -- elif platform_ in ["s390"]: -- _add_directory(library_dirs, "/usr/lib/s390-linux-gnu") -- break -- else: -- raise ValueError( -- "Unable to identify Linux platform: `%s`" % platform_) -- -- # XXX Kludge. Above /\ we brute force support multiarch. Here we -- # try Barry's more general approach. Afterward, something should -- # work ;-) -- self.add_multiarch_paths() -- -- elif sys.platform.startswith("gnu"): -- self.add_multiarch_paths() -- -- elif sys.platform.startswith("freebsd"): -- _add_directory(library_dirs, "/usr/local/lib") -- _add_directory(include_dirs, "/usr/local/include") -- -- elif sys.platform.startswith("netbsd"): -- _add_directory(library_dirs, "/usr/pkg/lib") -- _add_directory(include_dirs, "/usr/pkg/include") -- -- elif sys.platform.startswith("sunos5"): -- _add_directory(library_dirs, "/opt/local/lib") -- _add_directory(include_dirs, "/opt/local/include") -- -- # FIXME: check /opt/stuff directories here? -- -- # standard locations -- if not self.disable_platform_guessing: -- _add_directory(library_dirs, "/usr/local/lib") -- _add_directory(include_dirs, "/usr/local/include") -- -- _add_directory(library_dirs, "/usr/lib") -- _add_directory(include_dirs, "/usr/include") -- # alpine, at least -- _add_directory(library_dirs, "/lib") -- -- # on Windows, look for the OpenJPEG libraries in the location that -- # the official installer puts them -- if sys.platform == "win32": -- program_files = os.environ.get('ProgramFiles', '') -- best_version = (0, 0) -- best_path = None -- for name in os.listdir(program_files): -- if name.startswith('OpenJPEG '): -- version = tuple([int(x) for x in name[9:].strip().split( -- '.')]) -- if version > best_version: -- best_version = version -- best_path = os.path.join(program_files, name) -- -- if best_path: -- _dbg('Adding %s to search list', best_path) -- _add_directory(library_dirs, os.path.join(best_path, 'lib')) -- _add_directory(include_dirs, -- os.path.join(best_path, 'include')) -- -- # - # insert new dirs *before* default libs, to avoid conflicts - # between Python PYD stub libs and real libraries - diff --git a/openwrt/feeds/packages/lang/python/pygobject/Makefile b/openwrt/feeds/packages/lang/python/pygobject/Makefile deleted file mode 100644 index 3c14ae44..00000000 --- a/openwrt/feeds/packages/lang/python/pygobject/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# -# Copyright (C) 2008 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:=pygobject -PKG_VERSION:=2.16.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16 -PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -$(call include_mk, python-package.mk) - -EXTRA_LDFLAGS+= \ - -L$(ICONV_PREFIX) -L$(INTL_PREFIX) - -TARGET_CFLAGS += $(FPIC) -CONFIGURE_ARGS += --enable-static - -define Package/python-gobject - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=GLib bindings for python - URL:=http://www.pygtk.org/ - DEPENDS:=+python +python-expat +glib2 +libffi -endef - -define Package/python-gobject/description - GLib bindings for python -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --with-libffi \ - ) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/ - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/* \ - $(1)/usr/include/pygtk-2.0/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ - $(1)/usr/lib/pkgconfig/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.{so,a,la} \ - $(1)/usr/lib/ - - $(SED) \ - "s,^\(prefix\|exec_prefix\|datadir\)=,\1=$(STAGING_DIR),g" \ - $(1)/usr/lib/pkgconfig/pygobject-2.0.pc - - $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/codegen - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/codegen/*.py \ - $(1)/usr/share/pygobject/2.0/codegen - - $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/defs - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/defs/* \ - $(1)/usr/share/pygobject/2.0/defs - - $(INSTALL_DIR) $(2)/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/* \ - $(2)/bin - - $(SED) \ - "s,^\(prefix\|datadir\)=,\1=$(STAGING_DIR),g" \ - $(2)/bin/pygobject-codegen-2.0 -endef - -define Package/python-gobject/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.so* \ - $(1)/usr/lib - - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{pth,py} \ - $(1)$(PYTHON_PKG_DIR)/ - - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0 - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.py \ - $(1)$(PYTHON_PKG_DIR)/gtk-2.0/ - - $(foreach d,gobject gio glib, \ - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \ - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(d)/*.{py,so} \ - $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \ - ) -endef - -$(eval $(call BuildPackage,python-gobject)) diff --git a/openwrt/feeds/packages/lang/python/pygobject/patches/010-binary-constants-module.patch b/openwrt/feeds/packages/lang/python/pygobject/patches/010-binary-constants-module.patch deleted file mode 100644 index 125cf64d..00000000 --- a/openwrt/feeds/packages/lang/python/pygobject/patches/010-binary-constants-module.patch +++ /dev/null @@ -1,386 +0,0 @@ - -diff --git a/gobject/Makefile.am b/gobject/Makefile.am -index e59daa4..0115c7e 100644 ---- a/gobject/Makefile.am -+++ b/gobject/Makefile.am -@@ -11,7 +11,7 @@ pygobjectdir = $(pkgpyexecdir)/gobject - pygobject_PYTHON = \ - __init__.py \ - propertyhelper.py --pygobject_LTLIBRARIES = _gobject.la -+pygobject_LTLIBRARIES = _gobject.la _constants.la - nodist_pygobject_PYTHON = constants.py - - common_ldflags = -module -avoid-version -@@ -19,18 +19,11 @@ if PLATFORM_WIN32 - common_ldflags += -no-undefined - endif - --constants.py: generate-constants$(EXEEXT) constants.py.in -- rm -f constants.py -- cp $(srcdir)/constants.py.in constants.py -- chmod 644 constants.py -- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py -- chmod 444 constants.py -- --generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) -- --noinst_PROGRAMS = generate-constants - CLEANFILES = constants.py --EXTRA_DIST = constants.py.in -+ -+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants -+_constants_la_SOURCES = _constants.c - - _gobject_la_CFLAGS = \ - $(PYTHON_INCLUDES) \ -diff --git a/gobject/Makefile.in b/gobject/Makefile.in -index c4c2efa..5bd0c08 100644 ---- a/gobject/Makefile.in -+++ b/gobject/Makefile.in -@@ -15,7 +15,6 @@ - @SET_MAKE@ - - -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -38,7 +37,6 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - @PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined --noinst_PROGRAMS = generate-constants$(EXEEXT) - @HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h - @PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32 - subdir = gobject -@@ -66,6 +64,9 @@ am__installdirs = "$(DESTDIR)$(pygobjectdir)" \ - "$(DESTDIR)$(pkgincludedir)" - pygobjectLTLIBRARIES_INSTALL = $(INSTALL) - LTLIBRARIES = $(pygobject_LTLIBRARIES) -+_constants_la_LIBADD = -+am__constants_la_OBJECTS = _constants_la-_constants.lo -+_constants_la_OBJECTS = $(am__constants_la_OBJECTS) - am__DEPENDENCIES_1 = - am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \ - pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \ -@@ -80,11 +81,6 @@ am__gobject_la_OBJECTS = _gobject_la-gobjectmodule.lo \ - _gobject_la-pygpointer.lo _gobject_la-pygtype.lo \ - $(am__objects_1) - _gobject_la_OBJECTS = $(am__gobject_la_OBJECTS) --PROGRAMS = $(noinst_PROGRAMS) --generate_constants_SOURCES = generate-constants.c --generate_constants_OBJECTS = \ -- generate_constants-generate-constants.$(OBJEXT) --generate_constants_LDADD = $(LDADD) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -@@ -96,8 +92,9 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = $(_gobject_la_SOURCES) generate-constants.c --DIST_SOURCES = $(am___gobject_la_SOURCES_DIST) generate-constants.c -+SOURCES = $(_constants_la_SOURCES) $(_gobject_la_SOURCES) -+DIST_SOURCES = $(_constants_la_SOURCES) \ -+ $(am___gobject_la_SOURCES_DIST) - nodist_pygobjectPYTHON_INSTALL = $(INSTALL_DATA) - pygobjectPYTHON_INSTALL = $(INSTALL_DATA) - py_compile = $(top_srcdir)/py-compile -@@ -265,12 +262,13 @@ pygobject_PYTHON = \ - __init__.py \ - propertyhelper.py - --pygobject_LTLIBRARIES = _gobject.la -+pygobject_LTLIBRARIES = _gobject.la _constants.la - nodist_pygobject_PYTHON = constants.py - common_ldflags = -module -avoid-version $(am__append_1) --generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) - CLEANFILES = constants.py --EXTRA_DIST = constants.py.in -+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants -+_constants_la_SOURCES = _constants.c - _gobject_la_CFLAGS = $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) \ - -DPY_SSIZE_T_CLEAN -I$(top_srcdir)/glib $(am__append_3) - _gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject" -@@ -345,25 +343,18 @@ clean-pygobjectLTLIBRARIES: - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -+_constants.la: $(_constants_la_OBJECTS) $(_constants_la_DEPENDENCIES) -+ $(LINK) -rpath $(pygobjectdir) $(_constants_la_LDFLAGS) $(_constants_la_OBJECTS) $(_constants_la_LIBADD) $(LIBS) - _gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES) - $(LINK) -rpath $(pygobjectdir) $(_gobject_la_LDFLAGS) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS) - --clean-noinstPROGRAMS: -- @list='$(noinst_PROGRAMS)'; for p in $$list; do \ -- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ -- echo " rm -f $$p $$f"; \ -- rm -f $$p $$f ; \ -- done --generate-constants$(EXEEXT): $(generate_constants_OBJECTS) $(generate_constants_DEPENDENCIES) -- @rm -f generate-constants$(EXEEXT) -- $(LINK) $(generate_constants_LDFLAGS) $(generate_constants_OBJECTS) $(generate_constants_LDADD) $(LIBS) -- - mostlyclean-compile: - -rm -f *.$(OBJEXT) - - distclean-compile: - -rm -f *.tab.c - -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_constants_la-_constants.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@ -@@ -374,7 +365,6 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_constants-generate-constants.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@@ -397,6 +387,13 @@ distclean-compile: - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -+_constants_la-_constants.lo: _constants.c -+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -MT _constants_la-_constants.lo -MD -MP -MF "$(DEPDIR)/_constants_la-_constants.Tpo" -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_constants_la-_constants.Tpo" "$(DEPDIR)/_constants_la-_constants.Plo"; else rm -f "$(DEPDIR)/_constants_la-_constants.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_constants.c' object='_constants_la-_constants.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c -+ - _gobject_la-gobjectmodule.lo: gobjectmodule.c - @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" "$(DEPDIR)/_gobject_la-gobjectmodule.Plo"; else rm -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo"; exit 1; fi -@@ -467,20 +464,6 @@ _gobject_la-ffi-marshaller.lo: ffi-marshaller.c - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c - --generate_constants-generate-constants.o: generate-constants.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.o -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c -- --generate_constants-generate-constants.obj: generate-constants.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.obj -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi` -- - mostlyclean-libtool: - -rm -f *.lo - -@@ -641,7 +624,7 @@ distdir: $(DISTFILES) - done - check-am: all-am - check: check-am --all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -+all-am: Makefile $(LTLIBRARIES) $(HEADERS) - installdirs: - for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ -@@ -673,8 +656,8 @@ maintainer-clean-generic: - @echo "it deletes files that may require special tools to rebuild." - clean: clean-am - --clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ -- clean-pygobjectLTLIBRARIES mostlyclean-am -+clean-am: clean-generic clean-libtool clean-pygobjectLTLIBRARIES \ -+ mostlyclean-am - - distclean: distclean-am - -rm -rf ./$(DEPDIR) -@@ -727,28 +710,21 @@ uninstall-am: uninstall-info-am uninstall-nodist_pygobjectPYTHON \ - uninstall-pygobjectPYTHON - - .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ -- clean-libtool clean-noinstPROGRAMS clean-pygobjectLTLIBRARIES \ -- ctags distclean distclean-compile distclean-generic \ -- distclean-libtool distclean-tags distdir dvi dvi-am html \ -- html-am info info-am install install-am install-data \ -- install-data-am install-exec install-exec-am install-info \ -- install-info-am install-man install-nodist_pygobjectPYTHON \ -- install-pkgincludeHEADERS install-pygobjectLTLIBRARIES \ -- install-pygobjectPYTHON install-strip installcheck \ -- installcheck-am installdirs maintainer-clean \ -- maintainer-clean-generic mostlyclean mostlyclean-compile \ -- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ -- tags uninstall uninstall-am uninstall-info-am \ -- uninstall-nodist_pygobjectPYTHON uninstall-pkgincludeHEADERS \ -- uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON -- -- --constants.py: generate-constants$(EXEEXT) constants.py.in -- rm -f constants.py -- cp $(srcdir)/constants.py.in constants.py -- chmod 644 constants.py -- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py -- chmod 444 constants.py -+ clean-libtool clean-pygobjectLTLIBRARIES ctags distclean \ -+ distclean-compile distclean-generic distclean-libtool \ -+ distclean-tags distdir dvi dvi-am html html-am info info-am \ -+ install install-am install-data install-data-am install-exec \ -+ install-exec-am install-info install-info-am install-man \ -+ install-nodist_pygobjectPYTHON install-pkgincludeHEADERS \ -+ install-pygobjectLTLIBRARIES install-pygobjectPYTHON \ -+ install-strip installcheck installcheck-am installdirs \ -+ maintainer-clean maintainer-clean-generic mostlyclean \ -+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ -+ pdf pdf-am ps ps-am tags uninstall uninstall-am \ -+ uninstall-info-am uninstall-nodist_pygobjectPYTHON \ -+ uninstall-pkgincludeHEADERS uninstall-pygobjectLTLIBRARIES \ -+ uninstall-pygobjectPYTHON -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: -diff --git a/gobject/_constants.c b/gobject/_constants.c -index e69de29..c304105 100644 ---- a/gobject/_constants.c -+++ b/gobject/_constants.c -@@ -0,0 +1,26 @@ -+#include -+#include -+ -+DL_EXPORT(void) -+init_constants(void) -+{ -+ PyObject *m, *d; -+ -+ m = Py_InitModule("gobject._constants", NULL); -+ d = PyModule_GetDict(m); -+ -+ PyDict_SetItemString(d, "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT)); -+ PyDict_SetItemString(d, "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT)); -+ PyDict_SetItemString(d, "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE)); -+ PyDict_SetItemString(d, "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE)); -+ PyDict_SetItemString(d, "G_MINSHORT", PyLong_FromLong(G_MINSHORT)); -+ PyDict_SetItemString(d, "G_MAXSHORT", PyLong_FromLong(G_MAXSHORT)); -+ PyDict_SetItemString(d, "G_MAXUSHORT", PyLong_FromUnsignedLong(G_MAXUSHORT)); -+ PyDict_SetItemString(d, "G_MININT", PyLong_FromLong(G_MININT)); -+ PyDict_SetItemString(d, "G_MAXINT", PyLong_FromLong(G_MAXINT)); -+ PyDict_SetItemString(d, "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT)); -+ PyDict_SetItemString(d, "G_MINLONG", PyLong_FromLong(G_MINLONG)); -+ PyDict_SetItemString(d, "G_MAXLONG", PyLong_FromLong(G_MAXLONG)); -+ PyDict_SetItemString(d, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG)); -+} -+ -diff --git a/gobject/constants.py b/gobject/constants.py ---- a/gobject/constants.py -+++ b/gobject/constants.py -@@ -0,0 +1,51 @@ -+# -*- Mode: Python; py-indent-offset: 4 -*- -+# pygobject - Python bindings for the GObject library -+# Copyright (C) 2006-2007 Johan Dahlin -+# -+# gobject/constants.py: GObject type constants -+# -+# This library is free software; you can redistribute it and/or -+# modify it under the terms of the GNU Lesser General Public -+# License as published by the Free Software Foundation; either -+# version 2.1 of the License, or (at your option) any later version. -+# -+# This library is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# Lesser General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public -+# License along with this library; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+# USA -+ -+import sys -+ -+import gobject._gobject -+_gobject = sys.modules['gobject._gobject'] -+from _constants import * -+ -+# TYPE_INVALID defined in gobjectmodule.c -+TYPE_NONE = _gobject.type_from_name('void') -+TYPE_INTERFACE = _gobject.type_from_name('GInterface') -+TYPE_CHAR = _gobject.type_from_name('gchar') -+TYPE_UCHAR = _gobject.type_from_name('guchar') -+TYPE_BOOLEAN = _gobject.type_from_name('gboolean') -+TYPE_INT = _gobject.type_from_name('gint') -+TYPE_UINT = _gobject.type_from_name('guint') -+TYPE_LONG = _gobject.type_from_name('glong') -+TYPE_ULONG = _gobject.type_from_name('gulong') -+TYPE_INT64 = _gobject.type_from_name('gint64') -+TYPE_UINT64 = _gobject.type_from_name('guint64') -+TYPE_ENUM = _gobject.type_from_name('GEnum') -+TYPE_FLAGS = _gobject.type_from_name('GFlags') -+TYPE_FLOAT = _gobject.type_from_name('gfloat') -+TYPE_DOUBLE = _gobject.type_from_name('gdouble') -+TYPE_STRING = _gobject.type_from_name('gchararray') -+TYPE_POINTER = _gobject.type_from_name('gpointer') -+TYPE_BOXED = _gobject.type_from_name('GBoxed') -+TYPE_PARAM = _gobject.type_from_name('GParam') -+TYPE_OBJECT = _gobject.type_from_name('GObject') -+TYPE_PYOBJECT = _gobject.type_from_name('PyObject') -+TYPE_UNICHAR = TYPE_UINT -+ -diff --git a/gobject/constants.py.in b/gobject/constants.py.in -deleted file mode 100644 -index 80bf920..0000000 ---- a/gobject/constants.py.in -+++ /dev/null -@@ -1,50 +0,0 @@ --# -*- Mode: Python; py-indent-offset: 4 -*- --# pygobject - Python bindings for the GObject library --# Copyright (C) 2006-2007 Johan Dahlin --# --# gobject/constants.py: GObject type constants --# --# This library is free software; you can redistribute it and/or --# modify it under the terms of the GNU Lesser General Public --# License as published by the Free Software Foundation; either --# version 2.1 of the License, or (at your option) any later version. --# --# This library is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --# Lesser General Public License for more details. --# --# You should have received a copy of the GNU Lesser General Public --# License along with this library; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 --# USA -- --import sys -- --import gobject._gobject --_gobject = sys.modules['gobject._gobject'] -- --# TYPE_INVALID defined in gobjectmodule.c --TYPE_NONE = _gobject.type_from_name('void') --TYPE_INTERFACE = _gobject.type_from_name('GInterface') --TYPE_CHAR = _gobject.type_from_name('gchar') --TYPE_UCHAR = _gobject.type_from_name('guchar') --TYPE_BOOLEAN = _gobject.type_from_name('gboolean') --TYPE_INT = _gobject.type_from_name('gint') --TYPE_UINT = _gobject.type_from_name('guint') --TYPE_LONG = _gobject.type_from_name('glong') --TYPE_ULONG = _gobject.type_from_name('gulong') --TYPE_INT64 = _gobject.type_from_name('gint64') --TYPE_UINT64 = _gobject.type_from_name('guint64') --TYPE_ENUM = _gobject.type_from_name('GEnum') --TYPE_FLAGS = _gobject.type_from_name('GFlags') --TYPE_FLOAT = _gobject.type_from_name('gfloat') --TYPE_DOUBLE = _gobject.type_from_name('gdouble') --TYPE_STRING = _gobject.type_from_name('gchararray') --TYPE_POINTER = _gobject.type_from_name('gpointer') --TYPE_BOXED = _gobject.type_from_name('GBoxed') --TYPE_PARAM = _gobject.type_from_name('GParam') --TYPE_OBJECT = _gobject.type_from_name('GObject') --TYPE_PYOBJECT = _gobject.type_from_name('PyObject') --TYPE_UNICHAR = TYPE_UINT -- diff --git a/openwrt/feeds/packages/lang/python/pygobject/patches/011-fix-compile.patch b/openwrt/feeds/packages/lang/python/pygobject/patches/011-fix-compile.patch deleted file mode 100644 index 7f38f055..00000000 --- a/openwrt/feeds/packages/lang/python/pygobject/patches/011-fix-compile.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: pygobject-2.16.0/glib/pyglib.c -=================================================================== ---- pygobject-2.16.0.orig/glib/pyglib.c -+++ pygobject-2.16.0/glib/pyglib.c -@@ -359,7 +359,7 @@ pyglib_gerror_exception_check(GError **e - } - - g_set_error(error, g_quark_from_string(_PyUnicode_AsString(py_domain)), -- _PyLong_AsLong(py_code), _PyUnicode_AsString(py_message)); -+ _PyLong_AsLong(py_code), "%s", _PyUnicode_AsString(py_message)); - - Py_DECREF(py_message); - Py_DECREF(py_code); -@@ -368,7 +368,7 @@ pyglib_gerror_exception_check(GError **e - - bad_gerror: - Py_DECREF(value); -- g_set_error(error, g_quark_from_static_string("pyglib"), 0, bad_gerror_message); -+ g_set_error(error, g_quark_from_static_string("pyglib"), 0, "%s", bad_gerror_message); - PyErr_SetString(PyExc_ValueError, bad_gerror_message); - PyErr_Print(); - return -2; -Index: pygobject-2.16.0/glib/pygspawn.c -=================================================================== ---- pygobject-2.16.0.orig/glib/pygspawn.c -+++ pygobject-2.16.0/glib/pygspawn.c -@@ -22,7 +22,7 @@ - */ - - #include --#include -+#include - - #include "pyglib.h" - #include "pyglib-private.h" diff --git a/openwrt/feeds/packages/lang/python/pygobject/patches/100-fix-python-config-shebang.patch b/openwrt/feeds/packages/lang/python/pygobject/patches/100-fix-python-config-shebang.patch deleted file mode 100644 index 86244f05..00000000 --- a/openwrt/feeds/packages/lang/python/pygobject/patches/100-fix-python-config-shebang.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: pygobject-2.16.0/configure -=================================================================== ---- pygobject-2.16.0.orig/configure -+++ pygobject-2.16.0/configure -@@ -11692,7 +11692,7 @@ echo $ECHO_N "checking for headers requi - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` - py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` - if test -x "$PYTHON-config"; then --PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` -+PYTHON_INCLUDES=`$PYTHON $PYTHON-config --includes 2>/dev/null` - else - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - if test "$py_prefix" != "$py_exec_prefix"; then -@@ -11748,7 +11748,7 @@ CPPFLAGS="$save_CPPFLAGS" - echo $ECHO_N "checking for PySignal_SetWakeupFd in Python.h... $ECHO_C" >&6; } - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` - if test -x "$PYTHON-config"; then --PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` -+PYTHON_INCLUDES=`$PYTHON $PYTHON-config --includes 2>/dev/null` - else - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - fi -Index: pygobject-2.16.0/configure.ac -=================================================================== ---- pygobject-2.16.0.orig/configure.ac -+++ pygobject-2.16.0/configure.ac -@@ -76,7 +76,7 @@ JD_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(c - AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h]) - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` - if test -x "$PYTHON-config"; then --PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` -+PYTHON_INCLUDES=`$PYTHON $PYTHON-config --includes 2>/dev/null` - else - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - fi -Index: pygobject-2.16.0/m4/python.m4 -=================================================================== ---- pygobject-2.16.0.orig/m4/python.m4 -+++ pygobject-2.16.0/m4/python.m4 -@@ -46,7 +46,7 @@ dnl deduce PYTHON_INCLUDES - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` - py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` - if test -x "$PYTHON-config"; then --PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` -+PYTHON_INCLUDES=`$PYTHON $PYTHON-config --includes 2>/dev/null` - else - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - if test "$py_prefix" != "$py_exec_prefix"; then -@@ -237,7 +237,7 @@ dnl deduce PYTHON_INCLUDES - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` - py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` - if test -x "$PYTHON-config"; then --PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` -+PYTHON_INCLUDES=`$PYTHON $PYTHON-config --includes 2>/dev/null` - else - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - if test "$py_prefix" != "$py_exec_prefix"; then diff --git a/openwrt/feeds/packages/lang/python/pyjwt/Makefile b/openwrt/feeds/packages/lang/python/pyjwt/Makefile new file mode 100644 index 00000000..b8000308 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/pyjwt/Makefile @@ -0,0 +1,60 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyjwt +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=PyJWT +PKG_HASH:=8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-pyjwt/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=JSON Web Token implementation in Python + URL:=http://github.com/jpadilla/pyjwt +endef + +define Package/python-pyjwt + $(call Package/python-pyjwt/Default) + DEPENDS:=+PACKAGE_python-pyjwt:python + VARIANT:=python +endef + +define Package/python3-pyjwt + $(call Package/python-pyjwt/Default) + DEPENDS:=+PACKAGE_python3-pyjwt:python3 + VARIANT:=python3 +endef + +define Package/python-pyjwt/description + A Python implementation of RFC 7519. +endef + +define Package/python3-pyjwt/description +$(call Package/python-pyjwt/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-pyjwt)) +$(eval $(call BuildPackage,python-pyjwt)) +$(eval $(call BuildPackage,python-pyjwt-src)) + +$(eval $(call Py3Package,python3-pyjwt)) +$(eval $(call BuildPackage,python3-pyjwt)) +$(eval $(call BuildPackage,python3-pyjwt-src)) diff --git a/openwrt/feeds/packages/lang/python/pyodbc/Makefile b/openwrt/feeds/packages/lang/python/pyodbc/Makefile index 3865167c..fa70c8f6 100644 --- a/openwrt/feeds/packages/lang/python/pyodbc/Makefile +++ b/openwrt/feeds/packages/lang/python/pyodbc/Makefile @@ -5,30 +5,30 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pyodbc -PKG_VERSION:=4.0.17 -PKG_RELEASE:=5 +PKG_VERSION:=4.0.26 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/ce/57/6b92aa5b3497dde6be55fd6fcb76c7db215ed1d56fde45c613add4a43095/ -PKG_HASH:=a82892ba8d74318524efaaccaf8351d3a3b4079a07e1a758902a2b9e84529c9d +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3 PKG_BUILD_DEPENDS:=python python3 unixodbc PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Daniel Golle -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_BUILD_DEPENDS:=unixodbc/host +include ../pypi.mk +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +include ../python-package.mk +include ../python3-package.mk define Package/python-pyodbc/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python URL:=https://github.com/mkleehammer/pyodbc - DEPENDS:=+unixodbc +libstdcpp + DEPENDS:=+unixodbc $(CXX_DEPENDS) endef define Package/python-pyodbc diff --git a/openwrt/feeds/packages/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch b/openwrt/feeds/packages/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch deleted file mode 100644 index 0819a6dd..00000000 --- a/openwrt/feeds/packages/lang/python/pyodbc/patches/100-connection-assume-SQL_C_WCHAR-is-native-endian.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- a/src/connection.cpp -+++ b/src/connection.cpp -@@ -18,6 +18,14 @@ - #include "cnxninfo.h" - #include "sqlwchar.h" - -+#ifdef WORDS_BIGENDIAN -+# define OPTENC_UTF16NE OPTENC_UTF16BE -+# define ENCSTR_UTF16NE "utf-16be" -+#else -+# define OPTENC_UTF16NE OPTENC_UTF16LE -+# define ENCSTR_UTF16NE "utf-16le" -+#endif -+ - #if PY_MAJOR_VERSION < 3 - static bool IsStringType(PyObject* t) { return (void*)t == (void*)&PyString_Type; } - static bool IsUnicodeType(PyObject* t) { return (void*)t == (void*)&PyUnicode_Type; } -@@ -90,7 +98,7 @@ static bool Connect(PyObject* pConnectSt - // indication that we can handle Unicode. We are going to use the same unicode ending - // as we do for binding parameters. - -- SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, "utf-16le"); -+ SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, ENCSTR_UTF16NE); - if (!wchar) - return false; - -@@ -216,24 +224,24 @@ PyObject* Connection_New(PyObject* pConn - // single-byte text we don't actually know what the encoding is. For example, with SQL - // Server the encoding is based on the database's collation. We ask the driver / DB to - // convert to SQL_C_WCHAR and use the ODBC default of UTF-16LE. -- cnxn->sqlchar_enc.optenc = OPTENC_UTF16LE; -- cnxn->sqlchar_enc.name = _strdup("utf-16le"); -+ cnxn->sqlchar_enc.optenc = OPTENC_UTF16NE; -+ cnxn->sqlchar_enc.name = _strdup(ENCSTR_UTF16NE); - cnxn->sqlchar_enc.ctype = SQL_C_WCHAR; - -- cnxn->sqlwchar_enc.optenc = OPTENC_UTF16LE; -- cnxn->sqlwchar_enc.name = _strdup("utf-16le"); -+ cnxn->sqlwchar_enc.optenc = OPTENC_UTF16NE; -+ cnxn->sqlwchar_enc.name = _strdup(ENCSTR_UTF16NE); - cnxn->sqlwchar_enc.ctype = SQL_C_WCHAR; - -- cnxn->metadata_enc.optenc = OPTENC_UTF16LE; -- cnxn->metadata_enc.name = _strdup("utf-16le"); -+ cnxn->metadata_enc.optenc = OPTENC_UTF16NE; -+ cnxn->metadata_enc.name = _strdup(ENCSTR_UTF16NE); - cnxn->metadata_enc.ctype = SQL_C_WCHAR; - - // Note: I attempted to use UTF-8 here too since it can hold any type, but SQL Server fails - // with a data truncation error if we send something encoded in 2 bytes to a column with 1 - // character. I don't know if this is a bug in SQL Server's driver or if I'm missing - // something, so we'll stay with the default ODBC conversions. -- cnxn->unicode_enc.optenc = OPTENC_UTF16LE; -- cnxn->unicode_enc.name = _strdup("utf-16le"); -+ cnxn->unicode_enc.optenc = OPTENC_UTF16NE; -+ cnxn->unicode_enc.name = _strdup(ENCSTR_UTF16NE); - cnxn->unicode_enc.ctype = SQL_C_WCHAR; - - #if PY_MAJOR_VERSION < 3 diff --git a/openwrt/feeds/packages/lang/python/pypi.mk b/openwrt/feeds/packages/lang/python/pypi.mk new file mode 100644 index 00000000..cc0cb760 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/pypi.mk @@ -0,0 +1,24 @@ +# +# Copyright (C) 2019 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifndef DUMP + ifdef __package_mk + $(warning pypi.mk should be included before package.mk) + endif +endif + +ifneq ($(strip $(PYPI_NAME)),) + PYPI_SOURCE_NAME?=$(PYPI_NAME) + PYPI_SOURCE_EXT?=tar.gz + 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))) + + PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT) + PKG_SOURCE_URL?=https://files.pythonhosted.org/packages/source/$(PYPI_NAME_FIRST_LETTER)/$(PYPI_NAME) + + PKG_BUILD_DIR:=$(BUILD_DIR)/pypi/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PYPI_SOURCE_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) + HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/pypi/$(PYPI_SOURCE_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) +endif diff --git a/openwrt/feeds/packages/lang/python/python-aiohttp-cors/Makefile b/openwrt/feeds/packages/lang/python/python-aiohttp-cors/Makefile new file mode 100644 index 00000000..b8c85f95 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-aiohttp-cors/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aiohttp-cors +PKG_VERSION:=0.7.0 +PKG_RELEASE:=1 + +PYPI_NAME:=aiohttp_cors +PYPI_SOURCE_NAME:=aiohttp-cors +PKG_HASH:=4d39c6d7100fd9764ed1caf8cebf0eb01bf5e3f24e2e073fda6234bc48b19f5d + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-aiohttp-cors + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=CORS support for aiohttp + URL:=https://github.com/aio-libs/aiohttp-cors + DEPENDS:= \ + +python3-aiohttp \ + +python3-light + VARIANT:=python3 +endef + +define Package/python3-aiohttp-cors/description + Implements Cross Origin Resource Sharing (CORS) support for aiohttp asyncio-powered asynchronous HTTP server. +endef + +$(eval $(call Py3Package,python3-aiohttp-cors)) +$(eval $(call BuildPackage,python3-aiohttp-cors)) +$(eval $(call BuildPackage,python3-aiohttp-cors-src)) diff --git a/openwrt/feeds/packages/lang/python/python-aiohttp/Makefile b/openwrt/feeds/packages/lang/python/python-aiohttp/Makefile new file mode 100644 index 00000000..c2f7d1e8 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-aiohttp/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aiohttp +PKG_VERSION:=3.5.4 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:aio-libs_project:aiohttp + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-aiohttp + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Async http client/server framework (asyncio) + URL:=https://github.com/aio-libs/aiohttp + DEPENDS:= \ + +python3-light \ + +python3-attrs \ + +python3-chardet \ + +python3-multidict \ + +python3-async-timeout \ + +python3-yarl \ + +python3-logging \ + +python3-codecs \ + +python3-cgi \ + +python3-openssl + VARIANT:=python3 +endef + +define Package/python3-aiohttp/description +Asynchronous HTTP client/server framework for asyncio and Python3 +endef + +$(eval $(call Py3Package,python3-aiohttp)) +$(eval $(call BuildPackage,python3-aiohttp)) +$(eval $(call BuildPackage,python3-aiohttp-src)) diff --git a/openwrt/feeds/packages/lang/python/python-appdirs/Makefile b/openwrt/feeds/packages/lang/python/python-appdirs/Makefile new file mode 100644 index 00000000..d876e8b1 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-appdirs/Makefile @@ -0,0 +1,36 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-appdirs +PKG_VERSION:=1.4.3 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PYPI_NAME:=appdirs +PKG_HASH:=9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92 +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-appdirs + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/ActiveState/appdirs + TITLE:=python3-appdirs + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python-appdirs/description + The Universal Character Encoding Detector +endef + +$(eval $(call Py3Package,python3-appdirs)) +$(eval $(call BuildPackage,python3-appdirs)) +$(eval $(call BuildPackage,python3-appdirs-src)) diff --git a/openwrt/feeds/packages/lang/python/python-asn1crypto/Makefile b/openwrt/feeds/packages/lang/python/python-asn1crypto/Makefile index a952317e..1309ba8a 100644 --- a/openwrt/feeds/packages/lang/python/python-asn1crypto/Makefile +++ b/openwrt/feeds/packages/lang/python/python-asn1crypto/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-asn1crypto -PKG_VERSION:=0.22.0 +PKG_VERSION:=1.2.0 PKG_RELEASE:=1 PKG_SOURCE:=asn1crypto-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/67/14/5d66588868c4304f804ebaff9397255f6ec5559e46724c2496e0f26e68d6 -PKG_HASH:=cbbadd640d3165ab24b06ef25d1dca09a3441611ac15f6a6b452474fdf0aed1a +PKG_SOURCE_URL:=https://pypi.io/packages/source/a/asn1crypto +PKG_HASH:=87620880a477123e01177a1f73d0f327210b43a3cdbd714efcd2fa49a8d7b384 PKG_LICENSE:=MIT PKG_MAINTAINER:=Alexandru Ardelean @@ -21,8 +21,8 @@ PKG_MAINTAINER:=Alexandru Ardelean PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-asn1crypto-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +include ../python-package.mk +include ../python3-package.mk PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) @@ -61,5 +61,8 @@ endef $(eval $(call PyPackage,python-asn1crypto)) $(eval $(call BuildPackage,python-asn1crypto)) +$(eval $(call BuildPackage,python-asn1crypto-src)) + $(eval $(call Py3Package,python3-asn1crypto)) $(eval $(call BuildPackage,python3-asn1crypto)) +$(eval $(call BuildPackage,python3-asn1crypto-src)) diff --git a/openwrt/feeds/packages/lang/python/python-astral/Makefile b/openwrt/feeds/packages/lang/python/python-astral/Makefile new file mode 100644 index 00000000..302eefc7 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-astral/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-astral +PKG_VERSION:=1.10.1 +PKG_RELEASE:=1 + +PYPI_NAME:=astral +PKG_HASH:=d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1 + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Josef Schlehofer + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-astral/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Calculations for the position of the sun and moon + URL:=https://github.com/sffjunkie/astral +endef + +define Package/python-astral +$(call Package/python-astral/Default) + DEPENDS+= \ + +PACKAGE_python-astral:python-light \ + +PACKAGE_python-astral:python-pytz + VARIANT:=python +endef + +define Package/python3-astral +$(call Package/python-astral/Default) + DEPENDS+= \ + +PACKAGE_python3-astral:python3-light \ + +PACKAGE_python3-astral:python3-pytz + VARIANT:=python3 +endef + +define Package/python-astral/description +Astral is a python module for calculating the times of various aspects of the sun and moon. +endef + +define Package/python3-astral/description +$(call Package/python-astral/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-astral)) +$(eval $(call BuildPackage,python-astral)) +$(eval $(call BuildPackage,python-astral-src)) + +$(eval $(call Py3Package,python3-astral)) +$(eval $(call BuildPackage,python3-astral)) +$(eval $(call BuildPackage,python3-astral-src)) diff --git a/openwrt/feeds/packages/lang/python/python-async-timeout/Makefile b/openwrt/feeds/packages/lang/python/python-async-timeout/Makefile new file mode 100644 index 00000000..50a761c6 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-async-timeout/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=async-timeout +PKG_VERSION:=3.0.1 +PKG_RELEASE:=1 + +PYPI_NAME:=async_timeout +PYPI_SOURCE_NAME:=async-timeout +PKG_HASH:=0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-async-timeout + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Timeout context manager for asyncio programs + URL:=https://github.com/aio-libs/async-timeout + DEPENDS:= \ + +python3-light \ + +python3-asyncio + VARIANT:=python3 +endef + +define Package/python3-async-timeout/description +Timeout context manager for asyncio programs +endef + +$(eval $(call Py3Package,python3-async-timeout)) +$(eval $(call BuildPackage,python3-async-timeout)) +$(eval $(call BuildPackage,python3-async-timeout-src)) diff --git a/openwrt/feeds/packages/lang/python/python-atomicwrites/Makefile b/openwrt/feeds/packages/lang/python/python-atomicwrites/Makefile new file mode 100644 index 00000000..315f2c33 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-atomicwrites/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-atomicwrites +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PYPI_NAME:=atomicwrites +PKG_HASH:=75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-atomicwrites + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Atomic file writes + URL:=https://github.com/untitaker/python-atomicwrites + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-atomicwrites/description + Python library for atomic file writes. +endef + +$(eval $(call Py3Package,python3-atomicwrites)) +$(eval $(call BuildPackage,python3-atomicwrites)) +$(eval $(call BuildPackage,python3-atomicwrites-src)) diff --git a/openwrt/feeds/packages/lang/python/python-attrs/Makefile b/openwrt/feeds/packages/lang/python/python-attrs/Makefile index 87201581..5936704c 100644 --- a/openwrt/feeds/packages/lang/python/python-attrs/Makefile +++ b/openwrt/feeds/packages/lang/python/python-attrs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2016 OpenWrt.org +# Copyright (C) 2016-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,30 +7,40 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=attrs -PKG_VERSION:=16.2.0 +PKG_NAME:=python-attrs +PKG_VERSION:=19.3.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/6b/71/1682316894ed80b362b9102e7a10997136d8dc1213c36a9f0515c451373a -PKG_MD5SUM:=442b73d049af046ced010671b7bfd0e9 - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=attrs +PKG_HASH:=f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +define Package/python-attrs/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Classes Without Boilerplate + URL:=https://www.attrs.org/ +endef define Package/python-attrs - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-attrs - URL:=https://attrs.readthedocs.org/ - DEPENDS:=+python-light +$(call Package/python-attrs/Default) + DEPENDS:=+PACKAGE_python-attrs:python-light + VARIANT:=python +endef + +define Package/python3-attrs +$(call Package/python-attrs/Default) + DEPENDS:=+PACKAGE_python3-attrs:python3-light + VARIANT:=python3 endef define Package/python-attrs/description @@ -39,9 +49,16 @@ the chores of implementing the most common attribute-related object protocols. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") +define Package/python3-attrs/description +$(call Package/python-attrs/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-attrs)) $(eval $(call BuildPackage,python-attrs)) +$(eval $(call BuildPackage,python-attrs-src)) + +$(eval $(call Py3Package,python3-attrs)) +$(eval $(call BuildPackage,python3-attrs)) +$(eval $(call BuildPackage,python3-attrs-src)) diff --git a/openwrt/feeds/packages/lang/python/python-automat/Makefile b/openwrt/feeds/packages/lang/python/python-automat/Makefile new file mode 100644 index 00000000..d9265da4 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-automat/Makefile @@ -0,0 +1,85 @@ +# +# Copyright (C) 2018 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-automat +PKG_VERSION:=0.8.0 +PKG_RELEASE:=1 + +PYPI_NAME:=Automat +PKG_HASH:=269a09dfb063a3b078983f4976d83f0a0d3e6e7aaf8e27d8df1095e09dc4a484 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_VARS:= \ + PKG_VERSION="$(PKG_VERSION)" +PYTHON3_PKG_SETUP_VARS:= \ + PKG_VERSION="$(PKG_VERSION)" + +define Package/python-automat/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Concise, idiomatic finite-state automata + URL:=https://github.com/glyph/Automat +endef + +define Package/python-automat +$(call Package/python-automat/Default) + DEPENDS:= \ + +PACKAGE_python-automat:python-light \ + +PACKAGE_python-automat:python-attrs \ + +PACKAGE_python-automat:python-six + VARIANT:=python +endef + +define Package/python3-automat +$(call Package/python-automat/Default) + DEPENDS:= \ + +PACKAGE_python3-automat:python3-light \ + +PACKAGE_python3-automat:python3-attrs \ + +PACKAGE_python3-automat:python3-six + VARIANT:=python3 +endef + +define Package/python-automat/description +Automat is a library for concise, idiomatic Python expression of +finite-state automata (particularly deterministic finite-state +transducers). +endef + +define Package/python3-automat/description +$(call Package/python-automat/description) +. +(Variant for Python3) +endef + +define PyPackage/python-automat/filespec ++|$(PYTHON_PKG_DIR) +-|$(PYTHON_PKG_DIR)/automat/_visualize.py +endef + +define Py3Package/python3-automat/filespec ++|$(PYTHON3_PKG_DIR) +-|$(PYTHON3_PKG_DIR)/automat/_visualize.py +endef + +$(eval $(call PyPackage,python-automat)) +$(eval $(call BuildPackage,python-automat)) +$(eval $(call BuildPackage,python-automat-src)) + +$(eval $(call Py3Package,python3-automat)) +$(eval $(call BuildPackage,python3-automat)) +$(eval $(call BuildPackage,python3-automat-src)) diff --git a/openwrt/feeds/packages/lang/python/python-automat/patches/001-do-not-use-setuptools-scm-m2r.patch b/openwrt/feeds/packages/lang/python/python-automat/patches/001-do-not-use-setuptools-scm-m2r.patch new file mode 100644 index 00000000..babcda4b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-automat/patches/001-do-not-use-setuptools-scm-m2r.patch @@ -0,0 +1,30 @@ +--- a/setup.py ++++ b/setup.py +@@ -2,6 +2,7 @@ + Setup file for automat + """ + ++import os + from setuptools import setup, find_packages + + try: +@@ -14,7 +15,7 @@ except(IOError, ImportError): + + setup( + name='Automat', +- use_scm_version=True, ++ version=os.getenv('PKG_VERSION'), + url='https://github.com/glyph/Automat', + description=""" + Self-service finite-state machines for the programmer on the go. +@@ -22,10 +23,6 @@ setup( + long_description=long_description, + packages=find_packages(exclude=[]), + package_dir={'automat': 'automat'}, +- setup_requires=[ +- 'setuptools-scm', +- 'm2r', +- ], + install_requires=[ + "attrs>=16.1.0", + "six", diff --git a/openwrt/feeds/packages/lang/python/python-automat/patches/002-omit-visualize.patch b/openwrt/feeds/packages/lang/python/python-automat/patches/002-omit-visualize.patch new file mode 100644 index 00000000..0d68d891 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-automat/patches/002-omit-visualize.patch @@ -0,0 +1,18 @@ +--- a/setup.py ++++ b/setup.py +@@ -27,15 +27,6 @@ setup( + "attrs>=16.1.0", + "six", + ], +- extras_require={ +- "visualize": ["graphviz>0.5.1", +- "Twisted>=16.1.1"], +- }, +- entry_points={ +- "console_scripts": [ +- "automat-visualize = automat._visualize:tool" +- ], +- }, + author='Glyph', + author_email='glyph@twistedmatrix.com', + include_package_data=True, diff --git a/openwrt/feeds/packages/lang/python/python-automat/patches/003-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-automat/patches/003-omit-tests.patch new file mode 100644 index 00000000..774b683d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-automat/patches/003-omit-tests.patch @@ -0,0 +1,19 @@ +--- a/setup.py ++++ b/setup.py +@@ -21,7 +21,7 @@ setup( + Self-service finite-state machines for the programmer on the go. + """.strip(), + long_description=long_description, +- packages=find_packages(exclude=[]), ++ packages=find_packages(exclude=["*._test", "*._test.*"]), + package_dir={'automat': 'automat'}, + install_requires=[ + "attrs>=16.1.0", +@@ -30,6 +30,7 @@ setup( + author='Glyph', + author_email='glyph@twistedmatrix.com', + include_package_data=True, ++ exclude_package_data={'':['_test/*']}, + license="MIT", + keywords='fsm finite state machine automata', + classifiers=[ diff --git a/openwrt/feeds/packages/lang/python/python-awscli/Makefile b/openwrt/feeds/packages/lang/python/python-awscli/Makefile new file mode 100644 index 00000000..164ed090 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-awscli/Makefile @@ -0,0 +1,68 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=awscli +PKG_VERSION:=1.16.75 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=8d96ec0de325ea8271cc6aa95b7392bbf548ec4aabd3ffbcdc0619b64edd4a45 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-awscli/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=awscli + URL:=https://github.com/aws/aws-cli +endef + +define Package/python-awscli +$(call Package/python-awscli/Default) + DEPENDS:=+PACKAGE_python-awscli:python \ + +PACKAGE_python-awscli:python-yaml \ + +PACKAGE_python-awscli:python-pyasn1 \ + +PACKAGE_python-awscli:python-botocore \ + +PACKAGE_python-awscli:python-rsa \ + +PACKAGE_python-awscli:python-colorama \ + +PACKAGE_python-awscli:python-docutils \ + +PACKAGE_python-awscli:python-s3transfer + VARIANT:=python +endef + +define Package/python3-awscli +$(call Package/python-awscli/Default) + DEPENDS:=+PACKAGE_python3-awscli:python3 \ + +PACKAGE_python3-awscli:python3-yaml \ + +PACKAGE_python3-awscli:python3-pyasn1 \ + +PACKAGE_python3-awscli:python3-botocore \ + +PACKAGE_python3-awscli:python3-rsa \ + +PACKAGE_python3-awscli:python3-colorama \ + +PACKAGE_python3-awscli:python3-docutils \ + +PACKAGE_python3-awscli:python3-s3transfer + VARIANT:=python3 +endef + +define Package/python-awscli/description +This package provides a unified command line interface to Amazon Web Services. +endef + +define Package/python3-awscli/description +$(call Package/python-awscli/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-awscli)) +$(eval $(call BuildPackage,python-awscli)) +$(eval $(call BuildPackage,python-awscli-src)) + +$(eval $(call Py3Package,python3-awscli)) +$(eval $(call BuildPackage,python3-awscli)) +$(eval $(call BuildPackage,python3-awscli-src)) diff --git a/openwrt/feeds/packages/lang/python/python-boto3/Makefile b/openwrt/feeds/packages/lang/python/python-boto3/Makefile new file mode 100644 index 00000000..4f43b4e1 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-boto3/Makefile @@ -0,0 +1,38 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=boto3 +PKG_VERSION:=1.9.135 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=5e5805992e873e5687b5ef3b4c56c386ccb4df1c3364f8b8601d289e2f275be1 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-boto3 + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=AWS SDK for Python (Boto3) + URL:=https://aws.amazon.com/sdk-for-python/ + DEPENDS:=+python3 \ + +python3-jmespath \ + +python3-botocore \ + +python3-s3transfer + VARIANT:=python3 +endef + +define Package/python3-boto3/description +Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, +which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. +endef + +$(eval $(call Py3Package,python3-boto3)) +$(eval $(call BuildPackage,python3-boto3)) +$(eval $(call BuildPackage,python3-boto3-src)) diff --git a/openwrt/feeds/packages/lang/python/python-botocore/Makefile b/openwrt/feeds/packages/lang/python/python-botocore/Makefile new file mode 100644 index 00000000..d230176b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-botocore/Makefile @@ -0,0 +1,65 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=botocore +PKG_VERSION:=1.12.66 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=25c39ecc71356287cf79d66981ec77deca374e28043b19b2f818d48aa34272a1 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-botocore/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=botocore + URL:=https://github.com/boto/botocore +endef + +define Package/python-botocore +$(call Package/python-botocore/Default) + DEPENDS:=+PACKAGE_python-botocore:python \ + +PACKAGE_python-botocore:python-urllib3 \ + +PACKAGE_python-botocore:python-docutils \ + +PACKAGE_python-botocore:python-dateutil \ + +PACKAGE_python-botocore:python-jmespath \ + +PACKAGE_python-botocore:python-requests + VARIANT:=python +endef + +define Package/python3-botocore +$(call Package/python-botocore/Default) + DEPENDS:=+PACKAGE_python3-botocore:python3 \ + +PACKAGE_python3-botocore:python3-urllib3 \ + +PACKAGE_python3-botocore:python3-docutils \ + +PACKAGE_python3-botocore:python3-dateutil \ + +PACKAGE_python3-botocore:python3-jmespath \ + +PACKAGE_python3-botocore:python3-requests + VARIANT:=python3 +endef + +define Package/python-botocore/description +A low-level interface to a growing number of Amazon Web Services. +The botocore package is the foundation for the AWS CLI as well as boto3. +endef + +define Package/python3-botocore/description +$(call Package/python-botocore/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-botocore)) +$(eval $(call BuildPackage,python-botocore)) +$(eval $(call BuildPackage,python-botocore-src)) + +$(eval $(call Py3Package,python3-botocore)) +$(eval $(call BuildPackage,python3-botocore)) +$(eval $(call BuildPackage,python3-botocore-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cachelib/Makefile b/openwrt/feeds/packages/lang/python/python-cachelib/Makefile new file mode 100644 index 00000000..52b6d93c --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cachelib/Makefile @@ -0,0 +1,39 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cachelib +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PYPI_NAME:=cachelib +PKG_HASH:=8b889b509d372095357b8705966e1282d40835c4126d7c2b07fd414514d8ae8d + +PKG_MAINTAINER:=Stepan Henek +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-cachelib + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=cachelib + URL:=https://github.com/pallets/cachelib + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-cachelib/description + A collection of cache libraries in the same API interface. + Extracted from werkzeug. +endef + +$(eval $(call Py3Package,python3-cachelib)) +$(eval $(call BuildPackage,python3-cachelib)) +$(eval $(call BuildPackage,python3-cachelib-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cachetools/Makefile b/openwrt/feeds/packages/lang/python/python-cachetools/Makefile new file mode 100644 index 00000000..6b7ae409 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cachetools/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cachetools +PKG_VERSION:=3.1.1 +PKG_RELEASE:=1 + +PYPI_NAME:=cachetools +PKG_HASH:=8ea2d3ce97850f31e4a08b0e2b5e6c34997d7216a9d2c98e0f3978630d4da69a + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-cachetools + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Extensible memoizing collections and decorators + URL:=https://github.com/tkem/cachetools + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-cachetools/description + This module provides various memoizing collections and decorators, including variants of the Python 3 Standard Library lru_cache function decorator. +endef + +$(eval $(call Py3Package,python3-cachetools)) +$(eval $(call BuildPackage,python3-cachetools)) +$(eval $(call BuildPackage,python3-cachetools-src)) diff --git a/openwrt/feeds/packages/lang/python/python-certifi/Makefile b/openwrt/feeds/packages/lang/python/python-certifi/Makefile new file mode 100644 index 00000000..2f4c9823 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-certifi/Makefile @@ -0,0 +1,61 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-certifi +PKG_VERSION:=2019.9.11 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=MPL-2.0 +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=certifi +PKG_HASH:=e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-certifi/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python package for Mozilla's CA Bundle + URL:=http://certifi.io/ +endef + +define Package/python-certifi + $(call Package/python-certifi/Default) + DEPENDS:=+PACKAGE_python-certifi:python-light + VARIANT:=python +endef + +define Package/python3-certifi + $(call Package/python-certifi/Default) + DEPENDS:=+PACKAGE_python3-certifi:python3-light + VARIANT:=python3 +endef + +define Package/python-certifi/description + Certifi is a carefully curated collection of Root Certificates for validating the + trustworthiness of SSL certificates while verifying the identity of TLS hosts. +endef + +define Package/python3-certifi/description +$(call Package/python-certifi/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-certifi)) +$(eval $(call BuildPackage,python-certifi)) +$(eval $(call BuildPackage,python-certifi-src)) + +$(eval $(call Py3Package,python3-certifi)) +$(eval $(call BuildPackage,python3-certifi)) +$(eval $(call BuildPackage,python3-certifi-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cffi/Makefile b/openwrt/feeds/packages/lang/python/python-cffi/Makefile index bbad0811..3ee79ef8 100644 --- a/openwrt/feeds/packages/lang/python/python-cffi/Makefile +++ b/openwrt/feeds/packages/lang/python/python-cffi/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,47 +8,43 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cffi -PKG_VERSION:=1.10.0 +PKG_VERSION:=1.13.2 PKG_RELEASE:=1 -PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/5b/b9/790f8eafcdab455bcd3bd908161f802c9ce5adbf702a83aa7712fcc345b7 -PKG_HASH:=b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION) +PYPI_NAME:=cffi +PKG_HASH:=599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean -HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-cffi/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://cffi.readthedocs.org/ + TITLE:=C Foreign Function Interface + URL:=https://cffi.readthedocs.org/ DEPENDS:=+libffi endef define Package/python-cffi $(call Package/python-cffi/Default) - TITLE:=python-cffi - DEPENDS+=+PACKAGE_python-cffi:python-light +PACKAGE_python-cffi:python-pycparser + DEPENDS+= \ + +PACKAGE_python-cffi:python-light \ + +PACKAGE_python-cffi:python-pycparser VARIANT:=python endef define Package/python3-cffi $(call Package/python-cffi/Default) - TITLE:=python3-cffi - DEPENDS+=+PACKAGE_python3-cffi:python3-light +PACKAGE_python3-cffi:python3-pycparser + DEPENDS+= \ + +PACKAGE_python3-cffi:python3-light \ + +PACKAGE_python3-cffi:python3-pycparser VARIANT:=python3 endef @@ -64,6 +60,8 @@ endef $(eval $(call PyPackage,python-cffi)) $(eval $(call BuildPackage,python-cffi)) +$(eval $(call BuildPackage,python-cffi-src)) $(eval $(call Py3Package,python3-cffi)) $(eval $(call BuildPackage,python3-cffi)) +$(eval $(call BuildPackage,python3-cffi-src)) diff --git a/openwrt/feeds/packages/lang/python/python-chardet/Makefile b/openwrt/feeds/packages/lang/python/python-chardet/Makefile new file mode 100644 index 00000000..8f2da9e4 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-chardet/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2007-2017 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-chardet +PKG_VERSION:=3.0.4 +PKG_RELEASE:=2 +PKG_LICENSE:=LGPL-2.1 + +PYPI_NAME:=chardet +PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-chardet/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Alexandru Ardelean + URL:=https://github.com/chardet/chardet +endef + +define Package/python-chardet +$(call Package/python-chardet/Default) + TITLE:=Universal encoding detector for Python 2 + DEPENDS:=+PACKAGE_python-chardet:python + VARIANT:=python +endef + +define Package/python3-chardet +$(call Package/python-chardet/Default) + TITLE:=Universal encoding detector for Python3 + DEPENDS:=+PACKAGE_python3-chardet:python3-light + VARIANT:=python3 +endef + +define Package/python-chardet/description + Universal encoding detector for Python 2 and 3 +endef + +define Package/python3-chardet/description +$(call Package/python-chardet/description) +. +(Variant for Python3) +endef + +define Py3Package/python3-chardet/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + for bin in $(1)/usr/bin/*; do \ + mv $$$$bin $$$${bin}3 ; \ + done +endef + +$(eval $(call PyPackage,python-chardet)) +$(eval $(call BuildPackage,python-chardet)) +$(eval $(call BuildPackage,python-chardet-src)) + +$(eval $(call Py3Package,python3-chardet)) +$(eval $(call BuildPackage,python3-chardet)) +$(eval $(call BuildPackage,python3-chardet-src)) diff --git a/openwrt/feeds/packages/lang/python/python-colorama/Makefile b/openwrt/feeds/packages/lang/python/python-colorama/Makefile new file mode 100644 index 00000000..61c862de --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-colorama/Makefile @@ -0,0 +1,55 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=colorama +PKG_VERSION:=0.4.1 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-colorama/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=colorama + URL:=https://github.com/tartley/colorama +endef + +define Package/python-colorama +$(call Package/python-colorama/Default) + DEPENDS:=+PACKAGE_python-colorama:python + VARIANT:=python +endef + +define Package/python3-colorama +$(call Package/python-colorama/Default) + DEPENDS:=+PACKAGE_python3-colorama:python3 + VARIANT:=python3 +endef + +define Package/python-colorama/description +Makes ANSI escape character sequences +(for producing colored terminal text and cursor positioning) work under MS Windows. +endef + +define Package/python3-colorama/description +$(call Package/python-colorama/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-colorama)) +$(eval $(call BuildPackage,python-colorama)) +$(eval $(call BuildPackage,python-colorama-src)) + +$(eval $(call Py3Package,python3-colorama)) +$(eval $(call BuildPackage,python3-colorama)) +$(eval $(call BuildPackage,python3-colorama-src)) diff --git a/openwrt/feeds/packages/lang/python/python-constantly/Makefile b/openwrt/feeds/packages/lang/python/python-constantly/Makefile new file mode 100644 index 00000000..e26705f4 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-constantly/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2018 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-constantly +PKG_VERSION:=15.1.0 +PKG_RELEASE:=1 + +PYPI_NAME:=constantly +PKG_HASH:=586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-constantly/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Symbolic constants in Python + URL:=https://github.com/twisted/constantly +endef + +define Package/python-constantly +$(call Package/python-constantly/Default) + DEPENDS:=+PACKAGE_python-constantly:python-light + VARIANT:=python +endef + +define Package/python3-constantly +$(call Package/python-constantly/Default) + DEPENDS:=+PACKAGE_python3-constantly:python3-light + VARIANT:=python3 +endef + +define Package/python-constantly/description +A library that provides symbolic constant support. It includes +collections and constants with text, numeric, and bit flag values. +Originally twisted.python.constants from the Twisted project. +endef + +define Package/python3-constantly/description +$(call Package/python-constantly/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-constantly)) +$(eval $(call BuildPackage,python-constantly)) +$(eval $(call BuildPackage,python-constantly-src)) + +$(eval $(call Py3Package,python3-constantly)) +$(eval $(call BuildPackage,python3-constantly)) +$(eval $(call BuildPackage,python3-constantly-src)) diff --git a/openwrt/feeds/packages/lang/python/python-contextlib2/Makefile b/openwrt/feeds/packages/lang/python/python-contextlib2/Makefile new file mode 100644 index 00000000..04c256ce --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-contextlib2/Makefile @@ -0,0 +1,35 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-contextlib2 +PKG_VERSION:=0.5.5 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PYPI_NAME:=contextlib2 +PKG_HASH:=509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-contextlib2 + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=http://contextlib2.readthedocs.org + TITLE:=python3-contextlib2 + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python-contextlib2/description + contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions. +endef + +$(eval $(call Py3Package,python3-contextlib2)) +$(eval $(call BuildPackage,python3-contextlib2)) +$(eval $(call BuildPackage,python3-contextlib2-src)) diff --git a/openwrt/feeds/packages/lang/python/python-crcmod/Makefile b/openwrt/feeds/packages/lang/python/python-crcmod/Makefile index 03b9d6af..818fa72e 100644 --- a/openwrt/feeds/packages/lang/python/python-crcmod/Makefile +++ b/openwrt/feeds/packages/lang/python/python-crcmod/Makefile @@ -13,15 +13,14 @@ PKG_RELEASE:=1 PKG_MAINTAINER:=Micke Prag PKG_LICENSE:=MIT -PKG_SOURCE:=crcmod-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/crcmod/ -PKG_MD5SUM:=2d5b92117d958dcead94f9e17f54cd32 +PYPI_NAME:=crcmod +PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e -PKG_BUILD_DIR:=$(BUILD_DIR)/crcmod-$(PKG_VERSION) PKG_BUILD_DEPENDS:=python +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-crcmod SUBMENU:=Python diff --git a/openwrt/feeds/packages/lang/python/python-crypto/Makefile b/openwrt/feeds/packages/lang/python/python-crypto/Makefile index e0a3b7bf..94eb78a4 100644 --- a/openwrt/feeds/packages/lang/python/python-crypto/Makefile +++ b/openwrt/feeds/packages/lang/python/python-crypto/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2015 OpenWrt.org +# Copyright (C) 2009-2015, 2017-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,28 +7,50 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=pycrypto +PKG_NAME:=python-crypto PKG_VERSION:=2.6.1 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/ -PKG_MD5SUM:=55a61a054aa66812daf5161a0d5d7eda +PYPI_NAME:=pycrypto +PKG_HASH:=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c PKG_LICENSE:=Public Domain PKG_LICENSE_FILES:=COPYRIGHT +PKG_CPE_ID:=cpe:/a:dlitz:pycrypto PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_ARGS:= +PYTHON_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +PYTHON3_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +define Package/python-crypto/Default + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python Cryptography Toolkit + URL:=https://www.dlitz.net/software/pycrypto/ + DEPENDS:=+libgmp +endef define Package/python-crypto - SECTION:=lang-python - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-crypto - URL:=http://www.pycrypto.org/ - DEPENDS:=+python +libgmp +$(call Package/python-crypto/Default) + DEPENDS+=+PACKAGE_python-crypto:python + VARIANT:=python +endef + +define Package/python3-crypto +$(call Package/python-crypto/Default) + DEPENDS+=+PACKAGE_python3-crypto:python3 + VARIANT:=python3 endef define Package/python-crypto/description @@ -36,19 +58,16 @@ A collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.). endef -define Build/Compile - $(call Build/Compile/PyMod,,\ - install --prefix=/usr --root=$(PKG_INSTALL_DIR),\ - CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \ - ) -endef - -define Package/python-crypto/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/ - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR)/ +define Package/python3-crypto/description +$(call Package/python-crypto/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-crypto)) $(eval $(call BuildPackage,python-crypto)) +$(eval $(call BuildPackage,python-crypto-src)) + +$(eval $(call Py3Package,python3-crypto)) +$(eval $(call BuildPackage,python3-crypto)) +$(eval $(call BuildPackage,python3-crypto-src)) diff --git a/openwrt/feeds/packages/lang/python/python-crypto/patches/002-fix-endianness-detect.patch b/openwrt/feeds/packages/lang/python/python-crypto/patches/002-fix-endianness-detect.patch index baed012b..38e5a5b6 100644 --- a/openwrt/feeds/packages/lang/python/python-crypto/patches/002-fix-endianness-detect.patch +++ b/openwrt/feeds/packages/lang/python/python-crypto/patches/002-fix-endianness-detect.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -100,6 +100,10 @@ +@@ -100,6 +100,10 @@ def PrintErr(*args, **kwd): w(kwd.get("end", "\n")) def endianness_macro(): diff --git a/openwrt/feeds/packages/lang/python/python-crypto/patches/003-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-crypto/patches/003-omit-tests.patch new file mode 100644 index 00000000..f72bcb07 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-crypto/patches/003-omit-tests.patch @@ -0,0 +1,19 @@ +--- a/setup.py ++++ b/setup.py +@@ -357,16 +357,6 @@ kw = {'name':"pycrypto", + "Crypto.Random", + "Crypto.Random.Fortuna", + "Crypto.Random.OSRNG", +- "Crypto.SelfTest", +- "Crypto.SelfTest.Cipher", +- "Crypto.SelfTest.Hash", +- "Crypto.SelfTest.Protocol", +- "Crypto.SelfTest.PublicKey", +- "Crypto.SelfTest.Random", +- "Crypto.SelfTest.Random.Fortuna", +- "Crypto.SelfTest.Random.OSRNG", +- "Crypto.SelfTest.Util", +- "Crypto.SelfTest.Signature", + "Crypto.Protocol", + "Crypto.PublicKey", + "Crypto.Signature"], diff --git a/openwrt/feeds/packages/lang/python/python-crypto/patches/100-CVE-2013-7459.patch b/openwrt/feeds/packages/lang/python/python-crypto/patches/100-CVE-2013-7459.patch new file mode 100644 index 00000000..db1f740b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-crypto/patches/100-CVE-2013-7459.patch @@ -0,0 +1,106 @@ +From 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 Mon Sep 17 00:00:00 2001 +From: Legrandin +Date: Sun, 22 Dec 2013 22:24:46 +0100 +Subject: [PATCH] Throw exception when IV is used with ECB or CTR + +The IV parameter is currently ignored when initializing +a cipher in ECB or CTR mode. + +For CTR mode, it is confusing: it takes some time to see +that a different parameter is needed (the counter). + +For ECB mode, it is outright dangerous. + +This patch forces an exception to be raised. +--- + lib/Crypto/SelfTest/Cipher/common.py | 31 +++++++++++++++++++++++-------- + src/block_template.c | 11 +++++++++++ + 2 files changed, 34 insertions(+), 8 deletions(-) + +diff --git a/lib/Crypto/SelfTest/Cipher/common.py b/lib/Crypto/SelfTest/Cipher/common.py +index 420b6ff..a5f8a88 100644 +--- a/lib/Crypto/SelfTest/Cipher/common.py ++++ b/lib/Crypto/SelfTest/Cipher/common.py +@@ -239,16 +239,30 @@ class RoundtripTest(unittest.TestCase): + return """%s .decrypt() output of .encrypt() should not be garbled""" % (self.module_name,) + + def runTest(self): +- for mode in (self.module.MODE_ECB, self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB, self.module.MODE_OPENPGP): ++ ++ ## ECB mode ++ mode = self.module.MODE_ECB ++ encryption_cipher = self.module.new(a2b_hex(self.key), mode) ++ ciphertext = encryption_cipher.encrypt(self.plaintext) ++ decryption_cipher = self.module.new(a2b_hex(self.key), mode) ++ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) ++ self.assertEqual(self.plaintext, decrypted_plaintext) ++ ++ ## OPENPGP mode ++ mode = self.module.MODE_OPENPGP ++ encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) ++ eiv_ciphertext = encryption_cipher.encrypt(self.plaintext) ++ eiv = eiv_ciphertext[:self.module.block_size+2] ++ ciphertext = eiv_ciphertext[self.module.block_size+2:] ++ decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) ++ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) ++ self.assertEqual(self.plaintext, decrypted_plaintext) ++ ++ ## All other non-AEAD modes (but CTR) ++ for mode in (self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB): + encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) + ciphertext = encryption_cipher.encrypt(self.plaintext) +- +- if mode != self.module.MODE_OPENPGP: +- decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) +- else: +- eiv = ciphertext[:self.module.block_size+2] +- ciphertext = ciphertext[self.module.block_size+2:] +- decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) ++ decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) + decrypted_plaintext = decryption_cipher.decrypt(ciphertext) + self.assertEqual(self.plaintext, decrypted_plaintext) + +diff --git a/src/block_template.c b/src/block_template.c +index f940e0e..d555ceb 100644 +--- a/src/block_template.c ++++ b/src/block_template.c +@@ -170,6 +170,17 @@ ALGnew(PyObject *self, PyObject *args, PyObject *kwdict) + "Key cannot be the null string"); + return NULL; + } ++ if (IVlen != 0 && mode == MODE_ECB) ++ { ++ PyErr_Format(PyExc_ValueError, "ECB mode does not use IV"); ++ return NULL; ++ } ++ if (IVlen != 0 && mode == MODE_CTR) ++ { ++ PyErr_Format(PyExc_ValueError, ++ "CTR mode needs counter parameter, not IV"); ++ return NULL; ++ } + if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR) + { + PyErr_Format(PyExc_ValueError, +From 58de28a5d32bc10e15766e5a59f41b07397cc6cb Mon Sep 17 00:00:00 2001 +From: Richard Mitchell +Date: Mon, 28 Apr 2014 16:58:27 +0100 +Subject: [PATCH] Fix speedtest run for ECB modes. + +--- + pct-speedtest.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/pct-speedtest.py b/pct-speedtest.py +index 4ce18be..c7b893a 100644 +--- a/pct-speedtest.py ++++ b/pct-speedtest.py +@@ -121,6 +121,8 @@ class Benchmark: + blocks = self.random_blocks(16384, 1000) + if mode is None: + cipher = module.new(key) ++ elif mode==module.MODE_ECB: ++ cipher = module.new(key, module.MODE_ECB) + else: + cipher = module.new(key, mode, iv) + diff --git a/openwrt/feeds/packages/lang/python/python-crypto/patches/101-CVE-2018-6594.patch b/openwrt/feeds/packages/lang/python/python-crypto/patches/101-CVE-2018-6594.patch new file mode 100644 index 00000000..8e8c5582 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-crypto/patches/101-CVE-2018-6594.patch @@ -0,0 +1,51 @@ +--- a/lib/Crypto/PublicKey/ElGamal.py ++++ b/lib/Crypto/PublicKey/ElGamal.py +@@ -153,33 +153,33 @@ def generate(bits, randfunc, progress_fu + if number.isPrime(obj.p, randfunc=randfunc): + break + # Generate generator g +- # See Algorithm 4.80 in Handbook of Applied Cryptography +- # Note that the order of the group is n=p-1=2q, where q is prime + if progress_func: + progress_func('g\n') + while 1: ++ # Choose a square residue; it will generate a cyclic group of order q. ++ obj.g = pow(number.getRandomRange(2, obj.p, randfunc), 2, obj.p) ++ + # We must avoid g=2 because of Bleichenbacher's attack described + # in "Generating ElGamal signatures without knowning the secret key", + # 1996 +- # +- obj.g = number.getRandomRange(3, obj.p, randfunc) +- safe = 1 +- if pow(obj.g, 2, obj.p)==1: +- safe=0 +- if safe and pow(obj.g, q, obj.p)==1: +- safe=0 ++ if obj.g in (1, 2): ++ continue ++ + # Discard g if it divides p-1 because of the attack described + # in Note 11.67 (iii) in HAC +- if safe and divmod(obj.p-1, obj.g)[1]==0: +- safe=0 ++ if (obj.p - 1) % obj.g == 0: ++ continue ++ + # g^{-1} must not divide p-1 because of Khadir's attack + # described in "Conditions of the generator for forging ElGamal + # signature", 2011 + ginv = number.inverse(obj.g, obj.p) +- if safe and divmod(obj.p-1, ginv)[1]==0: +- safe=0 +- if safe: +- break ++ if (obj.p - 1) % ginv == 0: ++ continue ++ ++ # Found ++ break ++ + # Generate private key x + if progress_func: + progress_func('x\n') diff --git a/openwrt/feeds/packages/lang/python/python-cryptodome/Makefile b/openwrt/feeds/packages/lang/python/python-cryptodome/Makefile new file mode 100644 index 00000000..f6d1e88a --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodome/Makefile @@ -0,0 +1,72 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cryptodome +PKG_VERSION:=3.9.0 +PKG_RELEASE:=1 + +PYPI_NAME:=pycryptodome +PKG_HASH:=dbeb08ad850056747aa7d5f33273b7ce0b9a77910604a1be7b7a6f2ef076213f + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE.rst +PKG_MAINTAINER:=Richard Yu +PKG_CPE_ID:=cpe:/a:pycryptodome:pycryptodome + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_ARGS:= +PYTHON_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +PYTHON3_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +define Package/python-cryptodome/Default + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=A self-contained cryptographic library for Python + URL:=https://www.pycryptodome.org/ + DEPENDS:=+libgmp +endef + +define Package/python-cryptodome +$(call Package/python-cryptodome/Default) + DEPENDS+=+PACKAGE_python-cryptodome:python + VARIANT:=python + CONFLICTS:=python-crypto +endef + +define Package/python3-cryptodome +$(call Package/python-cryptodome/Default) + DEPENDS+=+PACKAGE_python3-cryptodome:python3 + VARIANT:=python3 + CONFLICTS:=python3-crypto +endef + +define Package/python-cryptodome/description +PyCryptodome is a self-contained Python package of low-level +cryptographic primitives. +endef + +define Package/python3-cryptodome/description +$(call Package/python-cryptodome/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-cryptodome)) +$(eval $(call BuildPackage,python-cryptodome)) +$(eval $(call BuildPackage,python-cryptodome-src)) + +$(eval $(call Py3Package,python3-cryptodome)) +$(eval $(call BuildPackage,python3-cryptodome)) +$(eval $(call BuildPackage,python3-cryptodome-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch b/openwrt/feeds/packages/lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch new file mode 100644 index 00000000..ea860fae --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch @@ -0,0 +1,11 @@ +--- a/lib/Crypto/Math/_IntegerGMP.py ++++ b/lib/Crypto/Math/_IntegerGMP.py +@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG; + int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d); + """ + +-lib = load_lib("gmp", gmp_defs) ++lib = load_lib("libgmp.so.10", gmp_defs) + implementation = {"library": "gmp", "api": backend} + + if hasattr(lib, "__mpir_version"): diff --git a/openwrt/feeds/packages/lang/python/python-cryptodome/patches/002-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-cryptodome/patches/002-omit-tests.patch new file mode 100644 index 00000000..cbaf70f2 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodome/patches/002-omit-tests.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -293,6 +293,9 @@ package_data = { + ], + } + ++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')] ++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')} ++ + ext_modules = [ + # Hash functions + Extension("Crypto.Hash._MD2", diff --git a/openwrt/feeds/packages/lang/python/python-cryptodomex/Makefile b/openwrt/feeds/packages/lang/python/python-cryptodomex/Makefile new file mode 100644 index 00000000..10c68e7d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodomex/Makefile @@ -0,0 +1,69 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cryptodomex +PKG_VERSION:=3.9.0 +PKG_RELEASE:=1 + +PYPI_NAME:=pycryptodomex +PKG_HASH:=8b604f4fa1de456d6d19771b01c2823675a75a2c60e51a6b738f71fdfe865370 + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE.rst +PKG_MAINTAINER:=Richard Yu + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_ARGS:= +PYTHON_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +PYTHON3_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_VARS:= \ + CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" + +define Package/python-cryptodomex/Default + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=A self-contained cryptographic library for Python + URL:=https://www.pycryptodome.org/ + DEPENDS:=+libgmp +endef + +define Package/python-cryptodomex +$(call Package/python-cryptodomex/Default) + DEPENDS+=+PACKAGE_python-cryptodomex:python + VARIANT:=python +endef + +define Package/python3-cryptodomex +$(call Package/python-cryptodomex/Default) + DEPENDS+=+PACKAGE_python3-cryptodomex:python3 + VARIANT:=python3 +endef + +define Package/python-cryptodomex/description +PyCryptodome is a self-contained Python package of low-level +cryptographic primitives. +endef + +define Package/python3-cryptodomex/description +$(call Package/python-cryptodomex/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-cryptodomex)) +$(eval $(call BuildPackage,python-cryptodomex)) +$(eval $(call BuildPackage,python-cryptodomex-src)) + +$(eval $(call Py3Package,python3-cryptodomex)) +$(eval $(call BuildPackage,python3-cryptodomex)) +$(eval $(call BuildPackage,python3-cryptodomex-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch b/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch new file mode 100644 index 00000000..e562df0d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch @@ -0,0 +1,11 @@ +--- a/lib/Cryptodome/Math/_IntegerGMP.py ++++ b/lib/Cryptodome/Math/_IntegerGMP.py +@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG; + int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d); + """ + +-lib = load_lib("gmp", gmp_defs) ++lib = load_lib("libgmp.so.10", gmp_defs) + implementation = {"library": "gmp", "api": backend} + + if hasattr(lib, "__mpir_version"): diff --git a/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/002-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/002-omit-tests.patch new file mode 100644 index 00000000..cbaf70f2 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptodomex/patches/002-omit-tests.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -293,6 +293,9 @@ package_data = { + ], + } + ++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')] ++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')} ++ + ext_modules = [ + # Hash functions + Extension("Crypto.Hash._MD2", diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/Makefile b/openwrt/feeds/packages/lang/python/python-cryptography/Makefile index 47c7c1cf..d7981d37 100644 --- a/openwrt/feeds/packages/lang/python/python-cryptography/Makefile +++ b/openwrt/feeds/packages/lang/python/python-cryptography/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,55 +8,51 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptography -PKG_VERSION:=2.0.3 +PKG_VERSION:=2.8 PKG_RELEASE:=1 -PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/9c/1a/0fc8cffb04582f9ffca61b15b0681cf2e8588438e55f61403eb9880bd8e0 -PKG_HASH:=d04bb2425086c3fe86f7bc48915290b13e798497839fbb18ab7f6dffcf98cc3a +PYPI_NAME:=cryptography +PKG_HASH:=3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651 PKG_LICENSE:=Apache-2.0 BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptography-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=libffi/host -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3" +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3" -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk define Package/python-cryptography/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=Cryptographic recipes and primitives URL:=https://github.com/pyca/cryptography DEPENDS:=+libopenssl endef define Package/python-cryptography $(call Package/python-cryptography/Default) - TITLE:=python-cryptography DEPENDS+= \ +PACKAGE_python-cryptography:python \ +PACKAGE_python-cryptography:python-cffi \ +PACKAGE_python-cryptography:python-enum34 \ - +PACKAGE_python-cryptography:python-idna \ +PACKAGE_python-cryptography:python-ipaddress \ - +PACKAGE_python-cryptography:python-asn1crypto \ +PACKAGE_python-cryptography:python-six VARIANT:=python endef define Package/python3-cryptography $(call Package/python-cryptography/Default) - TITLE:=python3-cryptography DEPENDS+= \ +PACKAGE_python3-cryptography:python3 \ +PACKAGE_python3-cryptography:python3-cffi \ - +PACKAGE_python3-cryptography:python3-idna \ - +PACKAGE_python3-cryptography:python3-asn1crypto \ +PACKAGE_python3-cryptography:python3-six VARIANT:=python3 endef @@ -75,5 +71,8 @@ endef $(eval $(call PyPackage,python-cryptography)) $(eval $(call BuildPackage,python-cryptography)) +$(eval $(call BuildPackage,python-cryptography-src)) + $(eval $(call Py3Package,python3-cryptography)) $(eval $(call BuildPackage,python3-cryptography)) +$(eval $(call BuildPackage,python3-cryptography-src)) diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch b/openwrt/feeds/packages/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch index 07ae483c..ea257adb 100644 --- a/openwrt/feeds/packages/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch +++ b/openwrt/feeds/packages/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch @@ -1,8 +1,6 @@ -diff --git a/setup.py b/setup.py -index b5c05df..a777dd7 100644 --- a/setup.py +++ b/setup.py -@@ -266,6 +266,7 @@ class DummyPyTest(test): +@@ -243,6 +243,7 @@ class DummyPyTest(test): with open(os.path.join(base_dir, "README.rst")) as f: long_description = f.read() diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch b/openwrt/feeds/packages/lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch deleted file mode 100644 index 3b7aaf39..00000000 --- a/openwrt/feeds/packages/lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py -index 8bda4e0..aa81060 100644 ---- a/src/_cffi_src/openssl/ssl.py -+++ b/src/_cffi_src/openssl/ssl.py -@@ -595,9 +595,6 @@ static const long TLS_ST_OK = 0; - - #if defined(OPENSSL_NO_DTLS) || CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 - static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0; --const SSL_METHOD *(*DTLS_method)(void) = NULL; --const SSL_METHOD *(*DTLS_server_method)(void) = NULL; --const SSL_METHOD *(*DTLS_client_method)(void) = NULL; - #else - static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1; - #endif diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/patches/010-remove-npn.patch b/openwrt/feeds/packages/lang/python/python-cryptography/patches/010-remove-npn.patch new file mode 100644 index 00000000..00104b23 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptography/patches/010-remove-npn.patch @@ -0,0 +1,41 @@ +From eec1f066476eccf7135af0a4cfef9e1c883795b3 Mon Sep 17 00:00:00 2001 +From: Paul Kehrer +Date: Mon, 25 Feb 2019 10:55:16 +0800 +Subject: [PATCH] remove NPN bindings -- you should be using ALPN! + +pyOpenSSL consumed these, but we've marked it as deprecated and it +already handles the case where the bindings are not available. +--- + src/_cffi_src/openssl/ssl.py | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index da21f3ce90..0e8610f988 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -431,25 +431,9 @@ + + long SSL_session_reused(SSL *); + +-void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *, +- int (*)(SSL *, +- const unsigned char **, +- unsigned int *, +- void *), +- void *); +-void SSL_CTX_set_next_proto_select_cb(SSL_CTX *, +- int (*)(SSL *, +- unsigned char **, +- unsigned char *, +- const unsigned char *, +- unsigned int, +- void *), +- void *); + int SSL_select_next_proto(unsigned char **, unsigned char *, + const unsigned char *, unsigned int, + const unsigned char *, unsigned int); +-void SSL_get0_next_proto_negotiated(const SSL *, +- const unsigned char **, unsigned *); + + int sk_SSL_CIPHER_num(Cryptography_STACK_OF_SSL_CIPHER *); + const SSL_CIPHER *sk_SSL_CIPHER_value(Cryptography_STACK_OF_SSL_CIPHER *, int); diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/patches/020-disable-npn.patch b/openwrt/feeds/packages/lang/python/python-cryptography/patches/020-disable-npn.patch new file mode 100644 index 00000000..1e12922e --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptography/patches/020-disable-npn.patch @@ -0,0 +1,23 @@ +From d7293d64d503fcbde442d69a3e11c55bf6f1374a Mon Sep 17 00:00:00 2001 +From: Paul Kehrer +Date: Mon, 25 Feb 2019 11:05:46 +0800 +Subject: [PATCH] set Cryptography_HAS_NEXTPROTONEG to 0 for pyOpenSSL + +we can remove this symbol in like...5 years. +--- + src/_cffi_src/openssl/ssl.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index 0e8610f988..e3a7790ee1 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -623,7 +623,7 @@ + static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1; + static const long Cryptography_HAS_SSL_OP_NO_TICKET = 1; + static const long Cryptography_HAS_SSL_SET_SSL_CTX = 1; +-static const long Cryptography_HAS_NEXTPROTONEG = 1; ++static const long Cryptography_HAS_NEXTPROTONEG = 0; + + /* SSL_get0_param was added in OpenSSL 1.0.2. */ + #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER diff --git a/openwrt/feeds/packages/lang/python/python-cryptography/patches/030-remove-npn.patch b/openwrt/feeds/packages/lang/python/python-cryptography/patches/030-remove-npn.patch new file mode 100644 index 00000000..69aeb436 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-cryptography/patches/030-remove-npn.patch @@ -0,0 +1,22 @@ +From b0b50b6bbbdf3abadc70b64c56e25b872721a7f3 Mon Sep 17 00:00:00 2001 +From: Paul Kehrer +Date: Mon, 25 Feb 2019 11:12:10 +0800 +Subject: [PATCH] remove another NPN related definition + +--- + src/_cffi_src/openssl/ssl.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index e3a7790ee1..f98f576838 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -139,8 +139,6 @@ + static const long TLS_ST_BEFORE; + static const long TLS_ST_OK; + +-static const long OPENSSL_NPN_NEGOTIATED; +- + typedef ... SSL_METHOD; + typedef ... SSL_CTX; + diff --git a/openwrt/feeds/packages/lang/python/python-curl/Makefile b/openwrt/feeds/packages/lang/python/python-curl/Makefile new file mode 100644 index 00000000..69068596 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-curl/Makefile @@ -0,0 +1,83 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pycurl +PKG_VERSION:=7.43.0.3 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=6f08330c5cf79fa8ef68b9912b9901db7ffd34b63e225dce74db56bb21deda8e + +PKG_MAINTAINER:=Waldemar Konik +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE_FILES:=COPYING-LGPL + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-curl/Default + CATEGORY:=Languages + SECTION:=lang + SUBMENU:=Python + TITLE:=Python module interface to the cURL library + URL:=http://pycurl.io/ + DEPENDS:=+libcurl +endef + +define Package/python-curl +$(call Package/python-curl/Default) + DEPENDS+=+PACKAGE_python-curl:python + VARIANT:=python +endef + +define Package/python-curl/description +PycURL is a Python interface to libcurl, the multiprotocol file transfer library. +endef + +define Package/python3-curl +$(call Package/python-curl/Default) + DEPENDS+=+PACKAGE_python3-curl:python3 + VARIANT:=python3 +endef + +define Package/python3-curl/description +$(call Package/python-curl/description) +. +(Variant for Python3) +endef + +PYTHON_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_ARGS:= + +ifdef CONFIG_LIBCURL_OPENSSL + PYTHON_PKG_SETUP_ARGS+=--with-openssl + PYTHON3_PKG_SETUP_ARGS+=--with-openssl +endif + +ifdef CONFIG_LIBCURL_GNUTLS + PYTHON_PKG_SETUP_ARGS+=--with-gnutls + PYTHON3_PKG_SETUP_ARGS+=--with-gnutls +endif + +ifdef CONFIG_LIBCURL_MBEDTLS + PYTHON_PKG_SETUP_ARGS+=--with-mbedtls + PYTHON3_PKG_SETUP_ARGS+=--with-mbedtls +endif + +ifdef CONFIG_LIBCURL_WOLFSSL + PYTHON_PKG_SETUP_ARGS+=--with-wolfssl + PYTHON3_PKG_SETUP_ARGS+=--with-wolfssl +endif + +$(eval $(call PyPackage,python-curl)) +$(eval $(call BuildPackage,python-curl)) +$(eval $(call BuildPackage,python-curl-src)) + +$(eval $(call Py3Package,python3-curl)) +$(eval $(call BuildPackage,python3-curl)) +$(eval $(call BuildPackage,python3-curl-src)) diff --git a/openwrt/feeds/packages/lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch b/openwrt/feeds/packages/lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch new file mode 100644 index 00000000..585139e2 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-curl/patches/0001-Add-locking-support-to-wolfSSL.patch @@ -0,0 +1,128 @@ +From 9b400b32eb3673ab525f12f41a2ff3e4e3bfcccb Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Fri, 28 Jun 2019 11:05:20 -0300 +Subject: [PATCH] Add locking support to wolfSSL + +This takes advantage of wolfSSL openssl compatibility layer, so all +that that's needed are library detection, and inclusion of specific +headers. +WolfSSL must be built with --enable-opensslextra to enable the required +API, and that's being checked at build time, with a warning if disabled. + +Signed-off-by: Eneas U de Queiroz + +diff --git a/setup.py b/setup.py +index 3be0fcb..d4303b0 100644 +--- a/setup.py ++++ b/setup.py +@@ -143,6 +143,7 @@ class ExtensionConfiguration(object): + return { + '--with-openssl': self.using_openssl, + '--with-ssl': self.using_openssl, ++ '--with-wolfssl': self.using_wolfssl, + '--with-gnutls': self.using_gnutls, + '--with-nss': self.using_nss, + '--with-mbedtls': self.using_mbedtls, +@@ -163,7 +164,7 @@ class ExtensionConfiguration(object): + + if 'PYCURL_SSL_LIBRARY' in os.environ: + ssl_lib = os.environ['PYCURL_SSL_LIBRARY'] +- if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']: ++ if ssl_lib in ['openssl', 'wolfssl', 'gnutls', 'nss', 'mbedtls']: + ssl_lib_detected = ssl_lib + getattr(self, 'using_%s' % ssl_lib)() + else: +@@ -188,6 +189,10 @@ class ExtensionConfiguration(object): + self.using_openssl() + ssl_lib_detected = 'openssl' + break ++ if arg[2:] == 'wolfssl': ++ self.using_wolfssl() ++ ssl_lib_detected = 'wolfssl' ++ break + if arg[2:] == 'gnutls': + self.using_gnutls() + ssl_lib_detected = 'gnutls' +@@ -506,6 +511,11 @@ manually. For other SSL backends please ignore this message.''') + self.libraries.append('ssl') + self.define_macros.append(('HAVE_CURL_SSL', 1)) + ++ def using_wolfssl(self): ++ self.define_macros.append(('HAVE_CURL_WOLFSSL', 1)) ++ self.libraries.append('wolfssl') ++ self.define_macros.append(('HAVE_CURL_SSL', 1)) ++ + def using_gnutls(self): + self.define_macros.append(('HAVE_CURL_GNUTLS', 1)) + self.libraries.append('gnutls') +@@ -572,6 +582,7 @@ def strip_pycurl_options(argv): + PRETTY_SSL_LIBS = { + # setup.py may be detecting BoringSSL properly, need to test + 'openssl': 'OpenSSL/LibreSSL/BoringSSL', ++ 'wolfssl': 'wolfSSL', + 'gnutls': 'GnuTLS', + 'nss': 'NSS', + 'mbedtls': 'mbedTLS', +@@ -902,6 +913,7 @@ PycURL Unix options: + --with-gnutls libcurl is linked against GnuTLS + --with-nss libcurl is linked against NSS + --with-mbedtls libcurl is linked against mbedTLS ++ --with-wolfssl libcurl is linked against wolfSSL + ''' + + windows_help = '''\ +diff --git a/src/module.c b/src/module.c +index 909cdfe..23387ec 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -351,6 +351,8 @@ initpycurl(void) + } else if (!strncmp(vi->ssl_version, "OpenSSL/", 8) || !strncmp(vi->ssl_version, "LibreSSL/", 9) || + !strncmp(vi->ssl_version, "BoringSSL", 9)) { + runtime_ssl_lib = "openssl"; ++ } else if (!strncmp(vi->ssl_version, "wolfSSL/", 8)) { ++ runtime_ssl_lib = "wolfssl"; + } else if (!strncmp(vi->ssl_version, "GnuTLS/", 7)) { + runtime_ssl_lib = "gnutls"; + } else if (!strncmp(vi->ssl_version, "NSS/", 4)) { +diff --git a/src/pycurl.h b/src/pycurl.h +index 2294cb8..092387f 100644 +--- a/src/pycurl.h ++++ b/src/pycurl.h +@@ -164,6 +164,28 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size); + # include + # include + # define COMPILE_SSL_LIB "openssl" ++# elif defined(HAVE_CURL_WOLFSSL) ++# include ++# if defined(OPENSSL_EXTRA) ++# define HAVE_CURL_OPENSSL ++# define PYCURL_NEED_SSL_TSL ++# define PYCURL_NEED_OPENSSL_TSL ++# include ++# include ++# else ++# ifdef _MSC_VER ++# pragma message(\ ++ "libcurl was compiled with wolfSSL, but the library was built without " \ ++ "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \ ++ "which may cause random crashes on SSL requests") ++# else ++# warning \ ++ "libcurl was compiled with wolfSSL, but the library was built without " \ ++ "--enable-opensslextra; thus no SSL crypto locking callbacks will be set, " \ ++ "which may cause random crashes on SSL requests" ++# endif ++# endif ++# define COMPILE_SSL_LIB "wolfssl" + # elif defined(HAVE_CURL_GNUTLS) + # include + # if GNUTLS_VERSION_NUMBER <= 0x020b00 +@@ -195,7 +217,7 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size); + /* since we have no crypto callbacks for other ssl backends, + * no reason to require users match those */ + # define COMPILE_SSL_LIB "none/other" +-# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */ ++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_WOLFSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */ + #else + # define COMPILE_SSL_LIB "none/other" + #endif /* HAVE_CURL_SSL */ diff --git a/openwrt/feeds/packages/lang/python/python-dateutil/Makefile b/openwrt/feeds/packages/lang/python/python-dateutil/Makefile index 2e859914..8b5601ea 100644 --- a/openwrt/feeds/packages/lang/python/python-dateutil/Makefile +++ b/openwrt/feeds/packages/lang/python/python-dateutil/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,41 +8,53 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dateutil -PKG_VERSION:=2.6.0 +PKG_VERSION:=2.8.1 PKG_RELEASE:=1 PKG_LICENSE:=BSD-2-Clause -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/51/fc/39a3fbde6864942e8bb24c93663734b74e281b984d1b8c4f95d64b0c21f6/ -PKG_MD5SUM:=6e38f91e8c94c15a79ce22768dfeca87 -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c +PKG_MAINTAINER:=Alexandru Ardelean +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -define Package/python-dateutil +include ../python-package.mk +include ../python3-package.mk + +define Package/python-dateutil/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss TITLE:=Extensions to the standard Python datetime module URL:=https://dateutil.readthedocs.org/ - DEPENDS:=+python +python-six +endef + +define Package/python-dateutil +$(call Package/python-dateutil/Default) + DEPENDS:=+PACKAGE_python-dateutil:python +PACKAGE_python-dateutil:python-six + VARIANT:=python endef define Package/python-dateutil/description Extensions to the standard Python datetime module endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-dateutil +$(call Package/python-dateutil/Default) + DEPENDS:=+PACKAGE_python3-dateutil:python3 +PACKAGE_python3-dateutil:python3-six + VARIANT:=python3 endef -define Package/python-dateutil/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-dateutil/description +$(call Package/python-dateutil/description) +. +(Variant for Python3) endef +$(eval $(call PyPackage,python-dateutil)) $(eval $(call BuildPackage,python-dateutil)) +$(eval $(call BuildPackage,python-dateutil-src)) +$(eval $(call Py3Package,python3-dateutil)) +$(eval $(call BuildPackage,python3-dateutil)) +$(eval $(call BuildPackage,python3-dateutil-src)) diff --git a/openwrt/feeds/packages/lang/python/python-decorator/Makefile b/openwrt/feeds/packages/lang/python/python-decorator/Makefile new file mode 100644 index 00000000..b8fdc456 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-decorator/Makefile @@ -0,0 +1,33 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-decorator +PKG_VERSION:=4.3.2 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí +PKG_CPE_ID:=cpe:/a:python:decorator + +PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=c053ec881270608a5aef624a45a7700ec76ceca9d96689506411e1f319085380 +PKG_BUILD_DIR:=$(BUILD_DIR)/decorator-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-decorator + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/micheles/decorator + TITLE:=python3-decodator + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +$(eval $(call Py3Package,python3-decorator)) +$(eval $(call BuildPackage,python3-decorator)) +$(eval $(call BuildPackage,python3-decorator-src)) diff --git a/openwrt/feeds/packages/lang/python/python-defusedxml/Makefile b/openwrt/feeds/packages/lang/python/python-defusedxml/Makefile new file mode 100644 index 00000000..2057e0fa --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-defusedxml/Makefile @@ -0,0 +1,66 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-defusedxml +PKG_VERSION:=0.6.0 +PKG_RELEASE:=2 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=Python-2.0 +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=defusedxml +PKG_HASH:=f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-defusedxml/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=XML bomb protection for Python + URL:=https://github.com/tiran/defusedxml +endef + +define Package/python-defusedxml + $(call Package/python-defusedxml/Default) + DEPENDS:= \ + +PACKAGE_python-defusedxml:python-light \ + +PACKAGE_python-defusedxml:python-codecs \ + +PACKAGE_python-defusedxml:python-xml + VARIANT:=python +endef + +define Package/python3-defusedxml + $(call Package/python-defusedxml/Default) + DEPENDS:= \ + +PACKAGE_python3-defusedxml:python3-light \ + +PACKAGE_python3-defusedxml:python3-xml + VARIANT:=python3 +endef + +define Package/python-defusedxml/description + The defusedxml package contains several Python-only workarounds and fixes for + denial of service and other vulnerabilities in Python’s XML libraries. +endef + +define Package/python3-defusedxml/description +$(call Package/python-defusedxml/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-defusedxml)) +$(eval $(call BuildPackage,python-defusedxml)) +$(eval $(call BuildPackage,python-defusedxml-src)) + +$(eval $(call Py3Package,python3-defusedxml)) +$(eval $(call BuildPackage,python3-defusedxml)) +$(eval $(call BuildPackage,python3-defusedxml-src)) diff --git a/openwrt/feeds/packages/lang/python/python-dns/Makefile b/openwrt/feeds/packages/lang/python/python-dns/Makefile index 682c9401..bb93b85e 100644 --- a/openwrt/feeds/packages/lang/python/python-dns/Makefile +++ b/openwrt/feeds/packages/lang/python/python-dns/Makefile @@ -8,37 +8,59 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dns -PKG_RELEASE:=2 -PKG_VERSION:=1.15.0 -PKG_SOURCE_URL:=http://www.dnspython.org/kits/$(PKG_VERSION) -PKG_MD5SUM:=63a679089822fb86127867c315286dc5 +PKG_VERSION:=1.16.0 +PKG_RELEASE:=1 + PKG_SOURCE:=dnspython-$(PKG_VERSION).tar.gz -PKG_MAINTAINER:=Denis Shulyaka +PKG_SOURCE_URL:=http://www.dnspython.org/kits/1.16.0/ +PKG_HASH:=4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9 + PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DIR:=$(BUILD_DIR)/dnspython-$(PKG_VERSION) +PKG_MAINTAINER:=Josef Schlehofer +PKG_CPE_ID:=cpe:/a:debian:python-dns + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-dns/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=dnspython + URL:=http://www.dnspython.org/ +endef define Package/python-dns - SECTION:=language-python - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=dnspython - URL:=http://www.dnspython.org/ - DEPENDS:=+python +$(call Package/python-dns/Default) + DEPENDS:=+PACKAGE_python-dns:python + VARIANT:=python endef define Package/python-dns/description dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0. endef -define Build/Compile - $(call Build/Compile/PyMod,,\ - install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \ - ) +define Package/python3-dns +$(call Package/python-dns/Default) + DEPENDS:=+PACKAGE_python3-dns:python3 + VARIANT:=python3 +endef + +define Package/python3-dns/description +$(call Package/python-dns/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-dns)) $(eval $(call BuildPackage,python-dns)) +$(eval $(call BuildPackage,python-dns-src)) +$(eval $(call Py3Package,python3-dns)) +$(eval $(call BuildPackage,python3-dns)) +$(eval $(call BuildPackage,python3-dns-src)) diff --git a/openwrt/feeds/packages/lang/python/python-docutils/Makefile b/openwrt/feeds/packages/lang/python/python-docutils/Makefile new file mode 100644 index 00000000..060ef552 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-docutils/Makefile @@ -0,0 +1,59 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=docutils +PKG_VERSION:=0.14 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-docutils/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=docutils + URL:=http://docutils.sourceforge.net +endef + +define Package/python-docutils +$(call Package/python-docutils/Default) + DEPENDS:=+PACKAGE_python-docutils:python + VARIANT:=python +endef + +define Package/python3-docutils +$(call Package/python-docutils/Default) + DEPENDS:=+PACKAGE_python3-docutils:python3 + VARIANT:=python3 +endef + +define Package/python-docutils/description +Docutils is a modular system for processing documentation into useful formats, +such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, +an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. +endef + +define Package/python3-docutils/description +$(call Package/python-docutils/description) +. +(Variant for Python3) +endef + +PYTHON_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_ARGS:= + +$(eval $(call PyPackage,python-docutils)) +$(eval $(call BuildPackage,python-docutils)) +$(eval $(call BuildPackage,python-docutils-src)) + +$(eval $(call Py3Package,python3-docutils)) +$(eval $(call BuildPackage,python3-docutils)) +$(eval $(call BuildPackage,python3-docutils-src)) diff --git a/openwrt/feeds/packages/lang/python/python-dpkt/Makefile b/openwrt/feeds/packages/lang/python/python-dpkt/Makefile new file mode 100644 index 00000000..1ca49080 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-dpkt/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2017 Andrew McConachie +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-dpkt +PKG_VERSION:=1.9.2 +PKG_RELEASE:=1 + +PYPI_NAME:=dpkt +PKG_HASH:=52a92ecd5ca04d5bd852bb11cb2eac4bbe38b42a7c472e0d950eeb9f82a81e54 + +PKG_MAINTAINER:=Andrew McConachie +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-dpkt + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python-dpkt + URL:=https://dpkt.readthedocs.io/en/latest/ + DEPENDS:=+python +endef + +define Package/python-dpkt/description + dpkt is a python module for fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols + https://pypi.python.org/pypi/dpkt + https://github.com/kbandla/dpkt +endef + +define Build/Compile + $(call Build/Compile/PyMod,,\ + install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \ + ) +endef + +$(eval $(call PyPackage,python-dpkt)) +$(eval $(call BuildPackage,python-dpkt)) diff --git a/openwrt/feeds/packages/lang/python/python-egenix-mx-base/Makefile b/openwrt/feeds/packages/lang/python/python-egenix-mx-base/Makefile index 7fd7c82e..dfb669b3 100644 --- a/openwrt/feeds/packages/lang/python/python-egenix-mx-base/Makefile +++ b/openwrt/feeds/packages/lang/python/python-egenix-mx-base/Makefile @@ -8,29 +8,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-egenix-mx-base -PKG_VERSION:=3.2.8 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dmitry Trefilov -PKG_LICENSE:=eGenix.com Public License 1.1.0 -PKG_LICENSE_FILES:=LICENSE COPYRIGHT +PKG_VERSION:=3.2.9 +PKG_RELEASE:=4 PKG_SOURCE:=egenix-mx-base-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.egenix.com/python/ -PKG_MD5SUM:=9d9d3a25f9dc051a15e97f452413423b - +PKG_SOURCE_URL:=https://downloads.egenix.com/python +PKG_HASH:=1c6b67688e7a231c6c1da09b7a6a2210745c3f2507bdda70e2639faedbf68977 PKG_BUILD_DIR:=$(BUILD_DIR)/egenix-mx-base-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=python + +PKG_MAINTAINER:=Dmitry Trefilov +PKG_LICENSE:=eGenix +PKG_LICENSE_FILES:=LICENSE COPYRIGHT include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-egenix-mx-base - SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - DEPENDS:=+USE_EGLIBC:librt +USE_UCLIBC:librt +python TITLE:=Egenix mxBase - URL:=http://www.egenix.com/products/python/mxBase/ + SUBMENU:=Python + URL:=https://www.egenix.com/products/python/mxBase/ + DEPENDS:=+python-light + VARIANT:=python endef define Package/python-egenix-mx-base/description @@ -40,16 +40,8 @@ define Package/python-egenix-mx-base/description date/time processing and high speed data types. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") -endef - -define PyPackage/python-egenix-mx-base/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef +PYTHON_PKG_SETUP_ARGS:= $(eval $(call PyPackage,python-egenix-mx-base)) $(eval $(call BuildPackage,python-egenix-mx-base)) +$(eval $(call BuildPackage,python-egenix-mx-base-src)) diff --git a/openwrt/feeds/packages/lang/python/python-enum34/Makefile b/openwrt/feeds/packages/lang/python/python-enum34/Makefile index 4191f2ac..03af234b 100644 --- a/openwrt/feeds/packages/lang/python/python-enum34/Makefile +++ b/openwrt/feeds/packages/lang/python/python-enum34/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,30 +7,34 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=enum34 +PKG_NAME:=python-enum34 PKG_VERSION:=1.1.6 -PKG_RELEASE:=2 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876 -PKG_MD5SUM:=5f13a0841a61f7fc295c514490d120d0 - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=enum34 +PKG_HASH:=8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=enum/LICENSE PKG_MAINTAINER:=Jeffery To +PKG_CPE_ID:=cpe:/a:python:enum34 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk + +define Package/python-enum34/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Backported Python 3.4 enum + URL:=https://bitbucket.org/stoneleaf/enum34 +endef define Package/python-enum34 - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-enum34 - URL:=https://pypi.python.org/pypi/enum34/ - DEPENDS:=+python-light +$(call Package/python-enum34/Default) + DEPENDS:=+PACKAGE_python-enum34:python-light + VARIANT:=python endef define Package/python-enum34/description @@ -43,9 +47,6 @@ define PyPackage/python-enum34/filespec -|$(PYTHON_PKG_DIR)/enum/test.py endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - $(eval $(call PyPackage,python-enum34)) $(eval $(call BuildPackage,python-enum34)) +$(eval $(call BuildPackage,python-enum34-src)) diff --git a/openwrt/feeds/packages/lang/python/python-et_xmlfile/Makefile b/openwrt/feeds/packages/lang/python/python-et_xmlfile/Makefile new file mode 100644 index 00000000..426337d6 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-et_xmlfile/Makefile @@ -0,0 +1,65 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-et_xmlfile +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz +PKG_LICENSE:=MIT + +PYPI_NAME:=et_xmlfile +PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-et_xmlfile/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Low memory library for creating large XML files. + URL:=https://bitbucket.org/openpyxl/et_xmlfile +endef + +define Package/python-et_xmlfile +$(call Package/python-et_xmlfile/Default) + DEPENDS:= \ + +PACKAGE_python-et_xmlfile:python-light \ + +PACKAGE_python-et_xmlfile:python-lxml + VARIANT:=python +endef + +define Package/python3-et_xmlfile +$(call Package/python-et_xmlfile/Default) + DEPENDS:= \ + +python3-light \ + +python3-lxml + VARIANT:=python3 +endef + +define Package/python-et_xmlfile/description + An implementation of lxml.xmlfile for the standard library. + It is based upon the xmlfile module from lxml with the aim of + allowing code to be developed that will work with both libraries. +endef + +define Package/python3-et_xmlfile/description +$(call Package/python-et_xmlfile/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-et_xmlfile)) +$(eval $(call BuildPackage,python-et_xmlfile)) +$(eval $(call BuildPackage,python-et_xmlfile-src)) + +$(eval $(call Py3Package,python3-et_xmlfile)) +$(eval $(call BuildPackage,python3-et_xmlfile)) +$(eval $(call BuildPackage,python3-et_xmlfile-src)) diff --git a/openwrt/feeds/packages/lang/python/python-evdev/Makefile b/openwrt/feeds/packages/lang/python/python-evdev/Makefile index bb2acb64..40dbb399 100644 --- a/openwrt/feeds/packages/lang/python/python-evdev/Makefile +++ b/openwrt/feeds/packages/lang/python/python-evdev/Makefile @@ -9,23 +9,19 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=python-evdev -PKG_VERSION:=0.7.0 +PKG_VERSION:=1.2.0 PKG_RELEASE:=1 PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Paulo Costa , Alexandru Ardelean -PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/67/15/eac376f3e1fc1960a54439c21459b2582e68340001aff83b4ace9e5bd110 -PKG_HASH:=57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION) +PYPI_NAME:=evdev +PKG_HASH:=b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-evdev/Default SUBMENU:=Python @@ -63,21 +59,19 @@ $(call Package/python-evdev/description) (Variant for Python3) endef -define PyBuild/Compile - $(call Build/Compile/PyMod,, build \ - build_ecodes --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \ - build_ext \ - install --root="$(PKG_INSTALL_DIR)" --prefix="/usr") -endef +LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" -define Py3Build/Compile - $(call Build/Compile/Py3Mod,, build \ - build_ecodes --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \ - build_ext \ - install --root="$(PKG_INSTALL_DIR)" --prefix="/usr") -endef +PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \ + build build_ecodes \ + --evdev-headers="$(LINUX_EVDEV_HEADERS)" \ + build_ext + +PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS) $(eval $(call PyPackage,python-evdev)) $(eval $(call BuildPackage,python-evdev)) +$(eval $(call BuildPackage,python-evdev-src)) + $(eval $(call Py3Package,python3-evdev)) $(eval $(call BuildPackage,python3-evdev)) +$(eval $(call BuildPackage,python3-evdev-src)) diff --git a/openwrt/feeds/packages/lang/python/python-futures/Makefile b/openwrt/feeds/packages/lang/python/python-futures/Makefile new file mode 100644 index 00000000..ba56053a --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-futures/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=futures +PKG_VERSION:=3.2.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-futures + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=futures + URL:=https://github.com/agronholm/pythonfutures + DEPENDS:=+python + VARIANT:=python +endef + +define Package/python-futures/description + This is a backport of the concurrent.futures standard library module to Python 2. + It should not be installed on Python 3, although there should be no harm in doing so, + as the standard library takes precedence over third party libraries. +endef + +$(eval $(call PyPackage,python-futures)) +$(eval $(call BuildPackage,python-futures)) +$(eval $(call BuildPackage,python-futures-src)) diff --git a/openwrt/feeds/packages/lang/python/python-gmpy2/Makefile b/openwrt/feeds/packages/lang/python/python-gmpy2/Makefile index 8337825e..81f602c7 100644 --- a/openwrt/feeds/packages/lang/python/python-gmpy2/Makefile +++ b/openwrt/feeds/packages/lang/python/python-gmpy2/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,28 +7,45 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=gmpy2 +PKG_NAME:=python-gmpy2 PKG_VERSION:=2.0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=https://pypi.python.org/packages/90/f4/9a2e384b325b69bc5827b9a6510a8fb4a51698c915c06a3f25a86458892a -PKG_MD5SUM:=56d40bddcf8f22be0a36d60f764f3241 +PYPI_NAME:=gmpy2 +PYPI_SOURCE_EXT:=zip +PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f -PKG_LICENSE:=LGPL-3.0+ +PKG_LICENSE:=LGPL-3.0-or-later PKG_LICENSE_FILES:=COPYING.LESSER PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_ARGS:=--nompfr +PYTHON3_PKG_SETUP_ARGS:=--nompfr + +define Package/python-gmpy2/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=GMP/MPIR, MPFR, and MPC interface + URL:=https://github.com/aleaxit/gmpy + DEPENDS:=+libgmp +endef define Package/python-gmpy2 - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-gmpy2 - URL:=http://code.google.com/p/gmpy/ - DEPENDS:=+libgmp +python-light +$(call Package/python-gmpy2/Default) + DEPENDS+=+PACKAGE_python-gmpy2:python-light + VARIANT:=python +endef + +define Package/python3-gmpy2 +$(call Package/python-gmpy2/Default) + DEPENDS+=+PACKAGE_python3-gmpy2:python3-light + VARIANT:=python3 endef define Package/python-gmpy2/description @@ -41,9 +58,16 @@ API and naming conventions to be more consistent and support the additional functionality. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr) +define Package/python3-gmpy2/description +$(call Package/python-gmpy2/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-gmpy2)) $(eval $(call BuildPackage,python-gmpy2)) +$(eval $(call BuildPackage,python-gmpy2-src)) + +$(eval $(call Py3Package,python3-gmpy2)) +$(eval $(call BuildPackage,python3-gmpy2)) +$(eval $(call BuildPackage,python3-gmpy2-src)) diff --git a/openwrt/feeds/packages/lang/python/python-gnupg/Makefile b/openwrt/feeds/packages/lang/python/python-gnupg/Makefile index d0138599..54a827e9 100644 --- a/openwrt/feeds/packages/lang/python/python-gnupg/Makefile +++ b/openwrt/feeds/packages/lang/python/python-gnupg/Makefile @@ -5,30 +5,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-gnupg -PKG_VERSION:=0.4.1 -PKG_RELEASE:=1 +PKG_VERSION:=0.4.4 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/f1/df6c06da34939f67ea622e0b31dbc5bdb5121b271ab530d151df59974425/ -PKG_MD5SUM:=b5d98344798b3cbb80cdcc1bfd788ea3 -PKG_HASH:=ef47b02eaf41dee3cf4b02ddf83130827318de9fe3eae89d01a3f05859e20e1a +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Daniel Golle +PKG_CPE_ID:=cpe:/a:python-gnupg_project:python-gnupg -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +include ../python-package.mk +include ../python3-package.mk define Package/python-gnupg/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=https://github.com/isislovecruft/python-gnupg + URL:=https://gnupg.readthedocs.io/en/latest/ DEPENDS:=+gnupg endef diff --git a/openwrt/feeds/packages/lang/python/python/files/python-host.mk b/openwrt/feeds/packages/lang/python/python-host.mk similarity index 98% rename from openwrt/feeds/packages/lang/python/python/files/python-host.mk rename to openwrt/feeds/packages/lang/python/python-host.mk index adcefcd6..44ecbbf8 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-host.mk +++ b/openwrt/feeds/packages/lang/python/python-host.mk @@ -92,4 +92,4 @@ define Build/Compile/HostPyMod $(3)) endef -endif # __python_host_mk_inc \ No newline at end of file +endif # __python_host_mk_inc diff --git a/openwrt/feeds/packages/lang/python/python-hyperlink/Makefile b/openwrt/feeds/packages/lang/python/python-hyperlink/Makefile new file mode 100644 index 00000000..869fc5a9 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-hyperlink/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2018 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-hyperlink +PKG_VERSION:=19.0.0 +PKG_RELEASE:=1 + +PYPI_NAME:=hyperlink +PKG_HASH:=4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-hyperlink/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Pure-Python immutable URLs + URL:=https://github.com/python-hyper/hyperlink +endef + +define Package/python-hyperlink +$(call Package/python-hyperlink/Default) + DEPENDS:= \ + +PACKAGE_python-hyperlink:python-light \ + +PACKAGE_python-hyperlink:python-idna + VARIANT:=python +endef + +define Package/python3-hyperlink +$(call Package/python-hyperlink/Default) + DEPENDS:= \ + +PACKAGE_python3-hyperlink:python3-light \ + +PACKAGE_python3-hyperlink:python3-idna + VARIANT:=python3 +endef + +define Package/python-hyperlink/description +Hyperlink provides a pure-Python implementation of immutable URLs. Based +on RFC 3986 and 3987, the Hyperlink URL makes working with both URIs and +IRIs easy. +endef + +define Package/python3-hyperlink/description +$(call Package/python-hyperlink/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-hyperlink)) +$(eval $(call BuildPackage,python-hyperlink)) +$(eval $(call BuildPackage,python-hyperlink-src)) + +$(eval $(call Py3Package,python3-hyperlink)) +$(eval $(call BuildPackage,python3-hyperlink)) +$(eval $(call BuildPackage,python3-hyperlink-src)) diff --git a/openwrt/feeds/packages/lang/python/python-hyperlink/patches/001-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-hyperlink/patches/001-omit-tests.patch new file mode 100644 index 00000000..cd0c8b80 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-hyperlink/patches/001-omit-tests.patch @@ -0,0 +1,13 @@ +--- a/setup.py ++++ b/setup.py +@@ -24,8 +24,9 @@ setup(name='hyperlink', + author=__author__, + author_email=__contact__, + url=__url__, +- packages=['hyperlink', 'hyperlink.test'], ++ packages=['hyperlink'], + include_package_data=True, ++ exclude_package_data={'':['test/*']}, + zip_safe=False, + license=__license__, + platforms='any', diff --git a/openwrt/feeds/packages/lang/python/python-idna/Makefile b/openwrt/feeds/packages/lang/python/python-idna/Makefile index e3413a25..d70ae390 100644 --- a/openwrt/feeds/packages/lang/python/python-idna/Makefile +++ b/openwrt/feeds/packages/lang/python/python-idna/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2019 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,43 +8,42 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-idna -PKG_VERSION:=2.5 -PKG_RELEASE:=1 +PKG_VERSION:=2.8 +PKG_RELEASE:=2 -PKG_SOURCE:=idna-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/d8/82/28a51052215014efc07feac7330ed758702fc0581347098a81699b5281cb -PKG_HASH:=3cb5ce08046c4e3a560fc02f138d0ac63e00f8ce5901a56b32ec8b7994082aab +PYPI_NAME:=idna +PKG_HASH:=c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.rst PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-idna-$(PKG_VERSION) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-idna/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=IDNA library URL:=https://github.com/kjd/idna endef define Package/python-idna $(call Package/python-idna/Default) - TITLE:=python-idna - DEPENDS:=+PACKAGE_python-idna:python-light + DEPENDS:= \ + +PACKAGE_python-idna:python-light \ + +PACKAGE_python-idna:python-codecs VARIANT:=python endef define Package/python3-idna $(call Package/python-idna/Default) - TITLE:=python3-idna - DEPENDS:=+PACKAGE_python3-idna:python3-light + DEPENDS:= \ + +PACKAGE_python3-idna:python3-light \ + +PACKAGE_python3-idna:python3-codecs VARIANT:=python3 endef @@ -56,12 +55,15 @@ from the earlier standard from 2003. endef define Package/python3-idna/description -$(call define Package/python-idna/description) +$(call Package/python-idna/description) . (Variant for Python3) endef $(eval $(call PyPackage,python-idna)) $(eval $(call BuildPackage,python-idna)) +$(eval $(call BuildPackage,python-idna-src)) + $(eval $(call Py3Package,python3-idna)) $(eval $(call BuildPackage,python3-idna)) +$(eval $(call BuildPackage,python3-idna-src)) diff --git a/openwrt/feeds/packages/lang/python/python-ifaddr/Makefile b/openwrt/feeds/packages/lang/python/python-ifaddr/Makefile new file mode 100644 index 00000000..9c65f691 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-ifaddr/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-ifaddr +PKG_VERSION:=0.1.6 +PKG_RELEASE:=1 + +PYPI_NAME:=ifaddr +PKG_HASH:=c19c64882a7ad51a394451dabcbbed72e98b5625ec1e79789924d5ea3e3ecb93 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-ifaddr + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Enumerate IP addresses on network adapters + URL:=https://github.com/pydron/ifaddr + DEPENDS:= \ + +python3-light \ + +python3-ctypes + VARIANT:=python3 +endef + +define Package/python3-ifaddr/description + ifaddr is a small Python library that allows you to find all the IPv4 and IPv6 addresses of the computer. +endef + +$(eval $(call Py3Package,python3-ifaddr)) +$(eval $(call BuildPackage,python3-ifaddr)) +$(eval $(call BuildPackage,python3-ifaddr-src)) diff --git a/openwrt/feeds/packages/lang/python/python-incremental/Makefile b/openwrt/feeds/packages/lang/python/python-incremental/Makefile new file mode 100644 index 00000000..65cc4f71 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-incremental/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2018 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-incremental +PKG_VERSION:=17.5.0 +PKG_RELEASE:=1 + +PYPI_NAME:=incremental +PKG_HASH:=7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-incremental/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Versions your Python projects + URL:=https://github.com/twisted/incremental +endef + +define Package/python-incremental +$(call Package/python-incremental/Default) + DEPENDS:=+PACKAGE_python-incremental:python-light + VARIANT:=python +endef + +define Package/python3-incremental +$(call Package/python-incremental/Default) + DEPENDS:=+PACKAGE_python3-incremental:python3-light + VARIANT:=python3 +endef + +define Package/python-incremental/description +Incremental is a small library that versions your Python projects. +endef + +define Package/python3-incremental/description +$(call Package/python-incremental/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-incremental)) +$(eval $(call BuildPackage,python-incremental)) +$(eval $(call BuildPackage,python-incremental-src)) + +$(eval $(call Py3Package,python3-incremental)) +$(eval $(call BuildPackage,python3-incremental)) +$(eval $(call BuildPackage,python3-incremental-src)) diff --git a/openwrt/feeds/packages/lang/python/python-incremental/patches/001-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-incremental/patches/001-omit-tests.patch new file mode 100644 index 00000000..b2c04969 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-incremental/patches/001-omit-tests.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ setup( + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + ], +- packages=find_packages("src", exclude=("exampleproj",)), ++ packages=find_packages("src", exclude=("exampleproj", "*.tests", "*.tests.*")), + package_dir={"": "src"}, + extras_require={ + "scripts": [ diff --git a/openwrt/feeds/packages/lang/python/python-influxdb/Makefile b/openwrt/feeds/packages/lang/python/python-influxdb/Makefile new file mode 100644 index 00000000..3f7d5f5a --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-influxdb/Makefile @@ -0,0 +1,36 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-influxdb +PKG_VERSION:=5.2.2 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PYPI_NAME:=influxdb +PKG_HASH:=afeff28953a91b4ea1aebf9b5b8258a4488d0e49e2471db15ea43fd2c8533143 +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-influxdb + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/influxdb/influxdb-python + TITLE:=python3-influxdb + DEPENDS:=+python3-requests +python3-pytz +python3-six +python3-dateutil + VARIANT:=python3 +endef + +define Package/python3-influxdb/description + Python client for InfluxDB +endef + +$(eval $(call Py3Package,python3-influxdb)) +$(eval $(call BuildPackage,python3-influxdb)) +$(eval $(call BuildPackage,python3-influxdb-src)) diff --git a/openwrt/feeds/packages/lang/python/python-intelhex/Makefile b/openwrt/feeds/packages/lang/python/python-intelhex/Makefile new file mode 100644 index 00000000..bccb044f --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-intelhex/Makefile @@ -0,0 +1,42 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-intelhex +PKG_VERSION:=2.2.1 +PKG_RELEASE:=1 + +PYPI_NAME:=IntelHex +PYPI_SOURCE_NAME:=intelhex +PKG_HASH:=009d8511e0d50639230c39af9607deee771cf026f67ef7507a8c3fd4fa927832 + +PKG_MAINTAINER:=Karel Kočí +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-intelhex + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python3-intelhex + URL:=https://github.com/bialix/intelhex + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-intelhex/description + This work implements an intelhex Python library to read, write, create from + scratch and manipulate data from Intel HEX file format. +endef + +PYTHON3_PKG_SETUP_ARGS:= + +$(eval $(call Py3Package,python3-intelhex)) +$(eval $(call BuildPackage,python3-intelhex)) +$(eval $(call BuildPackage,python3-intelhex-src)) diff --git a/openwrt/feeds/packages/lang/python/python-ipaddress/Makefile b/openwrt/feeds/packages/lang/python/python-ipaddress/Makefile index ccc1280a..664076be 100644 --- a/openwrt/feeds/packages/lang/python/python-ipaddress/Makefile +++ b/openwrt/feeds/packages/lang/python/python-ipaddress/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,38 +7,38 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=ipaddress -PKG_VERSION:=1.0.17 +PKG_NAME:=python-ipaddress +PKG_VERSION:=1.0.23 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/bb/26/3b64955ff73f9e3155079b9ed31812afdfa5333b5c76387454d651ef593a -PKG_MD5SUM:=8bbf0326719fafb1f453921ef96729fe - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=ipaddress +PKG_HASH:=b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2 PKG_LICENSE:=Python-2.0 PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk + +define Package/python-ipaddress/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python 3.3+'s ipaddress + URL:=https://github.com/phihag/ipaddress +endef define Package/python-ipaddress - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-ipaddress - URL:=https://github.com/phihag/ipaddress - DEPENDS:=+python-light +$(call Package/python-ipaddress/Default) + DEPENDS:=+PACKAGE_python-ipaddress:python-light + VARIANT:=python endef define Package/python-ipaddress/description Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - $(eval $(call PyPackage,python-ipaddress)) $(eval $(call BuildPackage,python-ipaddress)) +$(eval $(call BuildPackage,python-ipaddress-src)) diff --git a/openwrt/feeds/packages/lang/python/python-jdcal/Makefile b/openwrt/feeds/packages/lang/python/python-jdcal/Makefile new file mode 100644 index 00000000..b674c822 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-jdcal/Makefile @@ -0,0 +1,60 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-jdcal +PKG_VERSION:=1.4.1 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE.txt + +PYPI_NAME:=jdcal +PKG_HASH:=472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-jdcal/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Julian dates from proleptic Gregorian and Julian calendars + URL:=https://github.com/phn/jdcal +endef + +define Package/python-jdcal +$(call Package/python-jdcal/Default) + DEPENDS:= +PACKAGE_python-jdcal:python-light + VARIANT:=python +endef + +define Package/python3-jdcal +$(call Package/python-jdcal/Default) + DEPENDS:= +PACKAGE_python3-jdcal:python3-light + VARIANT:=python3 +endef + +define Package/python-jdcal/description + This module contains functions for converting between Julian dates and calendar dates. +endef + +define Package/python3-jdcal/description +$(call Package/python-jdcal/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-jdcal)) +$(eval $(call BuildPackage,python-jdcal)) +$(eval $(call BuildPackage,python-jdcal-src)) + +$(eval $(call Py3Package,python3-jdcal)) +$(eval $(call BuildPackage,python3-jdcal)) +$(eval $(call BuildPackage,python3-jdcal-src)) diff --git a/openwrt/feeds/packages/lang/python/python-jmespath/Makefile b/openwrt/feeds/packages/lang/python/python-jmespath/Makefile new file mode 100644 index 00000000..e4d1494f --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-jmespath/Makefile @@ -0,0 +1,55 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=jmespath +PKG_VERSION:=0.9.3 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-jmespath/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=jmespath + URL:=https://github.com/jmespath/jmespath.py +endef + +define Package/python-jmespath +$(call Package/python-jmespath/Default) + DEPENDS:=+PACKAGE_python-jmespath:python + VARIANT:=python +endef + +define Package/python3-jmespath +$(call Package/python-jmespath/Default) + DEPENDS:=+PACKAGE_python3-jmespath:python3 + VARIANT:=python3 +endef + +define Package/python-jmespath/description + JMESPath (pronounced “james path”) allows you to declaratively specify how to extract + elements from a JSON document. +endef + +define Package/python3-jmespath/description +$(call Package/python-jmespath/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-jmespath)) +$(eval $(call BuildPackage,python-jmespath)) +$(eval $(call BuildPackage,python-jmespath-src)) + +$(eval $(call Py3Package,python3-jmespath)) +$(eval $(call BuildPackage,python3-jmespath)) +$(eval $(call BuildPackage,python3-jmespath-src)) diff --git a/openwrt/feeds/packages/lang/python/python-jsonpath-ng/Makefile b/openwrt/feeds/packages/lang/python/python-jsonpath-ng/Makefile new file mode 100644 index 00000000..7059c27c --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-jsonpath-ng/Makefile @@ -0,0 +1,31 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-jsonpath-ng +PKG_VERSION:=1.4.3 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PYPI_NAME:=jsonpath-ng +PKG_HASH:=b1fc75b877e9b2f46845a455fbdcfb0f0d9c727c45c19a745d02db620a9ef0be + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-jsonpath-ng + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/h2non/jsonpath-ng + TITLE:=python3-jsonpath-ng + DEPENDS:=+python3-ply +python3-six +python3-decorator + VARIANT:=python3 +endef + +$(eval $(call Py3Package,python3-jsonpath-ng)) +$(eval $(call BuildPackage,python3-jsonpath-ng)) +$(eval $(call BuildPackage,python3-jsonpath-ng-src)) diff --git a/openwrt/feeds/packages/lang/python/python-ldap/Makefile b/openwrt/feeds/packages/lang/python/python-ldap/Makefile index dae53163..78080285 100644 --- a/openwrt/feeds/packages/lang/python/python-ldap/Makefile +++ b/openwrt/feeds/packages/lang/python/python-ldap/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-ldap -PKG_VERSION:=2.4.32 +PKG_VERSION:=3.1.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Dmitry Trefilov PKG_LICENSE:=Python-style PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/67/d9/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a -PKG_MD5SUM:=7c46c8a04acc227a778c7900c87cdfc7 - -PKG_BUILD_DEPENDS:=python libopenldap +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-ldap SUBMENU:=Python @@ -29,7 +27,7 @@ define Package/python-ldap CATEGORY:=Languages DEPENDS:=+libopenldap +python TITLE:=Python modules for implementing LDAP clients - URL:=http://python-ldap.org/ + URL:=https://python-ldap.org/ endef define Package/python-ldap/description diff --git a/openwrt/feeds/packages/lang/python/python-ldap/patches/010-setup_cfg.patch b/openwrt/feeds/packages/lang/python/python-ldap/patches/010-setup_cfg.patch deleted file mode 100644 index 372e9d23..00000000 --- a/openwrt/feeds/packages/lang/python/python-ldap/patches/010-setup_cfg.patch +++ /dev/null @@ -1,16 +0,0 @@ -From: Dmitrij Trefilov - -Subject: [PATCH] lang: removed hardcoded include and library directories from setup.cfg -Signed-off-by: Dmitrij Trefilov ---- ---- a/setup.cfg -+++ b/setup.cfg -@@ -1,6 +1,6 @@ - [_ldap] --library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 --include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl -+library_dirs = -+include_dirs = - defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R - extra_compile_args = - extra_objects = diff --git a/openwrt/feeds/packages/lang/python/python-lxml/Makefile b/openwrt/feeds/packages/lang/python/python-lxml/Makefile index 798cf279..97e96288 100644 --- a/openwrt/feeds/packages/lang/python/python-lxml/Makefile +++ b/openwrt/feeds/packages/lang/python/python-lxml/Makefile @@ -8,29 +8,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-lxml -PKG_VERSION:=3.7.2 +PKG_VERSION:=4.4.1 PKG_RELEASE:=1 -PKG_SOURCE:=lxml-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://lxml.de/files/ -PKG_HASH:=59d9176360dbc3919e9d4bfca85c1ca64ab4f4ee00e6f119d7150ba887e3410a - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PYPI_NAME:=lxml +PKG_HASH:=c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692 PKG_LICENSE:=BSD PKG_LICENSE_FILES:=LICENSES.txt PKG_MAINTAINER:=Alexandru Ardelean +PKG_CPE_ID:=cpe:/a:lxml:lxml +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +include ../python-package.mk +include ../python3-package.mk define Package/python-lxml/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://lxml.de + URL:=https://lxml.de DEPENDS:=+libxml2 +libxslt +libexslt endef @@ -89,6 +87,8 @@ endef $(eval $(call PyPackage,python-lxml)) $(eval $(call BuildPackage,python-lxml)) +$(eval $(call BuildPackage,python-lxml-src)) $(eval $(call Py3Package,python3-lxml)) $(eval $(call BuildPackage,python3-lxml)) +$(eval $(call BuildPackage,python3-lxml-src)) diff --git a/openwrt/feeds/packages/lang/python/python-markdown/Makefile b/openwrt/feeds/packages/lang/python/python-markdown/Makefile new file mode 100644 index 00000000..34ae3863 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-markdown/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-markdown +PKG_VERSION:=3.1.1 +PKG_RELEASE:=1 + +PYPI_NAME:=Markdown +PKG_HASH:=2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.md + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-markdown + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Markdown implementation in Python + URL:=https://python-markdown.github.io/ + DEPENDS:= \ + +python3-light \ + +python3-setuptools \ + +python3-logging + VARIANT:=python3 +endef + +define Package/python3-markdown/description + A fast and complete Python implementation of Markdown. +endef + +$(eval $(call Py3Package,python3-markdown)) +$(eval $(call BuildPackage,python3-markdown)) +$(eval $(call BuildPackage,python3-markdown-src)) diff --git a/openwrt/feeds/packages/lang/python/python-more-itertools/Makefile b/openwrt/feeds/packages/lang/python/python-more-itertools/Makefile new file mode 100644 index 00000000..5feb3df7 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-more-itertools/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-more-itertools +PKG_VERSION:=7.2.0 +PKG_RELEASE:=1 + +PYPI_NAME:=more-itertools +PKG_HASH:=409cd48d4db7052af495b09dec721011634af3753ae1ef92d2b32f73a745f832 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-more-itertools + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=More routines for operating on iterables, beyond itertools + URL:=https://github.com/erikrose/more-itertools + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-more-itertools/description + more-itertools library collects additional building blocks, + recipes, and routines for working with Python iterables. +endef + +$(eval $(call Py3Package,python3-more-itertools)) +$(eval $(call BuildPackage,python3-more-itertools)) +$(eval $(call BuildPackage,python3-more-itertools-src)) diff --git a/openwrt/feeds/packages/lang/python/python-multidict/Makefile b/openwrt/feeds/packages/lang/python/python-multidict/Makefile new file mode 100644 index 00000000..fee85601 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-multidict/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=multidict +PKG_VERSION:=4.5.2 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-multidict + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=multidict implementation + URL:=https://github.com/aio-libs/multidict + DEPENDS:= \ + +python3-light \ + +python3-attrs + VARIANT:=python3 +endef + +define Package/python3-multidict/description +Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container. +endef + +$(eval $(call Py3Package,python3-multidict)) +$(eval $(call BuildPackage,python3-multidict)) +$(eval $(call BuildPackage,python3-multidict-src)) diff --git a/openwrt/feeds/packages/lang/python/python-mysql/Makefile b/openwrt/feeds/packages/lang/python/python-mysql/Makefile deleted file mode 100644 index 04ebe5be..00000000 --- a/openwrt/feeds/packages/lang/python/python-mysql/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2007-2014 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:=MySQL-python -PKG_VERSION:=1.2.5 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/M/MySQL-python/ -PKG_MD5SUM:=654f75b302db6ed8dc5a898c625e030c - -PKG_BUILD_DEPENDS:=python python-setuptools libmysqlclient - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/python-mysql - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=MySQL database adapter for Python - URL:=https://pypi.python.org/pypi/MySQL-python - MAINTAINER:=Gergely Kiss - DEPENDS:=+python +libmysqlclient -endef - -define Package/python-mysql/description - MySQLdb is an thread-compatible interface to the popular MySQL database - server that provides the Python database API. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/python-mysql/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,python-mysql)) diff --git a/openwrt/feeds/packages/lang/python/python-mysql/patches/010-threadsafe.patch b/openwrt/feeds/packages/lang/python/python-mysql/patches/010-threadsafe.patch deleted file mode 100644 index bcd9af8d..00000000 --- a/openwrt/feeds/packages/lang/python/python-mysql/patches/010-threadsafe.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- MySQL-python-1.2.2/site_orig.cfg 2007-08-15 12:58:40.000000000 +0200 -+++ MySQL-python-1.2.2/site.cfg 2007-08-15 12:58:49.000000000 +0200 -@@ -4,7 +4,7 @@ - # static: link against a static library (probably required for embedded) - - embedded = False --threadsafe = True -+threadsafe = False - static = False - - # The path to mysql_config. diff --git a/openwrt/feeds/packages/lang/python/python-mysqlclient/Makefile b/openwrt/feeds/packages/lang/python/python-mysqlclient/Makefile new file mode 100644 index 00000000..4f06f0ee --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-mysqlclient/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2007-2018 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-mysqlclient +PKG_VERSION:=1.4.5 +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-2.0 + +PYPI_NAME:=mysqlclient +PKG_HASH:=e80109b0ae8d952b900b31b623181532e5e89376d707dcbeb63f99e69cefe559 +PKG_MAINTAINER:=Alexandru Ardelean + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk +# python-mysqlclient needs iconv +include $(INCLUDE_DIR)/nls.mk + +define Package/python-mysqlclient/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + URL:=https://mysqlclient.readthedocs.io/ +endef + +define Package/python-mysqlclient + $(call Package/python-mysqlclient/Default) + TITLE:=MySQL database adapter for Python + DEPENDS:=+PACKAGE_python-mysqlclient:python +libmysqlclient + VARIANT:=python +endef + +define Package/python3-mysqlclient + $(call Package/python-mysqlclient/Default) + TITLE:=MySQL database adapter for Python3 + DEPENDS:=+PACKAGE_python3-mysqlclient:python3 +libmysqlclient + VARIANT:=python3 +endef + +define Package/python-mysqlclient/description + MySQLdb is an thread-compatible interface to the popular MySQL database + server that provides the Python database API. +endef + +define Package/python3-mysqlclient/description +$(call Package/python-mysqlclient/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-mysqlclient)) +$(eval $(call BuildPackage,python-mysqlclient)) +$(eval $(call BuildPackage,python-mysqlclient-src)) + +$(eval $(call Py3Package,python3-mysqlclient)) +$(eval $(call BuildPackage,python3-mysqlclient)) +$(eval $(call BuildPackage,python3-mysqlclient-src)) diff --git a/openwrt/feeds/packages/lang/python/python-netdisco/Makefile b/openwrt/feeds/packages/lang/python/python-netdisco/Makefile new file mode 100644 index 00000000..9c5ae54d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-netdisco/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-netdisco +PKG_VERSION:=2.6.0 +PKG_RELEASE:=1 + +PYPI_NAME:=netdisco +PKG_HASH:=2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE.md + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-netdisco + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Discover devices on your local network + URL:=https://github.com/home-assistant/netdisco + DEPENDS:= \ + +python3-light \ + +python3-requests \ + +python3-zeroconf + VARIANT:=python3 +endef + +define Package/python3-netdisco/description + NetDisco is a Python 3 library to discover local devices and services. + It allows to scan on demand or offer a service that will scan the network in the background in a set interval. +endef + +$(eval $(call Py3Package,python3-netdisco)) +$(eval $(call BuildPackage,python3-netdisco)) +$(eval $(call BuildPackage,python3-netdisco-src)) diff --git a/openwrt/feeds/packages/lang/python/python-oauthlib/Makefile b/openwrt/feeds/packages/lang/python/python-oauthlib/Makefile new file mode 100644 index 00000000..ae157406 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-oauthlib/Makefile @@ -0,0 +1,61 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-oauthlib +PKG_VERSION:=3.1.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=oauthlib +PKG_HASH:=bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-oauthlib/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=OAuth request-signing logic for Python + URL:=https://github.com/oauthlib/oauthlib +endef + +define Package/python-oauthlib + $(call Package/python-oauthlib/Default) + DEPENDS:=+PACKAGE_python-oauthlib:python-light + VARIANT:=python +endef + +define Package/python3-oauthlib + $(call Package/python-oauthlib/Default) + DEPENDS:=+PACKAGE_python3-oauthlib:python3-light + VARIANT:=python3 +endef + +define Package/python-oauthlib/description + A generic, spec-compliant, thorough implementation of the OAuth request-signing + logic for Python +endef + +define Package/python3-oauthlib/description +$(call Package/python-oauthlib/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-oauthlib)) +$(eval $(call BuildPackage,python-oauthlib)) +$(eval $(call BuildPackage,python-oauthlib-src)) + +$(eval $(call Py3Package,python3-oauthlib)) +$(eval $(call BuildPackage,python3-oauthlib)) +$(eval $(call BuildPackage,python3-oauthlib-src)) diff --git a/openwrt/feeds/packages/lang/python/python/files/python-package-install.sh b/openwrt/feeds/packages/lang/python/python-package-install.sh similarity index 99% rename from openwrt/feeds/packages/lang/python/python/files/python-package-install.sh rename to openwrt/feeds/packages/lang/python/python-package-install.sh index 647a821e..337727af 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-package-install.sh +++ b/openwrt/feeds/packages/lang/python/python-package-install.sh @@ -92,4 +92,4 @@ find "$dst_dir" -type f -name "*.py" -delete delete_empty_dirs "$dst_dir" -exit 0 \ No newline at end of file +exit 0 diff --git a/openwrt/feeds/packages/lang/python/python/files/python-package.mk b/openwrt/feeds/packages/lang/python/python-package.mk similarity index 99% rename from openwrt/feeds/packages/lang/python/python/files/python-package.mk rename to openwrt/feeds/packages/lang/python/python-package.mk index 1d35de33..019f4f02 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-package.mk +++ b/openwrt/feeds/packages/lang/python/python-package.mk @@ -150,4 +150,4 @@ ifeq ($(BUILD_VARIANT),python) define Build/Compile $(call PyBuild/Compile) endef -endif # python \ No newline at end of file +endif # python diff --git a/openwrt/feeds/packages/lang/python/python-packages/Makefile b/openwrt/feeds/packages/lang/python/python-packages/Makefile index 7686e383..1cc565f0 100644 --- a/openwrt/feeds/packages/lang/python/python-packages/Makefile +++ b/openwrt/feeds/packages/lang/python/python-packages/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-packages PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Yousong Zhou @@ -32,7 +32,7 @@ PKG_CONFIG_DEPENDS:= \ PKG_BUILD_DEPENDS:=python python/host include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-packages SUBMENU:=Python @@ -66,6 +66,7 @@ CONFIG_PACKAGE_python-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python-packa CONFIG_PACKAGE_python-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-cleanup)) CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-envs)) CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps)) +CONFIG_PACKAGE_python-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-index-url)) CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts)) HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION) @@ -88,7 +89,7 @@ HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \ --prefix=$(2) \ --ignore-installed \ --no-compile \ - $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url $(CONFIG_PACKAGE_python-packages-index-url)) \ + $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url "$(CONFIG_PACKAGE_python-packages-index-url)") \ $(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \ HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"") diff --git a/openwrt/feeds/packages/lang/python/python-paho-mqtt/Makefile b/openwrt/feeds/packages/lang/python/python-paho-mqtt/Makefile new file mode 100644 index 00000000..51540292 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-paho-mqtt/Makefile @@ -0,0 +1,38 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-paho-mqtt +PKG_VERSION:=1.5.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean +PKG_LICENSE:=EPL-1.0 Eclipse Distribution License v1.0 +PKG_LICENSE_FILES:=epl-v10 edl-v10 + +PYPI_NAME:=paho-mqtt +PKG_HASH:=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-paho-mqtt + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python3-paho-mqtt + URL:=http://eclipse.org/paho + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-paho-mqtt/description + MQTT version 3.1/3.1.1 client class +endef + +$(eval $(call Py3Package,python3-paho-mqtt)) +$(eval $(call BuildPackage,python3-paho-mqtt)) +$(eval $(call BuildPackage,python3-paho-mqtt-src)) diff --git a/openwrt/feeds/packages/lang/python/python-parsley/Makefile b/openwrt/feeds/packages/lang/python/python-parsley/Makefile index 75df427c..39fed358 100644 --- a/openwrt/feeds/packages/lang/python/python-parsley/Makefile +++ b/openwrt/feeds/packages/lang/python/python-parsley/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015, 2017-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,37 +7,59 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=Parsley +PKG_NAME:=python-parsley PKG_VERSION:=1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley -PKG_MD5SUM:=92bc256e5f73810a609dc7874637ad31 +PYPI_NAME:=Parsley +PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +PYTHON_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python-parsley/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Parsing and pattern matching + URL:=http://launchpad.net/parsley +endef define Package/python-parsley - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-parsley - URL:=http://launchpad.net/parsley - DEPENDS:=+python-light +$(call Package/python-parsley/Default) + DEPENDS:=+PACKAGE_python-parsley:python-light + VARIANT:=python +endef + +define Package/python3-parsley +$(call Package/python-parsley/Default) + DEPENDS:=+PACKAGE_python3-parsley:python3-light + VARIANT:=python3 endef define Package/python-parsley/description Parsing and pattern matching made easy. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") +define Package/python3-parsley/description +$(call Package/python-parsley/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-parsley)) $(eval $(call BuildPackage,python-parsley)) +$(eval $(call BuildPackage,python-parsley-src)) + +$(eval $(call Py3Package,python3-parsley)) +$(eval $(call BuildPackage,python3-parsley)) +$(eval $(call BuildPackage,python3-parsley-src)) diff --git a/openwrt/feeds/packages/lang/python/python-parsley/patches/001-py3-read-utf8.patch b/openwrt/feeds/packages/lang/python/python-parsley/patches/001-py3-read-utf8.patch new file mode 100644 index 00000000..f3e63dcc --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-parsley/patches/001-py3-read-utf8.patch @@ -0,0 +1,19 @@ +--- a/setup.py ++++ b/setup.py +@@ -4,6 +4,7 @@ + Setup script for the Parsley distribution. + """ + ++import io + from distutils.core import setup + setup( + name="Parsley", +@@ -13,7 +14,7 @@ setup( + author="Allen Short", + author_email="washort42@gmail.com", + license="MIT License", +- long_description=open("README").read(), ++ long_description=io.open("README", encoding="utf-8").read(), + packages=["ometa", "terml", "ometa._generated", "terml._generated", + "ometa.test", "terml.test"], + py_modules=["parsley"] diff --git a/openwrt/feeds/packages/lang/python/python-parsley/patches/001-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-parsley/patches/002-omit-tests.patch similarity index 59% rename from openwrt/feeds/packages/lang/python/python-parsley/patches/001-omit-tests.patch rename to openwrt/feeds/packages/lang/python/python-parsley/patches/002-omit-tests.patch index 71bd0217..4fe43b87 100644 --- a/openwrt/feeds/packages/lang/python/python-parsley/patches/001-omit-tests.patch +++ b/openwrt/feeds/packages/lang/python/python-parsley/patches/002-omit-tests.patch @@ -1,10 +1,9 @@ -diff -Nur a/setup.py b/setup.py ---- a/setup.py 2015-09-09 10:45:25.000000000 +0800 -+++ b/setup.py 2015-12-01 17:31:03.143409843 +0800 -@@ -14,7 +14,6 @@ +--- a/setup.py ++++ b/setup.py +@@ -15,7 +15,6 @@ setup( author_email="washort42@gmail.com", license="MIT License", - long_description=open("README").read(), + long_description=io.open("README", encoding="utf-8").read(), - packages=["ometa", "terml", "ometa._generated", "terml._generated", - "ometa.test", "terml.test"], + packages=["ometa", "terml", "ometa._generated", "terml._generated"], diff --git a/openwrt/feeds/packages/lang/python/python-pcapy/Makefile b/openwrt/feeds/packages/lang/python/python-pcapy/Makefile index c89500df..5389146e 100644 --- a/openwrt/feeds/packages/lang/python/python-pcapy/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pcapy/Makefile @@ -8,21 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pcapy -PKG_VERSION:=0.11.1 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Andrew McConachie -PKG_LICENSE:=Apache-1.1 +PKG_VERSION:=0.11.4 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/CoreSecurity/pcapy.git -PKG_SOURCE_VERSION:=b91a418374d1636408c435f11799ef725ef70097 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PYPI_NAME:=pcapy +PKG_HASH:=aa239913678d7ba116e66057a37f914de7726aecd11d00db470127df115c4e78 -PKG_BUILD_DEPENDS:=python python-setuptools +PKG_MAINTAINER:=Andrew McConachie +PKG_LICENSE:=Apache-1.1 +include ../pypi.mk +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-pcapy SECTION:=language-python @@ -30,7 +28,7 @@ define Package/python-pcapy SUBMENU:=Python TITLE:=python-pcapy URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy - DEPENDS:=+python +libpcap +libstdcpp + DEPENDS:=+python +libpcap $(CXX_DEPENDS) endef define Package/python-pcapy/description diff --git a/openwrt/feeds/packages/lang/python/python-pcapy/patches/010-libcxx.patch b/openwrt/feeds/packages/lang/python/python-pcapy/patches/010-libcxx.patch new file mode 100644 index 00000000..d27dbdd0 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pcapy/patches/010-libcxx.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 4da69bc..165059b 100644 +--- a/setup.py ++++ b/setup.py +@@ -28,7 +28,7 @@ if sys.platform == 'win32': + library_dirs.append(r'c:\wpdpack\Lib') + libraries = ['wpcap', 'packet', 'ws2_32'] + else: +- libraries = ['pcap', 'stdc++'] ++ libraries = ['pcap'] + + + # end of user configurable parameters diff --git a/openwrt/feeds/packages/lang/python/python-pip-conf/Makefile b/openwrt/feeds/packages/lang/python/python-pip-conf/Makefile new file mode 100644 index 00000000..b8ef7f6c --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pip-conf/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2017 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-pip-conf +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/python-pip-conf + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Configuration file for pip/pip3 + URL:=https://pip.pypa.io + MAINTAINER:=Alexandru Ardelean +endef + +define Package/python-pip-conf/description + Configuration file for pip/pip3 +endef + +Build/Compile:= + +define Package/python-pip-conf/install + $(INSTALL_DIR) $(1)/etc + $(CP) ./files/pip.conf $(1)/etc +endef + +$(eval $(call BuildPackage,python-pip-conf)) diff --git a/openwrt/feeds/packages/lang/python/python/files/pip.conf b/openwrt/feeds/packages/lang/python/python-pip-conf/files/pip.conf similarity index 100% rename from openwrt/feeds/packages/lang/python/python/files/pip.conf rename to openwrt/feeds/packages/lang/python/python-pip-conf/files/pip.conf diff --git a/openwrt/feeds/packages/lang/python/python-ply/Makefile b/openwrt/feeds/packages/lang/python/python-ply/Makefile index 212fdb03..ea6457d7 100644 --- a/openwrt/feeds/packages/lang/python/python-ply/Makefile +++ b/openwrt/feeds/packages/lang/python/python-ply/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,42 +8,37 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-ply -PKG_VERSION:=3.10 +PKG_VERSION:=3.11 PKG_RELEASE:=1 -PKG_SOURCE:=ply-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.dabeaz.com/ply -PKG_HASH:=96e94af7dd7031d8d6dd6e2a8e0de593b511c211a86e28a9c9621c275ac8bacb - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ply-$(PKG_VERSION) +PYPI_NAME:=ply +PKG_HASH:=00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=README.md PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-ply/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=lex and yacc for Python URL:=http://www.dabeaz.com/ply/ endef define Package/python-ply $(call Package/python-ply/Default) - TITLE:=python-ply DEPENDS:=+PACKAGE_python-ply:python-light VARIANT:=python endef define Package/python3-ply $(call Package/python-ply/Default) - TITLE:=python3-ply DEPENDS:=+PACKAGE_python3-ply:python3-light VARIANT:=python3 endef @@ -61,6 +56,8 @@ endef $(eval $(call PyPackage,python-ply)) $(eval $(call BuildPackage,python-ply)) +$(eval $(call BuildPackage,python-ply-src)) $(eval $(call Py3Package,python3-ply)) $(eval $(call BuildPackage,python3-ply)) +$(eval $(call BuildPackage,python3-ply-src)) diff --git a/openwrt/feeds/packages/lang/python/python-psycopg2/Makefile b/openwrt/feeds/packages/lang/python/python-psycopg2/Makefile index 96817a4a..b67d29ef 100644 --- a/openwrt/feeds/packages/lang/python/python-psycopg2/Makefile +++ b/openwrt/feeds/packages/lang/python/python-psycopg2/Makefile @@ -8,28 +8,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-psycopg2 -PKG_VERSION:=2.6.2 -PKG_RELEASE:=1 +PKG_VERSION:=2.7.6.1 +PKG_RELEASE:=2 + +PYPI_NAME:=psycopg2 +PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82 + PKG_MAINTAINER:=Dmitry Trefilov -PKG_LICENSE:=LGPL-3.0+ +PKG_LICENSE:=LGPL-3.0-or-later PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://initd.org/psycopg/tarballs/PSYCOPG-2-6/ -PKG_MD5SUM:=4a392949ba31a378a18ed3e775a4693f - -PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=python libpq python/host +PKG_BUILD_DEPENDS:=python/host +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk define Package/python-psycopg2 SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=PostgreSQL database adapter for Python - URL:=http://www.initd.org/ + URL:=http://initd.org/psycopg/ DEPENDS:=+python +libpq +python-egenix-mx-base endef diff --git a/openwrt/feeds/packages/lang/python/python-py/Makefile b/openwrt/feeds/packages/lang/python/python-py/Makefile new file mode 100644 index 00000000..40b629ca --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-py/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-py +PKG_VERSION:=1.8.0 +PKG_RELEASE:=1 + +PYPI_NAME:=py +PKG_HASH:=dc639b046a6e2cff5bbe40194ad65936d6ba360b52b3c3fe1d08a82dd50b5e53 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + +define Package/python3-py + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=py + URL:=https://github.com/pytest-dev/py + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-py/description + Library with cross-python path, ini-parsing, io, code, log facilities +endef + +$(eval $(call Py3Package,python3-py)) +$(eval $(call BuildPackage,python3-py)) +$(eval $(call BuildPackage,python3-py-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyasn1-modules/Makefile b/openwrt/feeds/packages/lang/python/python-pyasn1-modules/Makefile index e51a7cfd..bf48d362 100644 --- a/openwrt/feeds/packages/lang/python/python-pyasn1-modules/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pyasn1-modules/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2017 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,48 +8,43 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyasn1-modules -PKG_VERSION:=0.0.11 +PKG_VERSION:=0.2.7 PKG_RELEASE:=1 -PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/de/5f/0c6a1a096bfc2831ee8e2e951f79e6ec23c853c17ab5ba655322bfcde20a -PKG_HASH:=60d5c80bfee9b79b492d5d8a934b3ecfc523f2f83aaab4ffafa2bbb651d3c67a +PYPI_NAME:=pyasn1-modules +PKG_HASH:=0c35a52e00b672f832e5846826f1fb7507907f7d52fba6faa9e3c4cbe874fe4b PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyasn1-modules-$(PKG_VERSION) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-pyasn1-modules/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://sourceforge.net/projects/pyasn1/ + TITLE:=Collection of ASN.1 modules + URL:=https://github.com/etingof/pyasn1-modules endef define Package/python-pyasn1-modules $(call Package/python-pyasn1-modules/Default) - TITLE:=python-pyasn1-modules - VARIANT:=python DEPENDS:= \ +PACKAGE_python-pyasn1-modules:python-light \ +PACKAGE_python-pyasn1-modules:python-pyasn1 + VARIANT:=python endef define Package/python3-pyasn1-modules $(call Package/python-pyasn1-modules/Default) - TITLE:=python3-pyasn1-modules - VARIANT:=python3 DEPENDS:= \ +PACKAGE_python3-pyasn1-modules:python3-light \ +PACKAGE_python3-pyasn1-modules:python3-pyasn1 + VARIANT:=python3 endef define Package/python-pyasn1-modules/description @@ -65,5 +60,8 @@ endef $(eval $(call PyPackage,python-pyasn1-modules)) $(eval $(call BuildPackage,python-pyasn1-modules)) +$(eval $(call BuildPackage,python-pyasn1-modules-src)) + $(eval $(call Py3Package,python3-pyasn1-modules)) $(eval $(call BuildPackage,python3-pyasn1-modules)) +$(eval $(call BuildPackage,python3-pyasn1-modules-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyasn1/Makefile b/openwrt/feeds/packages/lang/python/python-pyasn1/Makefile index 1e2705a4..3ba9073c 100644 --- a/openwrt/feeds/packages/lang/python/python-pyasn1/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pyasn1/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,42 +8,37 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyasn1 -PKG_VERSION:=0.3.2 +PKG_VERSION:=0.4.8 PKG_RELEASE:=1 -PKG_SOURCE:=pyasn1-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/17/a2/266818077dbd002d53ebe5aaaa05a04786256cea8dba1899ac0b832ef028 -PKG_HASH:=90bd82e0db59d4319eaf01c2549b34c817d645275fce9ad41bac7429aa380690 +PYPI_NAME:=pyasn1 +PKG_HASH:=aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyasn1-$(PKG_VERSION) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-pyasn1/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=http://pyasn1.sourceforge.net/ + TITLE:=ASN.1 library for Python + URL:=https://github.com/etingof/pyasn1 endef define Package/python-pyasn1 $(call Package/python-pyasn1/Default) - TITLE:=python-pyasn1 DEPENDS:=+PACKAGE_python-pyasn1:python-light VARIANT:=python endef define Package/python3-pyasn1 $(call Package/python-pyasn1/Default) - TITLE:=python3-pyasn1 DEPENDS:=+PACKAGE_python3-pyasn1:python3-light VARIANT:=python3 endef @@ -63,5 +58,8 @@ endef $(eval $(call PyPackage,python-pyasn1)) $(eval $(call BuildPackage,python-pyasn1)) +$(eval $(call BuildPackage,python-pyasn1-src)) + $(eval $(call Py3Package,python3-pyasn1)) $(eval $(call BuildPackage,python3-pyasn1)) +$(eval $(call BuildPackage,python3-pyasn1-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pycparser/Makefile b/openwrt/feeds/packages/lang/python/python-pycparser/Makefile index 15aea4b5..6098f90b 100644 --- a/openwrt/feeds/packages/lang/python/python-pycparser/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pycparser/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,43 +8,45 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pycparser -PKG_VERSION:=2.17 -PKG_RELEASE:=1 +PKG_VERSION:=2.19 +PKG_RELEASE:=2 -PKG_SOURCE:=pycparser-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/be/64/1bb257ffb17d01f4a38d7ce686809a736837ad4371bcc5c42ba7a715c3ac -PKG_HASH:=0aac31e917c24cb3357f5a4d5566f2cc91a19ca41862f6c3c22dc60a629673b6 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pycparser-$(PKG_VERSION) +PYPI_NAME:=pycparser +PKG_HASH:=a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="ply==3.10" +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10" -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk define Package/python-pycparser/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=C parser in Python URL:=https://github.com/eliben/pycparser endef define Package/python-pycparser $(call Package/python-pycparser/Default) - TITLE:=python-pycparser - DEPENDS:=+PACKAGE_python-pycparser:python-light +PACKAGE_python-pycparser:python-ply + DEPENDS:= \ + +PACKAGE_python-pycparser:python-light \ + +PACKAGE_python-pycparser:python-ply VARIANT:=python endef define Package/python3-pycparser $(call Package/python-pycparser/Default) - TITLE:=python3-pycparser - DEPENDS:=+PACKAGE_python3-pycparser:python3-light +PACKAGE_python3-pycparser:python3-ply + DEPENDS:= \ + +PACKAGE_python3-pycparser:python3-light \ + +PACKAGE_python3-pycparser:python3-ply VARIANT:=python3 endef @@ -62,6 +64,8 @@ endef $(eval $(call PyPackage,python-pycparser)) $(eval $(call BuildPackage,python-pycparser)) +$(eval $(call BuildPackage,python-pycparser-src)) $(eval $(call Py3Package,python3-pycparser)) $(eval $(call BuildPackage,python3-pycparser)) +$(eval $(call BuildPackage,python3-pycparser-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pycparser/patches/001-use-external-ply.patch b/openwrt/feeds/packages/lang/python/python-pycparser/patches/001-use-external-ply.patch index 96b1d034..23c43d28 100644 --- a/openwrt/feeds/packages/lang/python/python-pycparser/patches/001-use-external-ply.patch +++ b/openwrt/feeds/packages/lang/python/python-pycparser/patches/001-use-external-ply.patch @@ -1,5 +1,3 @@ -diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py -index cbb9d26..cbd7742 100644 --- a/pycparser/c_lexer.py +++ b/pycparser/c_lexer.py @@ -9,8 +9,8 @@ @@ -13,8 +11,6 @@ index cbb9d26..cbd7742 100644 class CLexer(object): -diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py -index f4f7453..5c0ca88 100644 --- a/pycparser/c_parser.py +++ b/pycparser/c_parser.py @@ -8,7 +8,7 @@ @@ -26,14 +22,12 @@ index f4f7453..5c0ca88 100644 from . import c_ast from .c_lexer import CLexer -diff --git a/setup.py b/setup.py -index fdccbb3..036a10b 100644 --- a/setup.py +++ b/setup.py -@@ -49,7 +49,7 @@ setup( - classifiers = [ - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3',], +@@ -60,7 +60,7 @@ setup( + 'Programming Language :: Python :: 3.6', + ], + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", - packages=['pycparser', 'pycparser.ply'], + packages=['pycparser'], package_data={'pycparser': ['*.cfg']}, diff --git a/openwrt/feeds/packages/lang/python/python-pyopenssl/Makefile b/openwrt/feeds/packages/lang/python/python-pyopenssl/Makefile index c16bc57d..5aad8ea2 100644 --- a/openwrt/feeds/packages/lang/python/python-pyopenssl/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pyopenssl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2017 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,51 +7,47 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=pyOpenSSL -PKG_VERSION:=17.2.0 -PKG_RELEASE:=1 +PKG_NAME:=python-pyopenssl +PKG_VERSION:=19.0.0 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/b0/9e/7088f6165c40c46416aff434eb806c1d64ad6ec6dbc201f5ad4d0484704e -PKG_HASH:=5d617ce36b07c51f330aa63b83bf7f25c40a0e95958876d54d1982f8c91b4834 +PYPI_NAME:=pyOpenSSL +PKG_HASH:=aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean +PKG_CPE_ID:=cpe:/a:pyopenssl_project:pyopenssl -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyopenssl-$(PKG_VERSION) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-pyopenssl/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=https://github.com/pyca/pyopenssl + TITLE:=OpenSSL wrapper + URL:=https://pyopenssl.org/ endef define Package/python-pyopenssl $(call Package/python-pyopenssl/Default) - TITLE:=python-pyopenssl - VARIANT:=python DEPENDS:= \ +PACKAGE_python-pyopenssl:python-light \ +PACKAGE_python-pyopenssl:python-cryptography \ +PACKAGE_python-pyopenssl:python-six + VARIANT:=python endef define Package/python3-pyopenssl $(call Package/python-pyopenssl/Default) - TITLE:=python3-pyopenssl - VARIANT:=python3 DEPENDS:= \ +PACKAGE_python3-pyopenssl:python3-light \ +PACKAGE_python3-pyopenssl:python3-cryptography \ +PACKAGE_python3-pyopenssl:python3-six + VARIANT:=python3 endef define Package/python-pyopenssl/description @@ -66,5 +62,8 @@ endef $(eval $(call PyPackage,python-pyopenssl)) $(eval $(call BuildPackage,python-pyopenssl)) +$(eval $(call BuildPackage,python-pyopenssl-src)) + $(eval $(call Py3Package,python3-pyopenssl)) $(eval $(call BuildPackage,python3-pyopenssl)) +$(eval $(call BuildPackage,python3-pyopenssl-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyotp/Makefile b/openwrt/feeds/packages/lang/python/python-pyotp/Makefile new file mode 100644 index 00000000..4eb1c7a2 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pyotp/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyotp +PKG_VERSION:=2.2.7 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pyotp + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python One-Time Password Library + URL:=https://github.com/pyauth/pyotp + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-pyotp/description + PyOTP is a Python library for generating and verifying one-time passwords. + It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods + in web applications and in other systems that require users to log in. +endef + +$(eval $(call Py3Package,python3-pyotp)) +$(eval $(call BuildPackage,python3-pyotp)) +$(eval $(call BuildPackage,python3-pyotp-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyparsing/Makefile b/openwrt/feeds/packages/lang/python/python-pyparsing/Makefile new file mode 100644 index 00000000..f4f3d114 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pyparsing/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pyparsing +PKG_VERSION:=2.4.2 +PKG_RELEASE:=1 + +PYPI_NAME:=pyparsing +PKG_HASH:=6f98a7b9397e206d78cc01df10131398f1c8b8510a2f4d97d9abd82e1aacdd80 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pyparsing + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Library for constructing grammar directly in python + URL:=https://github.com/pyparsing/pyparsing/ + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-pyparsing/description + The pyparsing module is an alternative approach to creating + and executing simple grammars, vs. the traditional lex/yacc + approach, or the use of regular expressions. + The pyparsing module provides a library of classes that + client code uses to construct the grammar directly in Python code. +endef + +$(eval $(call Py3Package,python3-pyparsing)) +$(eval $(call BuildPackage,python3-pyparsing)) +$(eval $(call BuildPackage,python3-pyparsing-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyptlib/Makefile b/openwrt/feeds/packages/lang/python/python-pyptlib/Makefile index 8f332460..9c0403ab 100644 --- a/openwrt/feeds/packages/lang/python/python-pyptlib/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pyptlib/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015, 2017-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,30 +7,33 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=pyptlib +PKG_NAME:=python-pyptlib PKG_VERSION:=0.0.6 -PKG_RELEASE:=1 +PKG_RELEASE:=3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyptlib -PKG_MD5SUM:=2fc7b8803777451c1fad3d5e25f1b99c - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=pyptlib +PKG_HASH:=b98472e3d9e8f4689d3913ca8f89afa5e6cc5383dcd8686987606166f9dac607 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk + +define Package/python-pyptlib/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Pluggable Transports for Tor + URL:=https://pypi.org/project/pyptlib/ +endef define Package/python-pyptlib - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-pyptlib - URL:=https://pypi.python.org/pypi/pyptlib - DEPENDS:=+python-light +$(call Package/python-pyptlib/Default) + DEPENDS:=+PACKAGE_python-pyptlib:python-light + VARIANT:=python endef define Package/python-pyptlib/description @@ -38,9 +41,6 @@ A python implementation of the Pluggable Transports for Circumvention specification for Tor endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") -endef - $(eval $(call PyPackage,python-pyptlib)) $(eval $(call BuildPackage,python-pyptlib)) +$(eval $(call BuildPackage,python-pyptlib-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyrsistent/Makefile b/openwrt/feeds/packages/lang/python/python-pyrsistent/Makefile new file mode 100644 index 00000000..9121a7fe --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pyrsistent/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pyrsistent +PKG_VERSION:=0.15.4 +PKG_RELEASE:=1 + +PYPI_NAME:=pyrsistent +PKG_HASH:=34b47fa169d6006b32e99d4b3c4031f155e6e68ebcc107d6454852e8e0ee6533 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.mit + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pyrsistent + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Persistent/Functional/Immutable data structures + URL:=https://github.com/tobgu/pyrsistent + DEPENDS:=+python3-light +python3-six + VARIANT:=python3 +endef + +define Package/python3-pyrsistent/description + Pyrsistent is a number of persistent collections (by some referred to as functional data structures). + Persistent in the sense that they are immutable. +endef + +$(eval $(call Py3Package,python3-pyrsistent)) +$(eval $(call BuildPackage,python3-pyrsistent)) +$(eval $(call BuildPackage,python3-pyrsistent-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pyserial/Makefile b/openwrt/feeds/packages/lang/python/python-pyserial/Makefile index 03bb5333..ca80e6c4 100644 --- a/openwrt/feeds/packages/lang/python/python-pyserial/Makefile +++ b/openwrt/feeds/packages/lang/python/python-pyserial/Makefile @@ -8,43 +8,58 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyserial -PKG_VERSION:=3.1.1 +PKG_VERSION:=3.4 PKG_RELEASE:=1 -PKG_MAINTAINER:=Micke Prag -PKG_LICENSE:=Python-2.0 -PKG_SOURCE:=pyserial-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/ -PKG_MD5SUM:=2f72100de3e410b36d575e12e82e9d27 +PYPI_NAME:=pyserial +PKG_HASH:=6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627 -PKG_BUILD_DIR:=$(BUILD_DIR)/pyserial-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=python +PKG_LICENSE:=BSD +PKG_MAINTAINER:=Micke Prag +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/python-pyserial - SUBMENU:=Python - SECTION:=lang +define Package/python-pyserial/Default + SECTION:=lang-python CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/pyserial/pyserial +endef + +define Package/python-pyserial +$(call Package/python-pyserial/Default) TITLE:=python-pyserial - URL:=http://pyserial.sourceforge.net - DEPENDS:=+python-light + DEPENDS:=+PACKAGE_python-pyserial:python-light + VARIANT:=python endef -define Package/python-pyserial/description - serial port python bindings +define Package/python3-pyserial +$(call Package/python-pyserial/Default) + TITLE:=python3-pyserial + DEPENDS:=+PACKAGE_python3-pyserial:python3-light + VARIANT:=python3 endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)") +define Package/python-pyserial/description +This module encapsulates the access for the serial port. It provides backends +for Python running on Windows, OSX, Linux, BSD (possibly any POSIX compliant +system) and IronPython. The module named "serial" automatically selects the +appropriate backend. endef -define Package/python-pyserial/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-pyserial/description +$(call Package/python-pyserial/description) +. +(Variant for Python3) endef +$(eval $(call PyPackage,python-pyserial)) $(eval $(call BuildPackage,python-pyserial)) +$(eval $(call BuildPackage,python-pyserial-src)) + +$(eval $(call Py3Package,python3-pyserial)) +$(eval $(call BuildPackage,python3-pyserial)) +$(eval $(call BuildPackage,python3-pyserial-src)) diff --git a/openwrt/feeds/packages/lang/python/python-pytz/Makefile b/openwrt/feeds/packages/lang/python/python-pytz/Makefile new file mode 100644 index 00000000..bdff0ac5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-pytz/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2007-2019 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-pytz +PKG_VERSION:=2019.3 +PKG_RELEASE:=1 + +PYPI_NAME:=pytz +PKG_HASH:=b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be + +PKG_MAINTAINER:=Alexandru Ardelean +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-pytz/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + URL:=https://pythonhosted.org/pytz/ +endef + +define Package/python-pytz +$(call Package/python-pytz/Default) + TITLE:=World timezone definitions, modern and historical + DEPENDS:=+PACKAGE_python-pytz:python-light + VARIANT:=python +endef + +define Package/python3-pytz +$(call Package/python-pytz/Default) + TITLE:=World timezone definitions, modern and historical for Python3 + DEPENDS:=+PACKAGE_python3-pytz:python3-light + VARIANT:=python3 +endef + +define Package/python-pytz/description + World timezone definitions, modern and historical +endef + +define Package/python3-pytz/description +$(call Package/python-pytz/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-pytz)) +$(eval $(call BuildPackage,python-pytz)) +$(eval $(call BuildPackage,python-pytz-src)) + +$(eval $(call Py3Package,python3-pytz)) +$(eval $(call BuildPackage,python3-pytz)) +$(eval $(call BuildPackage,python3-pytz-src)) diff --git a/openwrt/feeds/packages/lang/python/python-qrcode/Makefile b/openwrt/feeds/packages/lang/python/python-qrcode/Makefile new file mode 100644 index 00000000..63c08db3 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-qrcode/Makefile @@ -0,0 +1,68 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-qrcode +PKG_VERSION:=6.1 +PKG_RELEASE:=2 + +PYPI_NAME:=qrcode +PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-qrcode/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=QR Code image generator + URL:=https://github.com/lincolnloop/python-qrcode +endef + +define Package/python-qrcode +$(call Package/python-qrcode/Default) + DEPENDS:= \ + +PACKAGE_python-qrcode:python \ + +PACKAGE_python-qrcode:python-setuptools \ + +PACKAGE_python-qrcode:python-six \ + +PACKAGE_python-qrcode:python-pillow + VARIANT:=python +endef + +define Package/python-qrcode/description + Pure python QR Code generator +endef + +define Package/python3-qrcode +$(call Package/python-qrcode/Default) + DEPENDS:= \ + +PACKAGE_python3-qrcode:python3 \ + +PACKAGE_python3-qrcode:python3-setuptools \ + +PACKAGE_python3-qrcode:python3-six \ + +PACKAGE_python3-qrcode:python3-pillow + VARIANT:=python3 +endef + +define Package/python3-qrcode/description +$(call Package/python-qrcode/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-qrcode)) +$(eval $(call BuildPackage,python-qrcode)) +$(eval $(call BuildPackage,python-qrcode-src)) + +$(eval $(call Py3Package,python3-qrcode)) +$(eval $(call BuildPackage,python3-qrcode)) +$(eval $(call BuildPackage,python3-qrcode-src)) diff --git a/openwrt/feeds/packages/lang/python/python-rcssmin/Makefile b/openwrt/feeds/packages/lang/python/python-rcssmin/Makefile new file mode 100644 index 00000000..2a812920 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-rcssmin/Makefile @@ -0,0 +1,67 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-rcssmin +PKG_VERSION:=1.0.6 +PKG_RELEASE=1 + +PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=rcssmin +PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-rcssmin/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Fast CSS minifier for Python + URL:=http://opensource.perlig.de/rcssmin/ +endef + +define Package/python-rcssmin + $(call Package/python-rcssmin/Default) + DEPENDS:= \ + +PACKAGE_python-rcssmin:python-light \ + +PACKAGE_python-rcssmin:python-codecs + VARIANT:=python +endef + +define Package/python3-rcssmin + $(call Package/python-rcssmin/Default) + DEPENDS:= \ + +PACKAGE_python3-rcssmin:python3-light + VARIANT:=python3 +endef + +define Package/python-rcssmin/description + This module is a re-implementation aiming for speed instead of maximum compression, + so it can be used at runtime (rather than during a preprocessing step). + RCSSmin does syntactical compression only (removing spaces, comments and possibly + semicolons). It does not provide semantic compression (like removing empty blocks, + collapsing redundant properties etc). +endef + +define Package/python3-rcssmin/description +$(call Package/python-rcssmin/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-rcssmin)) +$(eval $(call BuildPackage,python-rcssmin)) +$(eval $(call BuildPackage,python-rcssmin-src)) + +$(eval $(call Py3Package,python3-rcssmin)) +$(eval $(call BuildPackage,python3-rcssmin)) +$(eval $(call BuildPackage,python3-rcssmin-src)) diff --git a/openwrt/feeds/packages/lang/python/python-requests-oauthlib/Makefile b/openwrt/feeds/packages/lang/python/python-requests-oauthlib/Makefile new file mode 100644 index 00000000..30b00d61 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-requests-oauthlib/Makefile @@ -0,0 +1,67 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-requests-oauthlib +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=LICENSE + +PYPI_NAME:=requests-oauthlib +PKG_HASH:=b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-requests-oauthlib/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=OAuthlib auth for Requests + URL:=https://github.com/requests/requests-oauthlib +endef + +define Package/python-requests-oauthlib + $(call Package/python-requests-oauthlib/Default) + DEPENDS:= \ + +PACKAGE_python-requests-oauthlib:python \ + +PACKAGE_python-requests-oauthlib:python-oauthlib \ + +PACKAGE_python-requests-oauthlib:python-requests + VARIANT:=python +endef + +define Package/python3-requests-oauthlib + $(call Package/python-requests-oauthlib/Default) + DEPENDS:= \ + +PACKAGE_python3-requests-oauthlib:python3 \ + +PACKAGE_python3-requests-oauthlib:python3-oauthlib \ + +PACKAGE_python3-requests-oauthlib:python3-requests + VARIANT:=python3 +endef + +define Package/python-requests-oauthlib/description + This python package provides first-class OAuth library support + for Requests. +endef + +define Package/python3-requests-oauthlib/description +$(call Package/python-requests-oauthlib/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-requests-oauthlib)) +$(eval $(call BuildPackage,python-requests-oauthlib)) +$(eval $(call BuildPackage,python-requests-oauthlib-src)) + +$(eval $(call Py3Package,python3-requests-oauthlib)) +$(eval $(call BuildPackage,python3-requests-oauthlib)) +$(eval $(call BuildPackage,python3-requests-oauthlib-src)) diff --git a/openwrt/feeds/packages/lang/python/python-requests/Makefile b/openwrt/feeds/packages/lang/python/python-requests/Makefile new file mode 100644 index 00000000..d233b69d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-requests/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2007-2019 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-requests +PKG_VERSION:=2.22.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:python-requests:requests + +PYPI_NAME:=requests +PKG_HASH:=11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-requests/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=HTTP library for Python + URL:=https://2.python-requests.org/ +endef + +define Package/python-requests +$(call Package/python-requests/Default) + DEPENDS:= \ + +PACKAGE_python-requests:python \ + +PACKAGE_python-requests:python-chardet \ + +PACKAGE_python-requests:python-idna \ + +PACKAGE_python-requests:python-urllib3 \ + +PACKAGE_python-requests:python-certifi + VARIANT:=python +endef + +define Package/python3-requests +$(call Package/python-requests/Default) + DEPENDS:= \ + +PACKAGE_python3-requests:python3-light \ + +PACKAGE_python3-requests:python3-chardet \ + +PACKAGE_python3-requests:python3-idna \ + +PACKAGE_python3-requests:python3-urllib3 \ + +PACKAGE_python3-requests:python3-certifi + VARIANT:=python3 +endef + +define Package/python-requests/description + Requests is the only Non-GMO HTTP library for Python, safe for human consumption +endef + +define Package/python3-requests/description +$(call Package/python-requests/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-requests)) +$(eval $(call BuildPackage,python-requests)) +$(eval $(call BuildPackage,python-requests-src)) + +$(eval $(call Py3Package,python3-requests)) +$(eval $(call BuildPackage,python3-requests)) +$(eval $(call BuildPackage,python3-requests-src)) diff --git a/openwrt/feeds/packages/lang/python/python-rsa/Makefile b/openwrt/feeds/packages/lang/python/python-rsa/Makefile new file mode 100644 index 00000000..9bdca772 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-rsa/Makefile @@ -0,0 +1,56 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=rsa +PKG_VERSION:=4.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-rsa/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=rsa + URL:=https://stuvel.eu/rsa +endef + +define Package/python-rsa +$(call Package/python-rsa/Default) + DEPENDS:=+PACKAGE_python-rsa:python +PACKAGE_python-rsa:python-pyasn1 + VARIANT:=python +endef + +define Package/python3-rsa +$(call Package/python-rsa/Default) + DEPENDS:=+PACKAGE_python3-rsa:python3 +PACKAGE_python3-rsa:python3-pyasn1 + VARIANT:=python3 +endef + +define Package/python-rsa/description + Is a pure-Python RSA implementation. It supports encryption and decryption, + signing and verifying signatures, and key generation according to PKCS#1 version 1.5. + It can be used as a Python library as well as on the commandline. +endef + +define Package/python3-rsa/description +$(call Package/python-rsa/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-rsa)) +$(eval $(call BuildPackage,python-rsa)) +$(eval $(call BuildPackage,python-rsa-src)) + +$(eval $(call Py3Package,python3-rsa)) +$(eval $(call BuildPackage,python3-rsa)) +$(eval $(call BuildPackage,python3-rsa-src)) diff --git a/openwrt/feeds/packages/lang/python/python-s3transfer/Makefile b/openwrt/feeds/packages/lang/python/python-s3transfer/Makefile new file mode 100644 index 00000000..5ed85e9d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-s3transfer/Makefile @@ -0,0 +1,59 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=s3transfer +PKG_VERSION:=0.2.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=f23d5cb7d862b104401d9021fc82e5fa0e0cf57b7660a1331425aab0c691d021 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-s3transfer/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=s3transfer + URL:=https://github.com/boto/s3transfer +endef + +define Package/python-s3transfer +$(call Package/python-s3transfer/Default) + DEPENDS:= \ + +PACKAGE_python-s3transfer:python \ + +PACKAGE_python-s3transfer:python-botocore \ + +PACKAGE_python-s3transfer:python-futures + VARIANT:=python +endef + +define Package/python3-s3transfer +$(call Package/python-s3transfer/Default) + DEPENDS:= \ + +PACKAGE_python3-s3transfer:python3 \ + +PACKAGE_python3-s3transfer:python3-botocore + VARIANT:=python3 +endef + +define Package/python-s3transfer/description +S3transfer is a Python library for managing Amazon S3 transfers. +endef + +define Package/python3-s3transfer/description +$(call Package/python-s3transfer/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-s3transfer)) +$(eval $(call BuildPackage,python-s3transfer)) +$(eval $(call BuildPackage,python-s3transfer-src)) + +$(eval $(call Py3Package,python3-s3transfer)) +$(eval $(call BuildPackage,python3-s3transfer)) +$(eval $(call BuildPackage,python3-s3transfer-src)) diff --git a/openwrt/feeds/packages/lang/python/python-schedule/Makefile b/openwrt/feeds/packages/lang/python/python-schedule/Makefile new file mode 100644 index 00000000..c7e4b6ee --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-schedule/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-schedule +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 + +PYPI_NAME:=schedule +PKG_HASH:=f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-schedule + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Job scheduling for humans + URL:=https://github.com/dbader/schedule + DEPENDS:=+python3-light +python3-logging + VARIANT:=python3 +endef + +define Package/python3-schedule/description + An in-process scheduler for periodic jobs that uses the builder pattern for configuration. + The Schedule lets you run Python functions (or any other callable) + periodically at predetermined intervals using a simple, human-friendly syntax. +endef + +$(eval $(call Py3Package,python3-schedule)) +$(eval $(call BuildPackage,python3-schedule)) +$(eval $(call BuildPackage,python3-schedule-src)) diff --git a/openwrt/feeds/packages/lang/python/python-schema/Makefile b/openwrt/feeds/packages/lang/python/python-schema/Makefile new file mode 100644 index 00000000..4c96f39c --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-schema/Makefile @@ -0,0 +1,36 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-schema +PKG_VERSION:=0.7.1 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Karel Kočí + +PKG_SOURCE_URL:=https://codeload.github.com/keleshev/schema/tar.gz/v$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=0edc47b343450c116dd67267b6951b43916b2e6893e896da1eefb7a69ef7c83d +PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-schema + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/keleshev/schema + TITLE:=python3-schema + DEPENDS:=+python3-light +python3-contextlib2 + VARIANT:=python3 +endef + +define Package/python3-schema/description + Schema validation just got Pythonic +endef + +$(eval $(call Py3Package,python3-schema)) +$(eval $(call BuildPackage,python3-schema)) +$(eval $(call BuildPackage,python3-schema-src)) diff --git a/openwrt/feeds/packages/lang/python/python-sentry-sdk/Makefile b/openwrt/feeds/packages/lang/python/python-sentry-sdk/Makefile new file mode 100644 index 00000000..fd96408b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-sentry-sdk/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-sentry-sdk +PKG_VERSION:=0.13.2 +PKG_RELEASE:=1 + +PYPI_NAME:=sentry-sdk +PKG_HASH:=ff1fa7fb85703ae9414c8b427ee73f8363232767c9cd19158f08f6e4f0b58fc7 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-sentry-sdk + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python Client for Sentry + URL:=https://github.com/getsentry/sentry-python + DEPENDS:= \ + +python3-certifi \ + +python3-light \ + +python3-logging \ + +python3-urllib3 + VARIANT:=python3 +endef + +define Package/python3-sentry-sdk/description + Python Sentry-Python is an SDK for Sentry. +endef + +$(eval $(call Py3Package,python3-sentry-sdk)) +$(eval $(call BuildPackage,python3-sentry-sdk)) +$(eval $(call BuildPackage,python3-sentry-sdk-src)) diff --git a/openwrt/feeds/packages/lang/python/python-service-identity/Makefile b/openwrt/feeds/packages/lang/python/python-service-identity/Makefile index b66927b1..dc99d4b7 100644 --- a/openwrt/feeds/packages/lang/python/python-service-identity/Makefile +++ b/openwrt/feeds/packages/lang/python/python-service-identity/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2016 OpenWrt.org +# Copyright (C) 2016-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,30 +7,51 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=service_identity -PKG_VERSION:=16.0.0 +PKG_NAME:=python-service-identity +PKG_VERSION:=18.1.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/service_identity -PKG_MD5SUM:=d52392597b9c44a740abf322bfdb21e6 - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=service_identity +PKG_HASH:=0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk + +define Package/python-service-identity/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Service identity verification + URL:=https://service-identity.readthedocs.io/ +endef define Package/python-service-identity - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-service-identity - URL:=https://github.com/pyca/service_identity - DEPENDS:=+python-light +python-attrs +python-pyasn1 +python-pyasn1-modules +python-pyopenssl +$(call Package/python-service-identity/Default) + DEPENDS:= \ + +PACKAGE_python-service-identity:python-light \ + +PACKAGE_python-service-identity:python-attrs \ + +PACKAGE_python-service-identity:python-cryptography \ + +PACKAGE_python-service-identity:python-ipaddress \ + +PACKAGE_python-service-identity:python-pyasn1 \ + +PACKAGE_python-service-identity:python-pyasn1-modules + VARIANT:=python +endef + +define Package/python3-service-identity +$(call Package/python-service-identity/Default) + DEPENDS:= \ + +PACKAGE_python3-service-identity:python3-light \ + +PACKAGE_python3-service-identity:python3-attrs \ + +PACKAGE_python3-service-identity:python3-cryptography \ + +PACKAGE_python3-service-identity:python3-pyasn1 \ + +PACKAGE_python3-service-identity:python3-pyasn1-modules + VARIANT:=python3 endef define Package/python-service-identity/description @@ -38,9 +59,16 @@ service_identity aspires to give you all the tools you need for verifying whether a certificate is valid for the intended purposes. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") +define Package/python3-service-identity/description +$(call Package/python-service-identity/description) +. +(Variant for Python3) endef $(eval $(call PyPackage,python-service-identity)) $(eval $(call BuildPackage,python-service-identity)) +$(eval $(call BuildPackage,python-service-identity-src)) + +$(eval $(call Py3Package,python3-service-identity)) +$(eval $(call BuildPackage,python3-service-identity)) +$(eval $(call BuildPackage,python3-service-identity-src)) diff --git a/openwrt/feeds/packages/lang/python/python-simplejson/Makefile b/openwrt/feeds/packages/lang/python/python-simplejson/Makefile new file mode 100644 index 00000000..06c0d135 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-simplejson/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2007-2017 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-simplejson +PKG_VERSION:=3.16.0 +PKG_RELEASE:=3 +PKG_LICENSE:=MIT +PKG_CPE_ID:=cpe:/a:simplejson_project:simplejson + +PYPI_NAME:=simplejson +PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-simplejson/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Alexandru Ardelean + URL:=https://simplejson.readthedocs.org/ +endef + +define Package/python-simplejson +$(call Package/python-simplejson/Default) + TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2 + DEPENDS:=+PACKAGE_python-simplejson:python-light +PACKAGE_python-simplejson:python-decimal + VARIANT:=python +endef + +define Package/python3-simplejson +$(call Package/python-simplejson/Default) + TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3 + DEPENDS:=+PACKAGE_python3-simplejson:python3-light +PACKAGE_python3-simplejson:python3-decimal + VARIANT:=python3 +endef + +define Package/python-simplejson/description + Simple, fast, extensible JSON encoder/decoder for Python +endef + +define Package/python3-simplejson/description +$(call Package/python-simplejson/description) +. +(Variant for Python3) +endef + +define PyPackage/python-simplejson/filespec ++|$(PYTHON_PKG_DIR) +-|$(PYTHON_PKG_DIR)/simplejson/tests +endef + +define Py3Package/python3-simplejson/filespec ++|$(PYTHON3_PKG_DIR) +-|$(PYTHON3_PKG_DIR)/simplejson/tests +endef + +$(eval $(call PyPackage,python-simplejson)) +$(eval $(call BuildPackage,python-simplejson)) +$(eval $(call BuildPackage,python-simplejson-src)) + +$(eval $(call Py3Package,python3-simplejson)) +$(eval $(call BuildPackage,python3-simplejson)) +$(eval $(call BuildPackage,python3-simplejson-src)) diff --git a/openwrt/feeds/packages/lang/python/python-six/Makefile b/openwrt/feeds/packages/lang/python/python-six/Makefile index a68792ab..f6e548e5 100644 --- a/openwrt/feeds/packages/lang/python/python-six/Makefile +++ b/openwrt/feeds/packages/lang/python/python-six/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015, 2017-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,46 +8,40 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-six -PKG_VERSION:=1.10.0 -PKG_RELEASE:=4 +PKG_VERSION:=1.13.0 +PKG_RELEASE:=1 -PKG_SOURCE:=six-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/six -PKG_HASH:=105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a - -HOST_BUILD_DEPENDS:=python/host - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-six-$(PKG_VERSION) +PYPI_NAME:=six +PKG_HASH:=30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean +HOST_BUILD_DEPENDS:=python3/host + +include ../pypi.mk include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) -HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +include ../python-package.mk +include ../python3-package.mk define Package/python-six/Default SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=https://pypi.python.org/pypi/six + TITLE:=Python 2 and 3 compatibility library + URL:=https://github.com/benjaminp/six endef define Package/python-six $(call Package/python-six/Default) - TITLE:=python-six DEPENDS:=+PACKAGE_python-six:python-light VARIANT:=python endef define Package/python3-six $(call Package/python-six/Default) - TITLE:=python3-six DEPENDS:=+PACKAGE_python3-six:python3-light VARIANT:=python3 endef @@ -66,7 +60,7 @@ $(call Package/python-six/description) endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") + $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef Host/Install:= @@ -75,5 +69,8 @@ $(eval $(call HostBuild)) $(eval $(call PyPackage,python-six)) $(eval $(call BuildPackage,python-six)) +$(eval $(call BuildPackage,python-six-src)) + $(eval $(call Py3Package,python3-six)) $(eval $(call BuildPackage,python3-six)) +$(eval $(call BuildPackage,python3-six-src)) diff --git a/openwrt/feeds/packages/lang/python/python-slugify/Makefile b/openwrt/feeds/packages/lang/python/python-slugify/Makefile new file mode 100644 index 00000000..b5fbc4d5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-slugify/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-slugify +PKG_VERSION:=3.0.3 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=a9f468227cb11e20e251670d78e1b5f6b0b15dd37bbd5c9814a25a904e44ff66 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-slugify + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Slugify application that handles Unicode + URL:=https://github.com/un33k/python-slugify + DEPENDS:= \ + +python3-light \ + +python3-codecs \ + +python3-setuptools \ + +python3-text-unidecode + VARIANT:=python3 +endef + +define Package/python3-slugify/description + A Python slugify application that handles unicode. +endef + +$(eval $(call Py3Package,python3-slugify)) +$(eval $(call BuildPackage,python3-slugify)) +$(eval $(call BuildPackage,python3-slugify-src)) diff --git a/openwrt/feeds/packages/lang/python/python-sqlalchemy/Makefile b/openwrt/feeds/packages/lang/python/python-sqlalchemy/Makefile new file mode 100644 index 00000000..8ddf4e84 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-sqlalchemy/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-sqlalchemy +PKG_VERSION:=1.3.7 +PKG_RELEASE:=1 + +PYPI_NAME:=SQLAlchemy +PKG_HASH:=0459bf0ea6478f3e904de074d65769a11d74cdc34438ab3159250c96d089aef0 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:sqlalchemy:sqlalchemy + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-sqlalchemy + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Database Abstraction Library + URL:=https://www.sqlalchemy.org + DEPENDS:= \ + +python3-light \ + +python3-urllib \ + +python3-decimal \ + +python3-logging + VARIANT:=python3 +endef + +define Package/python3-sqlalchemy/description + SQLAlchemy is the Python SQL toolkit and Object Relational Mapper + that gives application developers the full power and flexibility of SQL. + SQLAlchemy provides a full suite of well known enterprise-level persistence patterns, + designed for efficient and high-performing database access, + adapted into a simple and Pythonic domain language. +endef + +$(eval $(call Py3Package,python3-sqlalchemy)) +$(eval $(call BuildPackage,python3-sqlalchemy)) +$(eval $(call BuildPackage,python3-sqlalchemy-src)) diff --git a/openwrt/feeds/packages/lang/python/python-twisted/Makefile b/openwrt/feeds/packages/lang/python/python-twisted/Makefile new file mode 100644 index 00000000..a50c8b50 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-twisted/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2006-2011, 2015-2018 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-twisted +PKG_VERSION:=19.10.0 +PKG_RELEASE:=1 + +PYPI_NAME:=Twisted +PYPI_SOURCE_EXT:=tar.bz2 +PKG_HASH:=7394ba7f272ae722a74f3d969dcf599bc4ef093bc392038748a490f1724a515d + +PKG_BUILD_DEPENDS:=libtirpc + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To +PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-twisted/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Asynchronous networking framework + URL:=https://twistedmatrix.com/ +endef + +define Package/python-twisted +$(call Package/python-twisted/Default) + DEPENDS:= \ + +PACKAGE_python-twisted:python-light \ + +PACKAGE_python-twisted:python-attrs \ + +PACKAGE_python-twisted:python-automat \ + +PACKAGE_python-twisted:python-constantly \ + +PACKAGE_python-twisted:python-incremental \ + +PACKAGE_python-twisted:python-hyperlink \ + +PACKAGE_python-twisted:python-setuptools \ + +PACKAGE_python-twisted:python-zope-interface + VARIANT:=python +endef + +define Package/python3-twisted +$(call Package/python-twisted/Default) + DEPENDS:= \ + +PACKAGE_python3-twisted:python3-light \ + +PACKAGE_python3-twisted:python3-attrs \ + +PACKAGE_python3-twisted:python3-automat \ + +PACKAGE_python3-twisted:python3-constantly \ + +PACKAGE_python3-twisted:python3-incremental \ + +PACKAGE_python3-twisted:python3-hyperlink \ + +PACKAGE_python3-twisted:python3-setuptools \ + +PACKAGE_python3-twisted:python3-zope-interface + VARIANT:=python3 +endef + +define Package/python-twisted/description +Twisted is a networking engine written in Python, supporting numerous +protocols. It contains a web server, numerous chat clients, chat servers, +mail servers, and more. +endef + +define Package/python3-twisted/description +$(call Package/python-twisted/description) +. +(Variant for Python3) +endef + +define PyPackage/python-twisted/filespec ++|$(PYTHON_PKG_DIR) +-|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py +endef + +define Py3Package/python3-twisted/filespec ++|$(PYTHON3_PKG_DIR) +-|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py +endef + +define Py3Package/python3-twisted/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + for bin in $(1)/usr/bin/*; do \ + mv $$$$bin $$$${bin}3 ; \ + done +endef + +$(eval $(call PyPackage,python-twisted)) +$(eval $(call BuildPackage,python-twisted)) +$(eval $(call BuildPackage,python-twisted-src)) + +$(eval $(call Py3Package,python3-twisted)) +$(eval $(call BuildPackage,python3-twisted)) +$(eval $(call BuildPackage,python3-twisted-src)) diff --git a/openwrt/feeds/packages/lang/python/python-twisted/patches/001-omit-tkconch.patch b/openwrt/feeds/packages/lang/python/python-twisted/patches/001-omit-tkconch.patch new file mode 100644 index 00000000..c975aa31 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-twisted/patches/001-omit-tkconch.patch @@ -0,0 +1,18 @@ +--- a/src/twisted/python/_setup.py ++++ b/src/twisted/python/_setup.py +@@ -150,7 +150,6 @@ _CONSOLE_SCRIPTS = [ + "conch = twisted.conch.scripts.conch:run", + "mailmail = twisted.mail.scripts.mailmail:run", + "pyhtmlizer = twisted.scripts.htmlizer:run", +- "tkconch = twisted.conch.scripts.tkconch:run", + "trial = twisted.scripts.trial:run", + "twist = twisted.application.twist._twist:Twist.main", + "twistd = twisted.scripts.twistd:run", +--- a/src/twisted/python/twisted-completion.zsh ++++ b/src/twisted/python/twisted-completion.zsh +@@ -1,4 +1,4 @@ +-#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch ++#compdef twist twistd trial conch cftp ckeygen pyhtmlizer + # + # This is the ZSH completion file for Twisted commands. It calls the current + # command-line with the special "--_shell-completion" option which is handled diff --git a/openwrt/feeds/packages/lang/python/python-twisted/patches/002-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-twisted/patches/002-omit-tests.patch new file mode 100644 index 00000000..2eb84d06 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-twisted/patches/002-omit-tests.patch @@ -0,0 +1,37 @@ +--- a/src/twisted/python/_setup.py ++++ b/src/twisted/python/_setup.py +@@ -176,11 +176,6 @@ class ConditionalExtension(Extension, ob + # The C extensions used for Twisted. + _EXTENSIONS = [ + ConditionalExtension( +- "twisted.test.raiser", +- sources=["src/twisted/test/raiser.c"], +- condition=lambda _: _isCPython), +- +- ConditionalExtension( + "twisted.internet.iocpreactor.iocpsupport", + sources=[ + "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c", +@@ -285,12 +280,11 @@ def getSetupArgs(extensions=_EXTENSIONS, + "incremental >= 16.10.1", + "Automat >= 0.3.0", + "hyperlink >= 17.1.1", +- "PyHamcrest >= 1.9.0", + "attrs >= 17.4.0", + ] + + arguments.update(dict( +- packages=find_packages("src"), ++ packages=find_packages("src", exclude=["*.test", "*.test.*"]), + use_incremental=True, + setup_requires=["incremental >= 16.10.1"], + install_requires=requirements, +@@ -300,7 +294,7 @@ def getSetupArgs(extensions=_EXTENSIONS, + cmdclass=command_classes, + include_package_data=True, + exclude_package_data={ +- "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"], ++ "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"], + }, + zip_safe=False, + extras_require=_EXTRAS_REQUIRE, diff --git a/openwrt/feeds/packages/lang/python/python-txsocksx/Makefile b/openwrt/feeds/packages/lang/python/python-txsocksx/Makefile index d830e6f3..9a0e2db7 100644 --- a/openwrt/feeds/packages/lang/python/python-txsocksx/Makefile +++ b/openwrt/feeds/packages/lang/python/python-txsocksx/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015, 2017-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,30 +7,39 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=txsocksx +PKG_NAME:=python-txsocksx PKG_VERSION:=1.15.0.2 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/t/txsocksx -PKG_MD5SUM:=0266b9ae7b58f7550a49683afebf65ba - -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=txsocksx +PKG_HASH:=4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f PKG_LICENSE:=ISC PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Jeffery To +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk + +PYTHON_PKG_SETUP_VARS:= \ + PKG_VERSION="$(PKG_VERSION)" + +define Package/python-txsocksx/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=SOCKS client endpoints for Twisted + URL:=https://github.com/habnabit/txsocksx +endef define Package/python-txsocksx - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-txsocksx - URL:=https://github.com/habnabit/txsocksx - DEPENDS:=+python-light +python-parsley +twisted +$(call Package/python-txsocksx/Default) + DEPENDS:= \ + +PACKAGE_python-txsocksx:python-light \ + +PACKAGE_python-txsocksx:python-parsley \ + +PACKAGE_python-txsocksx:python-twisted + VARIANT:=python endef define Package/python-txsocksx/description @@ -38,12 +47,6 @@ txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or greater. endef -define Build/Compile - $(call Build/Compile/PyMod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \ - PKG_VERSION="$(PKG_VERSION)" \ - ) -endef - $(eval $(call PyPackage,python-txsocksx)) $(eval $(call BuildPackage,python-txsocksx)) +$(eval $(call BuildPackage,python-txsocksx-src)) diff --git a/openwrt/feeds/packages/lang/python/python-txsocksx/patches/001-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-txsocksx/patches/001-omit-tests.patch index dd4acd7c..2bed548d 100644 --- a/openwrt/feeds/packages/lang/python/python-txsocksx/patches/001-omit-tests.patch +++ b/openwrt/feeds/packages/lang/python/python-txsocksx/patches/001-omit-tests.patch @@ -1,5 +1,3 @@ -diff --git a/setup.py b/setup.py -index 7979f89..3873a1e 100644 --- a/setup.py +++ b/setup.py @@ -35,5 +35,5 @@ setup( diff --git a/openwrt/feeds/packages/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch b/openwrt/feeds/packages/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch index a904db1e..c7c2cbba 100644 --- a/openwrt/feeds/packages/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch +++ b/openwrt/feeds/packages/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch @@ -1,5 +1,3 @@ -diff --git a/setup.py b/setup.py -index 7979f89..5e1abb3 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ @@ -25,5 +23,5 @@ index 7979f89..5e1abb3 100644 + #}, + version=os.environ.get('PKG_VERSION'), install_requires=install_requires, - packages=['txsocksx', 'txsocksx.test'], + packages=['txsocksx'], ) diff --git a/openwrt/feeds/packages/lang/python/python-urllib3/Makefile b/openwrt/feeds/packages/lang/python/python-urllib3/Makefile index e55c7ed3..708ef0fe 100644 --- a/openwrt/feeds/packages/lang/python/python-urllib3/Makefile +++ b/openwrt/feeds/packages/lang/python/python-urllib3/Makefile @@ -8,42 +8,56 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-urllib3 -PKG_VERSION:=1.20 +PKG_VERSION:=1.25.6 PKG_RELEASE:=1 + +PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt +PKG_CPE_ID:=cpe:/a:urllib3_project:urllib3 -PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)/ -PKG_SOURCE_URL:=https://pypi.python.org/packages/20/56/a6aa403b0998f857b474a538343ee483f5c02491bd1aebf61d42a3f60f77/ -PKG_MD5SUM:=34691d4e7e20a8e9cdb452ea24fc38e7 -PKG_BUILD_DEPENDS:=python python-setuptools +PYPI_NAME:=urllib3 +PKG_HASH:=9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) +include ../python-package.mk +include ../python3-package.mk -define Package/python-urllib3 +define Package/python-urllib3/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=HTTP library with thread-safe connection pooling, file post, and more. + TITLE:=Sanity-friendly HTTP client URL:=https://urllib3.readthedocs.io/ - DEPENDS:=+python +endef + +define Package/python-urllib3 +$(call Package/python-urllib3/Default) + DEPENDS:=+PACKAGE_python-urllib3:python + VARIANT:=python endef define Package/python-urllib3/description HTTP library with thread-safe connection pooling, file post, and more. endef -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +define Package/python3-urllib3 +$(call Package/python-urllib3/Default) + DEPENDS:=+PACKAGE_python3-urllib3:python3 + VARIANT:=python3 endef -define Package/python-urllib3/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) +define Package/python3-urllib3/description +$(call Package/python-urllib3/description) +. +(Variant for Python3) endef +$(eval $(call PyPackage,python-urllib3)) $(eval $(call BuildPackage,python-urllib3)) +$(eval $(call BuildPackage,python-urllib3-src)) + +$(eval $(call Py3Package,python3-urllib3)) +$(eval $(call BuildPackage,python3-urllib3)) +$(eval $(call BuildPackage,python3-urllib3-src)) diff --git a/openwrt/feeds/packages/lang/python/python/files/python-version.mk b/openwrt/feeds/packages/lang/python/python-version.mk similarity index 99% rename from openwrt/feeds/packages/lang/python/python/files/python-version.mk rename to openwrt/feeds/packages/lang/python/python-version.mk index e85da3c3..2da2fa87 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-version.mk +++ b/openwrt/feeds/packages/lang/python/python-version.mk @@ -13,4 +13,3 @@ PYTHON_PIP_PKG_RELEASE:=1 PYTHON_SETUPTOOLS_VERSION:=41.2.0 PYTHON_PIP_VERSION:=19.2.3 - diff --git a/openwrt/feeds/packages/lang/python/python-voluptuous-serialize/Makefile b/openwrt/feeds/packages/lang/python/python-voluptuous-serialize/Makefile new file mode 100644 index 00000000..371b793d --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-voluptuous-serialize/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=voluptuous-serialize +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=8b31660c7efdba0eb97ba65390b63cc62cc99ae3cd25d00e1873b183b38ef13d + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=COPYING + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-voluptuous-serialize + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python Voluptuous Serialize + URL:=https://github.com/balloob/voluptuous-serialize + DEPENDS:= \ + +python3-light \ + +python3-voluptuous + VARIANT:=python3 +endef + +define Package/python3-voluptuous-serialize/description +Convert Voluptuous schemas to dictionaries so they can be serialized. +endef + +$(eval $(call Py3Package,python3-voluptuous-serialize)) +$(eval $(call BuildPackage,python3-voluptuous-serialize)) +$(eval $(call BuildPackage,python3-voluptuous-serialize-src)) diff --git a/openwrt/feeds/packages/lang/python/python-voluptuous/Makefile b/openwrt/feeds/packages/lang/python/python-voluptuous/Makefile new file mode 100644 index 00000000..910f82a5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-voluptuous/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-voluptuous +PKG_VERSION:=0.11.7 +PKG_RELEASE:=1 + +PYPI_NAME:=voluptuous +PKG_HASH:=2abc341dbc740c5e2302c7f9b8e2e243194fb4772585b991931cb5b22e9bf456 + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Josef Schlehofer + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-voluptuous/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Data validation library + URL:=https://github.com/alecthomas/voluptuous +endef + +define Package/python-voluptuous +$(call Package/python-voluptuous/Default) + DEPENDS:= \ + +PACKAGE_python-voluptuous:python-light + VARIANT:=python +endef + +define Package/python3-voluptuous +$(call Package/python-voluptuous/Default) + DEPENDS:= \ + +PACKAGE_python3-voluptuous:python3-light + VARIANT:=python3 +endef + +define Package/python-voluptuous/description +It is primarily intended for validating data coming into Python as JSON, YAML, etc. +endef + +define Package/python3-voluptuous/description +$(call Package/python-voluptuous/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-voluptuous)) +$(eval $(call BuildPackage,python-voluptuous)) +$(eval $(call BuildPackage,python-voluptuous-src)) + +$(eval $(call Py3Package,python3-voluptuous)) +$(eval $(call BuildPackage,python3-voluptuous)) +$(eval $(call BuildPackage,python3-voluptuous-src)) diff --git a/openwrt/feeds/packages/lang/python/python-wcwidth/Makefile b/openwrt/feeds/packages/lang/python/python-wcwidth/Makefile new file mode 100644 index 00000000..3a4e102b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-wcwidth/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-wcwidth +PKG_VERSION:=0.1.7 +PKG_RELEASE:=1 + +PYPI_NAME:=wcwidth +PKG_HASH:=3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-wcwidth + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Terminal width calculation library + URL:=https://github.com/jquast/wcwidth + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-wcwidth/description + Python library that measures the width of unicode strings rendered to a terminal +endef + +$(eval $(call Py3Package,python3-wcwidth)) +$(eval $(call BuildPackage,python3-wcwidth)) +$(eval $(call BuildPackage,python3-wcwidth-src)) diff --git a/openwrt/feeds/packages/lang/python/python-yaml/Makefile b/openwrt/feeds/packages/lang/python/python-yaml/Makefile index c6314c8b..73a9e470 100644 --- a/openwrt/feeds/packages/lang/python/python-yaml/Makefile +++ b/openwrt/feeds/packages/lang/python/python-yaml/Makefile @@ -7,60 +7,65 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=PyYAML -PKG_VERSION:=3.12 +PKG_NAME:=python-yaml +PKG_VERSION:=5.1.2 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pyyaml.org/download/pyyaml/ -PKG_HASH:=592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab +PYPI_NAME:=PyYAML +PKG_HASH:=01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4 +PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) +include ../python-package.mk +include ../python3-package.mk define Package/python-yaml/Default - SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - URL:=http://pyyaml.org/wiki/PyYAML + SUBMENU:=Python + TITLE:=YAML parser and emitter for Python + URL:=https://github.com/yaml/pyyaml DEPENDS:=+libyaml endef define Package/python-yaml $(call Package/python-yaml/Default) - TITLE:=YAML parser and emitter for Python - DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs + DEPENDS+= \ + +PACKAGE_python-yaml:python-light \ + +PACKAGE_python-yaml:python-codecs VARIANT:=python endef define Package/python3-yaml $(call Package/python-yaml/Default) - TITLE:=YAML parser and emitter for Python3 DEPENDS+=+PACKAGE_python3-yaml:python3-light VARIANT:=python3 endef -define PyBuild/Compile - $(call Build/Compile/PyMod,,\ - --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \ - ) +define Package/python-yaml/description + PyYAML is a YAML parser and emitter for the Python programming language. endef -define Py3Build/Compile - $(call Build/Compile/Py3Mod,,\ - --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \ - ) +define Package/python3-yaml/description +$(call Package/python-yaml/description) +. +(Variant for Python3) endef +PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml +PYTHON_PKG_SETUP_ARGS:= +PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml +PYTHON3_PKG_SETUP_ARGS:= + $(eval $(call PyPackage,python-yaml)) $(eval $(call BuildPackage,python-yaml)) +$(eval $(call BuildPackage,python-yaml-src)) + $(eval $(call Py3Package,python3-yaml)) $(eval $(call BuildPackage,python3-yaml)) +$(eval $(call BuildPackage,python3-yaml-src)) diff --git a/openwrt/feeds/packages/lang/python/python-yarl/Makefile b/openwrt/feeds/packages/lang/python/python-yarl/Makefile new file mode 100644 index 00000000..08ac4382 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-yarl/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=yarl +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-yarl + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Yet another URL library + URL:=https://github.com/aio-libs/yarl + DEPENDS:= \ + +python3-light \ + +python3-multidict \ + +python3-urllib \ + +python3-idna + VARIANT:=python3 +endef + +define Package/python3-yarl/description +Yet another URL library +endef + +$(eval $(call Py3Package,python3-yarl)) +$(eval $(call BuildPackage,python3-yarl)) +$(eval $(call BuildPackage,python3-yarl-src)) diff --git a/openwrt/feeds/packages/lang/python/python-zeroconf/Makefile b/openwrt/feeds/packages/lang/python/python-zeroconf/Makefile new file mode 100644 index 00000000..55ad9d1a --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-zeroconf/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-zeroconf +PKG_VERSION:=0.23.0 +PKG_RELEASE:=1 + +PYPI_NAME:=zeroconf +PKG_HASH:=e0c333b967c48f8b2e5cc94a1d4d28893023fb06dfd797ee384a94cdd1d0eef5 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=COPYING + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-zeroconf + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Multicast DNS Service Discovery Library + URL:=https://github.com/jstasiak/python-zeroconf + DEPENDS:= \ + +python3-light \ + +python3-logging \ + +python3-ifaddr + VARIANT:=python3 +endef + +define Package/python3-zeroconf/description + Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) +endef + +$(eval $(call Py3Package,python3-zeroconf)) +$(eval $(call BuildPackage,python3-zeroconf)) +$(eval $(call BuildPackage,python3-zeroconf-src)) diff --git a/openwrt/feeds/packages/lang/python/python-zipp/Makefile b/openwrt/feeds/packages/lang/python/python-zipp/Makefile new file mode 100644 index 00000000..69a7ebed --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-zipp/Makefile @@ -0,0 +1,36 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-zipp +PKG_VERSION:=0.6.0 +PKG_RELEASE:=2 + +PYPI_NAME:=zipp +PKG_HASH:=3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e + +PKG_MAINTAINER:=Paul Spooren , Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-zipp + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Zipfile object wrapper + URL:=https://github.com/jaraco/zipp + DEPENDS:=+python3-light +python3-more-itertools + VARIANT:=python3 +endef + +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + +define Package/python3-zipp/description + Backport of pathlib-compatible object wrapper for zip files +endef + +$(eval $(call Py3Package,python3-zipp)) +$(eval $(call BuildPackage,python3-zipp)) +$(eval $(call BuildPackage,python3-zipp-src)) diff --git a/openwrt/feeds/packages/lang/python/python-zope-interface/Makefile b/openwrt/feeds/packages/lang/python/python-zope-interface/Makefile new file mode 100644 index 00000000..9c8d4425 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-zope-interface/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2011, 2015-2018 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-zope-interface +PKG_VERSION:=4.7.1 +PKG_RELEASE:=1 + +PYPI_NAME:=zope.interface +PKG_HASH:=4bb937e998be9d5e345f486693e477ba79e4344674484001a0b646be1d530487 + +PKG_LICENSE:=ZPL-2.1 +PKG_LICENSE_FILES:=LICENSE.txt +PKG_MAINTAINER:=Jeffery To + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-zope-interface/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Interfaces for Python + URL:=https://github.com/zopefoundation/zope.interface +endef + +define Package/python-zope-interface +$(call Package/python-zope-interface/Default) + DEPENDS:=+PACKAGE_python-zope-interface:python-light + VARIANT:=python +endef + +define Package/python3-zope-interface +$(call Package/python-zope-interface/Default) + DEPENDS:=+PACKAGE_python3-zope-interface:python3-light + VARIANT:=python3 +endef + +define Package/python-zope-interface/description +This package provides an implementation of "object interfaces" for +Python. Interfaces are a mechanism for labeling objects as conforming to +a given API or contract. So, this package can be considered as +implementation of the Design By Contract methodology support in Python. +endef + +define Package/python3-zope-interface/description +$(call Package/python-zope-interface/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-zope-interface)) +$(eval $(call BuildPackage,python-zope-interface)) +$(eval $(call BuildPackage,python-zope-interface-src)) + +$(eval $(call Py3Package,python3-zope-interface)) +$(eval $(call BuildPackage,python3-zope-interface)) +$(eval $(call BuildPackage,python3-zope-interface-src)) diff --git a/openwrt/feeds/packages/lang/python/python-zope-interface/patches/001-omit-tests.patch b/openwrt/feeds/packages/lang/python/python-zope-interface/patches/001-omit-tests.patch new file mode 100644 index 00000000..b19f2e25 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python-zope-interface/patches/001-omit-tests.patch @@ -0,0 +1,19 @@ +--- a/setup.py ++++ b/setup.py +@@ -124,7 +124,7 @@ setup(name='zope.interface', + "Framework :: Zope :: 3", + "Topic :: Software Development :: Libraries :: Python Modules", + ], +- packages=find_packages('src'), ++ packages=find_packages('src', exclude=["*.tests", "*.tests.*"]), + package_dir={'': 'src'}, + namespace_packages=["zope"], + cmdclass={ +@@ -132,6 +132,7 @@ setup(name='zope.interface', + }, + test_suite='zope.interface.tests', + include_package_data=True, ++ exclude_package_data={'':['tests/*']}, + zip_safe=False, + tests_require=tests_require, + install_requires=['setuptools'], diff --git a/openwrt/feeds/packages/lang/python/python/Config-python-light.in b/openwrt/feeds/packages/lang/python/python/Config-python-light.in index 437d936d..c6c20416 100644 --- a/openwrt/feeds/packages/lang/python/python/Config-python-light.in +++ b/openwrt/feeds/packages/lang/python/python/Config-python-light.in @@ -1,7 +1,7 @@ menu "Configuration" config PYTHON_BLUETOOTH_SUPPORT - bool "Enable Bluetooth support" - default n + bool "Enable Bluetooth support" + default n -endmenu \ No newline at end of file +endmenu diff --git a/openwrt/feeds/packages/lang/python/python/Makefile b/openwrt/feeds/packages/lang/python/python/Makefile index 3a1c8377..599bb7a8 100644 --- a/openwrt/feeds/packages/lang/python/python/Makefile +++ b/openwrt/feeds/packages/lang/python/python/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk # For PYTHON_VERSION -include ./files/python-version.mk +include ../python-version.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) @@ -25,10 +25,10 @@ PKG_CPE_ID:=cpe:/a:python:python PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To # This file provides the necsessary host build variables -include ./files/python-host.mk +include ../python-host.mk # For PyPackage -include ./files/python-package.mk +include ../python-package.mk PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/openwrt/feeds/packages/lang/python/python/files/python-config.in b/openwrt/feeds/packages/lang/python/python/files/python-config.in index 6eae20d0..c4a9c27a 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-config.in +++ b/openwrt/feeds/packages/lang/python/python/files/python-config.in @@ -77,3 +77,4 @@ for opt in opt_flags: libs.extend(getvar('LINKFORSHARED').split()) #print ' '.join(libs) print ' '.join(libs).replace(host_prefix, target_prefix) + diff --git a/openwrt/feeds/packages/lang/python/python/files/python-package-pip.mk b/openwrt/feeds/packages/lang/python/python/files/python-package-pip.mk index a3934cc1..0a8b69a6 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-package-pip.mk +++ b/openwrt/feeds/packages/lang/python/python/files/python-package-pip.mk @@ -8,17 +8,19 @@ define Package/python-pip $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) pip module - VERSION:=$(PYTHON_PIP_VERSION) + VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE.txt +# CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan DEPENDS:=+python +python-setuptools +python-pip-conf endef define PyPackage/python-pip/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages - # Adjust shebang to proper python location on target - sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/* - $(CP) $(PKG_BUILD_DIR)/install-pip/bin/* $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/* $(1)/usr/bin $(CP) \ - $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip-$(PYTHON_PIP_VERSION).dist-info \ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/ endef diff --git a/openwrt/feeds/packages/lang/python/python/files/python-package-pkg-resources.mk b/openwrt/feeds/packages/lang/python/python/files/python-package-pkg-resources.mk new file mode 100644 index 00000000..f0e819b5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python/files/python-package-pkg-resources.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2019 Alexandru Ardelean +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Package/python-pkg-resources +$(call Package/python/Default) + TITLE:=Python $(PYTHON_VERSION) pkg_resources module (part of etuptools) + VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE +# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan + DEPENDS:=+python +endef + +define PyPackage/python-pkg-resources/install + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages + $(CP) \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \ + $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages +endef + +$(eval $(call PyBasePackage,python-pkg-resources, \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ +)) diff --git a/openwrt/feeds/packages/lang/python/python/files/python-package-setuptools.mk b/openwrt/feeds/packages/lang/python/python/files/python-package-setuptools.mk index c35fad8c..305a515b 100644 --- a/openwrt/feeds/packages/lang/python/python/files/python-package-setuptools.mk +++ b/openwrt/feeds/packages/lang/python/python/files/python-package-setuptools.mk @@ -8,19 +8,20 @@ define Package/python-setuptools $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) setuptools module - VERSION:=$(PYTHON_SETUPTOOLS_VERSION) - DEPENDS:=+python + VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE +# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan + DEPENDS:=+python +python-pkg-resources endef define PyPackage/python-setuptools/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages - # Adjust shebang to proper python location on target - sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/* - $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/* $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin $(CP) \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages endef diff --git a/openwrt/feeds/packages/lang/python/python/patches-setuptools/002-sorted-requires.patch b/openwrt/feeds/packages/lang/python/python/patches-setuptools/002-sorted-requires.patch index df08bf30..2ad4795b 100644 --- a/openwrt/feeds/packages/lang/python/python/patches-setuptools/002-sorted-requires.patch +++ b/openwrt/feeds/packages/lang/python/python/patches-setuptools/002-sorted-requires.patch @@ -12,3 +12,5 @@ Index: b/setuptools/command/egg_info.py - lines = map(append_cr, lines) + lines = map(append_cr, sorted(lines)) stream.writelines(lines) + + diff --git a/openwrt/feeds/packages/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch b/openwrt/feeds/packages/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch index 272c0750..15f34dcd 100644 --- a/openwrt/feeds/packages/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch +++ b/openwrt/feeds/packages/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch @@ -10,3 +10,5 @@ https://sources.debian.org/patches/python-setuptools/40.8.0-1/PKG-INFO-output-re - for extra in self.provides_extras: + for extra in sorted(self.provides_extras): write_field('Provides-Extra', extra) + + diff --git a/openwrt/feeds/packages/lang/python/python/patches/001-enable-zlib.patch b/openwrt/feeds/packages/lang/python/python/patches/001-enable-zlib.patch index e85b53c8..5802e99f 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/001-enable-zlib.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/001-enable-zlib.patch @@ -17,4 +17,4 @@ Subject: [PATCH] enable zlib +zlib zlibmodule.c -lz # Interface to the Expat XML parser - # + # More information on Expat can be found at www.libexpat.org. diff --git a/openwrt/feeds/packages/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch b/openwrt/feeds/packages/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch index 0099abf7..da48819a 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -497,7 +497,8 @@ class PyBuildExt(build_ext): +@@ -543,7 +543,8 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr' \ diff --git a/openwrt/feeds/packages/lang/python/python/patches/003-do-not-compile-tests-at-build.patch b/openwrt/feeds/packages/lang/python/python/patches/003-do-not-compile-tests-at-build.patch index 6543bba7..6ea72a11 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/003-do-not-compile-tests-at-build.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/003-do-not-compile-tests-at-build.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1116,6 +1116,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL +@@ -1133,6 +1133,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL done; \ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt @@ -8,7 +8,7 @@ if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -@@ -1142,6 +1143,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL +@@ -1159,6 +1160,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt diff --git a/openwrt/feeds/packages/lang/python/python/patches/005-fix-bluetooth-support.patch b/openwrt/feeds/packages/lang/python/python/patches/005-fix-bluetooth-support.patch new file mode 100644 index 00000000..6448f63f --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python/patches/005-fix-bluetooth-support.patch @@ -0,0 +1,57 @@ +--- a/configure ++++ b/configure +@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/ + sys/termio.h sys/time.h \ + sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ + sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h ++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +@@ -7306,6 +7306,24 @@ fi + fi + + ++# bluetooth/bluetooth.h has been known to not compile with -std=c99. ++# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 ++SAVE_CFLAGS=$CFLAGS ++CFLAGS="-std=c99 $CFLAGS" ++for ac_header in bluetooth/bluetooth.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" ++if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_BLUETOOTH_BLUETOOTH_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++CFLAGS=$SAVE_CFLAGS ++ + # On Linux, netlink.h requires asm/types.h + for ac_header in linux/netlink.h + do : +--- a/configure.ac ++++ b/configure.ac +@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/ + sys/termio.h sys/time.h \ + sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ + sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) ++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) + AC_HEADER_DIRENT + AC_HEADER_MAJOR + ++# bluetooth/bluetooth.h has been known to not compile with -std=c99. ++# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 ++SAVE_CFLAGS=$CFLAGS ++CFLAGS="-std=c99 $CFLAGS" ++AC_CHECK_HEADERS(bluetooth/bluetooth.h) ++CFLAGS=$SAVE_CFLAGS ++ + # On Linux, netlink.h requires asm/types.h + AC_CHECK_HEADERS(linux/netlink.h,,,[ + #ifdef HAVE_ASM_TYPES_H diff --git a/openwrt/feeds/packages/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch b/openwrt/feeds/packages/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch index 01aa924a..806b7af3 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch @@ -1,14 +1,16 @@ -diff --git a/setup.py b/setup.py -index 1d1ae72..511aed5 100644 --- a/setup.py +++ b/setup.py -@@ -444,7 +444,8 @@ class PyBuildExt(build_ext): - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +@@ -500,13 +500,8 @@ class PyBuildExt(build_ext): + os.unlink(tmpfile) + + def detect_modules(self): +- # Ensure that /usr/local is always used +- if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') if cross_compiling: self.add_gcc_paths() - self.add_multiarch_paths() -+ else: -+ self.add_multiarch_paths() # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. diff --git a/openwrt/feeds/packages/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch b/openwrt/feeds/packages/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch index ffc80a41..a40aec8d 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -1083,6 +1083,7 @@ class PyBuildExt(build_ext): +@@ -1129,6 +1129,7 @@ class PyBuildExt(build_ext): if db_setup_debug: print "db lib: ", dblib, "not found" except db_found: @@ -8,7 +8,7 @@ if db_setup_debug: print "bsddb using BerkeleyDB lib:", db_ver, dblib print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir -@@ -1097,7 +1098,7 @@ class PyBuildExt(build_ext): +@@ -1143,7 +1144,7 @@ class PyBuildExt(build_ext): exts.append(Extension('_bsddb', ['_bsddb.c'], depends = ['bsddb.h'], library_dirs=dblib_dir, @@ -17,7 +17,7 @@ include_dirs=db_incs, libraries=dblibs)) else: -@@ -1308,10 +1309,11 @@ class PyBuildExt(build_ext): +@@ -1354,10 +1355,11 @@ class PyBuildExt(build_ext): break elif cand == "bdb": if db_incs is not None: diff --git a/openwrt/feeds/packages/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/openwrt/feeds/packages/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch index c319fd5f..925fa978 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -463,8 +463,9 @@ class PyBuildExt(build_ext): +@@ -509,8 +509,9 @@ class PyBuildExt(build_ext): # directly since an inconsistently reproducible issue comes up where # the environment variable is not set even though the value were passed # into configure and stored in the Makefile (issue found on OS X 10.3). diff --git a/openwrt/feeds/packages/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch b/openwrt/feeds/packages/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch new file mode 100644 index 00000000..f6891d73 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch @@ -0,0 +1,28 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -634,6 +634,16 @@ regen-all: regen-opcode-targets regen-gr + ############################################################################ + # Special rules for object files + ++DATE_FMT = %b %d %Y ++TIME_FMT = %H:%M:%S ++ifdef SOURCE_DATE_EPOCH ++ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)") ++ BUILD_TIME ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u "+$(TIME_FMT)") ++else ++ BUILD_DATE ?= $(shell date "+$(DATE_FMT)") ++ BUILD_TIME ?= $(shell date "+$(TIME_FMT)") ++endif ++ + Modules/getbuildinfo.o: $(PARSER_OBJS) \ + $(OBJECT_OBJS) \ + $(PYTHON_OBJS) \ +@@ -642,6 +652,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ + $(MODOBJS) \ + $(srcdir)/Modules/getbuildinfo.c + $(CC) -c $(PY_CFLAGS) \ ++ -DDATE="\"$(BUILD_DATE)\"" \ ++ -DTIME="\"$(BUILD_TIME)\"" \ + -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ + -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ + -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ diff --git a/openwrt/feeds/packages/lang/python/python/patches/021-compileall-add-recursion-option.patch b/openwrt/feeds/packages/lang/python/python/patches/021-compileall-add-recursion-option.patch index dbdb192d..4a0485e0 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/021-compileall-add-recursion-option.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/021-compileall-add-recursion-option.patch @@ -28,4 +28,4 @@ + if o == '-r': maxlevels = int(a) if o == '-d': ddir = a if o == '-f': force = 1 - if o == '-q': quiet = 1 \ No newline at end of file + if o == '-q': quiet = 1 diff --git a/openwrt/feeds/packages/lang/python/python/patches/024-musl-find_library.patch b/openwrt/feeds/packages/lang/python/python/patches/024-musl-find_library.patch index 3ec3ef70..70b51595 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/024-musl-find_library.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/024-musl-find_library.patch @@ -71,4 +71,4 @@ https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch + else: - def _findSoname_ldconfig(name): \ No newline at end of file + def _findSoname_ldconfig(name): diff --git a/openwrt/feeds/packages/lang/python/python/patches/025-utime.patch b/openwrt/feeds/packages/lang/python/python/patches/025-utime.patch index 5fb64b9e..20d0310d 100644 --- a/openwrt/feeds/packages/lang/python/python/patches/025-utime.patch +++ b/openwrt/feeds/packages/lang/python/python/patches/025-utime.patch @@ -8,4 +8,4 @@ + res = utimes(path, NULL); Py_END_ALLOW_THREADS } - else if (!PyTuple_Check(arg) || PyTuple_Size(arg) != 2) { \ No newline at end of file + else if (!PyTuple_Check(arg) || PyTuple_Size(arg) != 2) { diff --git a/openwrt/feeds/packages/lang/python/python3-bottle/Makefile b/openwrt/feeds/packages/lang/python/python3-bottle/Makefile index 93e959e4..5fc5bd0a 100644 --- a/openwrt/feeds/packages/lang/python/python3-bottle/Makefile +++ b/openwrt/feeds/packages/lang/python/python3-bottle/Makefile @@ -8,28 +8,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-bottle -PKG_VERSION:=0.12.12 +PKG_VERSION:=0.12.17 PKG_RELEASE:=1 -PKG_LICENSE:=MIT -PKG_MAINTAINER:=Luka Perkov +PYPI_NAME:=bottle +PKG_HASH:=e9eaa412a60cc3d42ceb42f58d15864d9ed1b92e9d630b8130c871c5bb16107c -PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/f7/dd/8ceaa148eeed5371a83fa1fb5a54b01dfc95000799c649924ece23f9f0e1/ -PKG_MD5SUM:=3d4b6b0e22f67b421c273105b30d9a21fd147eaf0c1576172378ee034fbf5313 -PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION) -PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:bottlepy:bottle +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -$(call include_mk, python3-package.mk) +include ../python3-package.mk define Package/python3-bottle SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - TITLE:=Bottle is a fast, simple and lightweight WSGI micro web-framework for Python - URL:=http://bottlepy.org + TITLE:=Fast and simple WSGI-framework for small web-applications + URL:=https://bottlepy.org DEPENDS:=+python3 + VARIANT:=python3 endef define Package/python3-bottle/description @@ -38,15 +39,6 @@ define Package/python3-bottle/description Python Standard Library. endef -define Build/Configure -endef - -define Build/Compile -endef - -define Package/python3-bottle/install - $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR) - $(CP) $(PKG_BUILD_DIR)/bottle.py $(1)$(PYTHON3_PKG_DIR) -endef - +$(eval $(call Py3Package,python3-bottle)) $(eval $(call BuildPackage,python3-bottle)) +$(eval $(call BuildPackage,python3-bottle-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-django-cors-headers/Makefile b/openwrt/feeds/packages/lang/python/python3-django-cors-headers/Makefile new file mode 100644 index 00000000..39194d7f --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-django-cors-headers/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-cors-headers +PKG_VERSION:=3.2.0 +PKG_RELEASE:=1 + +PYPI_NAME:=django-cors-headers +PKG_HASH:=84933651fbbde8f2bc084bef2f077b79db1ec1389432f21dd661eaae6b3d6a95 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Peter Stadler + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-django-cors-headers + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). + URL:=https://github.com/ottoyiu/django-cors-headers + DEPENDS:=python3-django +python3-urllib +python3-light + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-django-cors-headers/description + Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). +endef + +$(eval $(call Py3Package,python3-django-cors-headers)) +$(eval $(call BuildPackage,python3-django-cors-headers)) +$(eval $(call BuildPackage,python3-django-cors-headers-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-django-etesync-journal/Makefile b/openwrt/feeds/packages/lang/python/python3-django-etesync-journal/Makefile new file mode 100644 index 00000000..f331eca5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-django-etesync-journal/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-etesync-journal +PKG_VERSION:=1.0.3 +PKG_RELEASE:=1 + +PYPI_NAME:=django-etesync-journal +PKG_HASH:=a81674fab37913831c93107e3335030b0f8eeef074c0abb202aedc9b61a61bac + +PKG_LICENSE:=AGPL-3.0-only +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Peter Stadler + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-django-etesync-journal + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The server side implementation of the EteSync protocol. + URL:=https://www.etesync.com/ + DEPENDS:=python3-django +python3-django-restframework +python3-light + VARIANT:=python3 + MDEPENDS:=python3-django +endef + +define Package/python3-django-etesync-journal/description + The reusable django app that implements the server side of the EteSync protocol. +endef + +$(eval $(call Py3Package,python3-django-etesync-journal)) +$(eval $(call BuildPackage,python3-django-etesync-journal)) +$(eval $(call BuildPackage,python3-django-etesync-journal-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-drf-nested-routers/Makefile b/openwrt/feeds/packages/lang/python/python3-drf-nested-routers/Makefile new file mode 100644 index 00000000..9b7d02ce --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-drf-nested-routers/Makefile @@ -0,0 +1,39 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=drf-nested-routers +PKG_VERSION:=0.91 +PKG_RELEASE:=1 + +PYPI_NAME:=drf-nested-routers +PKG_HASH:=46e5c3abc15c782cafafd7d75028e8f9121bbc6228e3599bbb48a3daa4585034 + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Peter Stadler + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-drf-nested-routers + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Nested resources for the Django Rest Framework + URL:=https://github.com/alanjds/drf-nested-routers + DEPENDS:=+python3-django-restframework +python3-django +python3-light + VARIANT:=python3 +endef + +define Package/python3-drf-nested-routers/description + Nested resources for the Django Rest Framework +endef + +define Py3Package/python3-drf-nested-routers/filespec ++|$(PYTHON3_PKG_DIR) +-|$(PYTHON3_PKG_DIR)/rest_framework_nested/runtests +endef + +$(eval $(call Py3Package,python3-drf-nested-routers)) +$(eval $(call BuildPackage,python3-drf-nested-routers)) +$(eval $(call BuildPackage,python3-drf-nested-routers-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-flask-login/Makefile b/openwrt/feeds/packages/lang/python/python3-flask-login/Makefile new file mode 100644 index 00000000..7202bac0 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-flask-login/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=Flask-Login +PKG_VERSION:=0.4.1 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=c815c1ac7b3e35e2081685e389a665f2c74d7e077cb93cecabaea352da4752ec + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-flask-login + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=User session management plugin for Flask + URL:=https://github.com/maxcountryman/flask-login + DEPENDS:=+python3-light +python3-flask + VARIANT:=python3 +endef + +define Package/python3-flask-login/description + Flask-Login provides user session management for Flask. + It handles the common tasks of logging in, logging out, + and remembering your users’ sessions over extended periods of time. +endef + +$(eval $(call Py3Package,python3-flask-login)) +$(eval $(call BuildPackage,python3-flask-login)) +$(eval $(call BuildPackage,python3-flask-login-src)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-host.mk b/openwrt/feeds/packages/lang/python/python3-host.mk similarity index 66% rename from openwrt/feeds/packages/lang/python/python3/files/python3-host.mk rename to openwrt/feeds/packages/lang/python/python3-host.mk index 96bbc19c..403d0d28 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-host.mk +++ b/openwrt/feeds/packages/lang/python/python3-host.mk @@ -5,11 +5,15 @@ # See /LICENSE for more information. # +# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile +# if `python3-package.mk` is included, this will already be included + ifneq ($(__python3_host_mk_inc),1) __python3_host_mk_inc=1 # For PYTHON3_VERSION -$(call include_mk, python3-version.mk) +python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) +include $(python3_mk_path)python3-version.mk HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION) @@ -37,21 +41,26 @@ define HostPython3 $(HOST_PYTHON3_BIN) $(2); endef +define host_python3_settings + ARCH="$(HOST_ARCH)" \ + CC="$(HOSTCC)" \ + CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ + CXX="$(HOSTCXX)" \ + LD="$(HOSTCC)" \ + LDSHARED="$(HOSTCC) -shared" \ + CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ + LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ + _PYTHON_HOST_PLATFORM=linux2 +endef + # $(1) => commands to execute before running pythons script # $(2) => python script and its arguments # $(3) => additional variables define Build/Compile/HostPy3RunHost $(call HostPython3, \ $(if $(1),$(1);) \ - CC="$(HOSTCC)" \ - CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ - CXX="$(HOSTCXX)" \ - LD="$(HOSTCC)" \ - LDSHARED="$(HOSTCC) -shared" \ - CFLAGS="$(HOST_CFLAGS)" \ - CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ - LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ - _PYTHON_HOST_PLATFORM=linux2 \ + $(call host_python3_settings) \ $(3) \ , \ $(2) \ @@ -62,16 +71,15 @@ endef # Note: I shamelessly copied this from Yousong's logic (from python-packages); HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION) -define host_python3_pip_install - $(HOST_PYTHON3_PIP) install \ - --root=$(1) \ - --prefix=$(2) \ - --ignore-installed \ - $(3) -endef -define host_python3_pip_install_host -$(call host_python3_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1)) +# $(1) => packages to install +define Build/Compile/HostPy3PipInstall + $(call host_python3_settings) \ + $(HOST_PYTHON3_PIP) \ + --disable-pip-version-check \ + --cache-dir "$(DL_DIR)/pip-cache" \ + install \ + $(1) endef # $(1) => build subdir diff --git a/openwrt/feeds/packages/lang/python/python3-maxminddb/Makefile b/openwrt/feeds/packages/lang/python/python3-maxminddb/Makefile new file mode 100644 index 00000000..2aaeeec4 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-maxminddb/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=maxminddb +PKG_VERSION:=1.5.1 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=449a1713d37320d777d0db286286ab22890f0a176492ecf3ad8d9319108f2f79 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-maxminddb + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Reader for the MaxMind DB format + URL:=https://dev.maxmind.com/ + DEPENDS:=+python3-light +libmaxminddb + VARIANT:=python3 +endef + +define Package/python3-maxminddb/description + Module for reading MaxMind DB files +endef + +$(eval $(call Py3Package,python3-maxminddb)) +$(eval $(call BuildPackage,python3-maxminddb)) +$(eval $(call BuildPackage,python3-maxminddb-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-netifaces/Makefile b/openwrt/feeds/packages/lang/python/python3-netifaces/Makefile new file mode 100644 index 00000000..f126df49 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-netifaces/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python3-netifaces +PKG_VERSION:=0.10.9 +PKG_RELEASE:=1 + +PYPI_NAME:=netifaces +PKG_HASH:=2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-netifaces + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Portable network interface information + URL:=https://github.com/al45tair/netifaces + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python3-netifaces/description + Portable network interface information. +endef + +$(eval $(call Py3Package,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package.mk b/openwrt/feeds/packages/lang/python/python3-package.mk similarity index 73% rename from openwrt/feeds/packages/lang/python/python3/files/python3-package.mk rename to openwrt/feeds/packages/lang/python/python3-package.mk index 93b14fac..d20d1980 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-package.mk +++ b/openwrt/feeds/packages/lang/python/python3-package.mk @@ -5,7 +5,9 @@ # See /LICENSE for more information. # -$(call include_mk, python3-version.mk) +# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile +python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) +include $(python3_mk_path)python3-host.mk PYTHON3_DIR:=$(STAGING_DIR)/usr PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin @@ -32,12 +34,21 @@ ifdef CONFIG_USE_MIPS16 TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16 endif +define Py3Shebang +$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1) +endef + define Py3Package define Package/$(1)-src $(call Package/$(1)) + DEPENDS:= + CONFLICTS:= + PROVIDES:= + EXTRA_DEPENDS:= TITLE+= (sources) - DEPENDS:=$$$$(foreach dep,$$$$(filter +python3-%,$$$$(DEPENDS)),$$$$(dep)-src) + USERID:= + MENU:= endef define Package/$(1)-src/description @@ -65,23 +76,15 @@ define Py3Package $(call shexport,Py3Package/$(1)/filespec) define Package/$(1)/install - $(call Py3Package/$(1)/install,$$(1)) - find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f - if [ -e files/python3-package-install.sh ] ; then \ - $(SHELL) files/python3-package-install.sh \ - "$(PKG_INSTALL_DIR)" "$$(1)" \ - "$(HOST_PYTHON3_BIN)" "$$(2)" \ - "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" ; \ - elif [ -e $(STAGING_DIR)/mk/python3-package-install.sh ] ; then \ - $(SHELL) $(STAGING_DIR)/mk/python3-package-install.sh \ - "$(PKG_INSTALL_DIR)" "$$(1)" \ - "$(HOST_PYTHON3_BIN)" "$$(2)" \ - "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" ; \ - else \ - echo "No 'python3-package-install.sh' script found" ; \ - exit 1 ; \ + $$(call Py3Package/$(1)/install,$$(1)) + $(SHELL) $(python3_mk_path)python-package-install.sh "3" \ + "$(PKG_INSTALL_DIR)" "$$(1)" \ + "$(HOST_PYTHON3_BIN)" "$$(2)" \ + "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" && \ + if [ -d "$$(1)/usr/bin" ]; then \ + $(call Py3Shebang,$$(1)/usr/bin/*) ; \ fi - endef + endef define Package/$(1)-src/install $$(call Package/$(1)/install,$$(1),sources) @@ -89,8 +92,6 @@ define Py3Package endif # Package/$(1)/install endef -$(call include_mk, python3-host.mk) - # $(1) => commands to execute before running pythons script # $(2) => python script and its arguments # $(3) => additional variables @@ -122,16 +123,23 @@ define Build/Compile/Py3Mod cd $(PKG_BUILD_DIR)/$(strip $(1)), \ ./setup.py $(2), \ $(3)) - find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f endef +PYTHON3_PKG_SETUP_DIR ?= +PYTHON3_PKG_SETUP_GLOABL_ARGS ?= +PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed +PYTHON3_PKG_SETUP_VARS ?= + define Py3Build/Compile/Default - $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS), - $(call host_python3_pip_install_host,$(pkg)) + $(if $(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS), + $(call Build/Compile/HostPy3PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS)) ) - $(call Build/Compile/Py3Mod,, \ + $(call Build/Compile/Py3Mod, \ + $(PYTHON3_PKG_SETUP_DIR), \ + $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - --single-version-externally-managed \ + $(PYTHON3_PKG_SETUP_ARGS), \ + $(PYTHON3_PKG_SETUP_VARS) \ ) endef diff --git a/openwrt/feeds/packages/lang/python/python3-packages/Makefile b/openwrt/feeds/packages/lang/python/python3-packages/Makefile new file mode 100644 index 00000000..e3c8f622 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-packages/Makefile @@ -0,0 +1,134 @@ +# +# Copyright (C) 2019 Yousong Zhou +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python3-packages +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Yousong Zhou + +# +# NOTE: move the host module installation to Host/Compile when +# HOST_CONFIG_DEPENDS is supported +# +# NOTE: PKG_CONFIG_DEPENDS cannot correctly track changes of string type config +# options, so you may want to do manual cleanup on config change. +# +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_python3-packages-list-host \ + CONFIG_PACKAGE_python3-packages-list \ + CONFIG_PACKAGE_python3-packages-list-cleanup \ + CONFIG_PACKAGE_python3-packages-envs \ + CONFIG_PACKAGE_python3-packages-extra-deps \ + CONFIG_PACKAGE_python3-packages-index-url \ + CONFIG_PACKAGE_python3-packages-pip-opts \ + +PKG_BUILD_DEPENDS:=python3 python3/host + +include $(INCLUDE_DIR)/package.mk +include ../python3-host.mk +include ../python3-package.mk + +define Package/python3-packages + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=A dummy package for packaging python3 modules with pip + DEPENDS:=@DEVEL +python3 +endef + +define Package/python3-packages/config +if PACKAGE_python3-packages +config PACKAGE_python3-packages-list-host + string "List of python3 packages to install on host" +config PACKAGE_python3-packages-list + string "List of python3 packages to install on target" +config PACKAGE_python3-packages-list-cleanup + string "List of python3 packages to cleanup to avoid clash with existing packages" +config PACKAGE_python3-packages-envs + string "Extra environment variables to pass on to pip and its children on target build" +config PACKAGE_python3-packages-extra-deps + string "List of deps fulfilled but not tracked by the build system" +config PACKAGE_python3-packages-index-url + string "Index URL passed to pip with --index-url" +config PACKAGE_python3-packages-pip-opts + string "Additional arguments to pip command line" +endif +endef + +CONFIG_PACKAGE_python3-packages-list-host:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-host)) +CONFIG_PACKAGE_python3-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list)) +CONFIG_PACKAGE_python3-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-cleanup)) +CONFIG_PACKAGE_python3-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-envs)) +CONFIG_PACKAGE_python3-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-extra-deps)) +CONFIG_PACKAGE_python3-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-index-url)) +CONFIG_PACKAGE_python3-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-pip-opts)) + +decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10) +recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3)) +_req2dir1=$(subst >,gt,$(1)) +_req2dir2=$(subst <,lt,$(1)) +_req2dir3=$(subst >=,geq,$(1)) +_req2dir4=$(subst <=,leq,$(1)) +_req2dir5=$(subst ://,:::,$(1)) +_req2dir6=$(subst *,_,$(1)) +_req2dir7=$(subst ?,_,$(1)) +req2dir=$(call recur,_req2dir,7,$(1)) + +# --ignore-installed, it may happen that host pip will ignore target install if +# it was already installed as host module, e.g. cffi deps of cryptograph +# +# --no-build-isolation, this is a new addition in pip3 and is needed when build +# depends on host modules +HOST_PYTHON3_PIP_INSTALL=$(HOST_PYTHON3_PIP) install \ + --root=$(1) \ + --prefix=$(2) \ + --ignore-installed \ + --no-build-isolation \ + --no-compile \ + $(if $(CONFIG_PACKAGE_python3-packages-index-url), --index-url "$(CONFIG_PACKAGE_python3-packages-index-url)") \ + $(if $(CONFIG_PACKAGE_python3-packages-pip-opts), $(CONFIG_PACKAGE_python3-packages-pip-opts)) \ + +HOST_PYTHON3_PIP_INSTALL_HOST:=$(call HOST_PYTHON3_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"") +HOST_PYTHON3_PIP_INSTALL_TARGET=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr) +HOST_PYTHON3_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr) + +define Build/Compile + $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-host), + $(call Build/Compile/HostPy3RunHost,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg)) + ) + $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list), + $(call Build/Compile/HostPy3RunTarget,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) + ) + $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-cleanup), + $(call Build/Compile/HostPy3RunTarget,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) + ) +endef + +define Package/python3-packages/install + $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list), + $(CP) "$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg))"/* $(1) + ) + + find "$(PKG_INSTALL_DIR)/_cleanup" -mindepth 1 -depth | while read sf; do \ + tf="$$$${sf#$(PKG_INSTALL_DIR)/_cleanup/}"; \ + tf="$(1)/$$$$tf"; \ + if [ -f "$$$$tf" -o -L "$$$$tf" ]; then \ + rm -vf "$$$$tf"; \ + elif [ -d "$$$$tf" ]; then \ + rmdir -v -p "$$$$tf" || true; \ + fi \ + done +endef + +define Package/python3-packages/extra_provides + echo $(CONFIG_PACKAGE_python3-packages-extra-deps) | tr ' ' '\n' +endef + +$(eval $(call BuildPackage,python3-packages)) diff --git a/openwrt/feeds/packages/lang/python/python3-packages/README.md b/openwrt/feeds/packages/lang/python/python3-packages/README.md new file mode 100644 index 00000000..01508bc9 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-packages/README.md @@ -0,0 +1,72 @@ +This package allows users to package python3 modules without creating package +Makefiles for each individual module and their dependencies. It provides a +way making packaging python3 packages faster and may also facilitate the process +of developing Makefiles for new python3 packages + +This is a raw DEVEL only package. Using it may entails a lot of implementation +details and you may need to resolve target dependencies and package details on +your own + +- Third party python3 packages may depend on features not included in e.g. + python3-light +- Some python3 modules may require host install of another module to progress, + e.g. target cryptography requires host cffi +- Some python3 modules have external C library dependencies, e.g. pyOpenSSL + requires openssl libs +- Some packages may have an autoconf configure script whose arguments we + cannot control with pip and has to be passed on (hacked) by overriding some + environment variables + +## How it works + +1. Install host modules required for building target modules +2. Install each target module to separate directories +3. Install another copy of modules for cleanup purposes to make list of + installed files to be removed from target modules installed in step 2 + +Why should it be so + +1. Installing target cryptography requires host installation of cffi module +2. cryptography requires setuptools and pip will install its own copy with + --ignore-installed. When PACKAGE_python3-setuptools is also selected, opkg + will complain of data file clashes if it was not removed here. + +Pip will handle dependency requirements of python3 modules, but external +dependencies like c libraries has to be prepared by the build system. The +issue is that there is currently no way to express such dependencies, thus may +cause build failure, e.g. pycrypto requires the presence of libgmp to build +successfully. + +## Tips + +If something goes wrong, we can add additional arguments to pip command +line to check the detailed build process. Some useful arguments may be + +- -v, for verbose output. Repeat this option if the current level of + verbosity is not enough +- --no-clean, for preserving pip build dir on build failure + +## Examples + +tornado (python-only module) + + CONFIG_PACKAGE_python3-packages=y + CONFIG_PACKAGE_python3-packages-list="tornado==6.0.2" + +cryptography (requires installation of host modules and cleanup on target modules) + + CONFIG_PACKAGE_python3-packages=y + CONFIG_PACKAGE_python3-packages-list-host="cffi" + CONFIG_PACKAGE_python3-packages-list="cryptography" + CONFIG_PACKAGE_python3-packages-list-cleanup="setuptools" + +pycrypto 2.7a1 (python module with autoconf configure script; depends on +libgmp; broken wmmintrin.h). 2.6.1 does not work because of a flaw in +the setup.py hardcoding host include directory + + CONFIG_PACKAGE_libgmp=y + CONFIG_PACKAGE_python3-packages=y + CONFIG_PACKAGE_python3-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz" + CONFIG_PACKAGE_python3-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)" + CONFIG_PACKAGE_python3-packages-extra-deps="libgmp.so.10" + diff --git a/openwrt/feeds/packages/lang/python/python3-pyroute2/Makefile b/openwrt/feeds/packages/lang/python/python3-pyroute2/Makefile new file mode 100644 index 00000000..875fe0d0 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-pyroute2/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python3-pyroute2 +PKG_VERSION:=0.5.6 +PKG_RELEASE:=1 + +PYPI_NAME:=pyroute2 +PKG_HASH:=deae0e6191a04c3ee213c6fae6ed779602ef5da5ca5e2fa533f27bc04326bfbe + +PKG_MAINTAINER:=Martin Matějek +PKG_LICENSE:=GPL-2.0-or-later Apache-2.0 +PKG_LICENSE_FILES:=LICENSE.GPL.v2 LICENSE.Apache.v2 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pyroute2 + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python netlink library + URL:=https://github.com/svinota/pyroute2 + DEPENDS:= \ + +python3-light \ + +python3-distutils \ + +python3-logging \ + +python3-multiprocessing \ + +python3-sqlite3 \ + +python3-ctypes + VARIANT:=python3 +endef + +define Package/python3-pyroute2/description + Pyroute2 is a pure Python netlink library. + The library was started as an RTNL protocol implementation, + but now it supports many netlink protocols. +endef + +PYTHON3_PKG_SETUP_ARGS:= + +$(eval $(call Py3Package,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/python3-sqlparse/Makefile b/openwrt/feeds/packages/lang/python/python3-sqlparse/Makefile new file mode 100644 index 00000000..4df4dcd0 --- /dev/null +++ b/openwrt/feeds/packages/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 +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)) diff --git a/openwrt/feeds/packages/lang/python/python3-unidecode/Makefile b/openwrt/feeds/packages/lang/python/python3-unidecode/Makefile new file mode 100644 index 00000000..a1967f3e --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3-unidecode/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python3-unidecode +PKG_VERSION:=1.1.1 +PKG_RELEASE:=1 + +PYPI_NAME:=Unidecode +PKG_HASH:=2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-unidecode + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=ASCII transliterations of Unicode text + URL:=https://github.com/avian2/unidecode + DEPENDS:=+python3-light + VARIANT:=python3 +endef + +define Package/python-unidecode/description + Unidecode, lossy ASCII transliterations of Unicode text +endef + +$(eval $(call Py3Package,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME)-src)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-version.mk b/openwrt/feeds/packages/lang/python/python3-version.mk similarity index 62% rename from openwrt/feeds/packages/lang/python/python3/files/python3-version.mk rename to openwrt/feeds/packages/lang/python/python3-version.mk index e1129215..6a4e5e3b 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-version.mk +++ b/openwrt/feeds/packages/lang/python/python3-version.mk @@ -7,11 +7,13 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 -PYTHON3_VERSION_MINOR:=6 -PYTHON3_VERSION_MICRO:=2 +PYTHON3_VERSION_MINOR:=8 +PYTHON3_VERSION_MICRO:=0 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) -PYTHON3_SETUPTOOLS_VERSION:=28.8.0 -PYTHON3_PIP_VERSION:=9.0.1 +PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 +PYTHON3_PIP_PKG_RELEASE:=1 +PYTHON3_SETUPTOOLS_VERSION:=41.2.0 +PYTHON3_PIP_VERSION:=19.2.3 diff --git a/openwrt/feeds/packages/lang/python/python3/Config-python3-light.in b/openwrt/feeds/packages/lang/python/python3/Config-python3-light.in new file mode 100644 index 00000000..eb22262a --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/Config-python3-light.in @@ -0,0 +1,7 @@ +menu "Configuration" + +config PYTHON3_BLUETOOTH_SUPPORT + bool "Enable Bluetooth support" + default n + +endmenu diff --git a/openwrt/feeds/packages/lang/python/python3/Makefile b/openwrt/feeds/packages/lang/python/python3/Makefile index 7dba025e..809cda4d 100644 --- a/openwrt/feeds/packages/lang/python/python3/Makefile +++ b/openwrt/feeds/packages/lang/python/python3/Makefile @@ -8,30 +8,31 @@ include $(TOPDIR)/rules.mk # The file included below defines PYTHON_VERSION -include ./files/python3-version.mk +include ../python3-version.mk PYTHON_VERSION:=$(PYTHON3_VERSION) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PKG_NAME:=python3 -# XXX: reset PKG_RELEASE to 1 only if Python's pip & setuptools versions have also bumped; -# otherwise, keep bumping PKG_RELEASE -PKG_RELEASE:=5 +PKG_RELEASE:=2 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=9229773be41ed144370f47f0f626a1579931f5a390f1e8e3853174d52edd64a9 +PKG_HASH:=b356244e13fb5491da890b35b13b2118c3122977c2cd825e3eb6e7d462030d84 -PKG_LICENSE:=PSF -PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE +PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To +PKG_LICENSE:=Python/2.0 +PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING +PKG_CPE_ID:=cpe:/a:python:python # This file provides the necsessary host build variables -include ./files/python3-host.mk +include ../python3-host.mk # For Py3Package -include ./files/python3-package.mk +include ../python3-package.mk +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -39,7 +40,10 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) -PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_python3-pkg-resources \ + CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip \ + CONFIG_PYTHON3_BLUETOOTH_SUPPORT PKG_BUILD_DEPENDS:=python3/host HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host @@ -53,7 +57,6 @@ define Package/python3/Default CATEGORY:=Languages TITLE:=Python $(PYTHON_VERSION) programming language URL:=https://www.python.org/ - MAINTAINER:=Alexandru Ardelean endef define Package/python3/Default/description @@ -79,7 +82,11 @@ endef define Package/python3-light $(call Package/python3/Default) TITLE:=Python $(PYTHON_VERSION) light installation - DEPENDS:=+python3-base +libffi +libbz2 + DEPENDS:=+python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs +libuuid +endef + +define Package/python3-light/config + source "$(SOURCE)/Config-python3-light.in" endef define Package/python3-light/description @@ -105,6 +112,7 @@ define Py3BasePackage -|/usr/lib/python$(PYTHON_VERSION)/*/tests endif endef + Py3Package/$(1)/install?=: endef include ./files/python3-package-*.mk @@ -121,8 +129,7 @@ endef MAKE_FLAGS+=\ CROSS_COMPILE=yes \ - LD="$(TARGET_CC)" \ - PGEN=pgen3 + LD="$(TARGET_CC)" EXTRA_CFLAGS+= \ -DNDEBUG -fno-inline @@ -141,6 +148,10 @@ PYTHON_FOR_BUILD:= \ _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \ $(HOST_PYTHON3_BIN) +DISABLE_BLUETOOTH:= \ + ac_cv_header_bluetooth_bluetooth_h=no \ + ac_cv_header_bluetooth_h=no + CONFIGURE_ARGS+= \ --sysconfdir=/etc \ --enable-shared \ @@ -149,6 +160,7 @@ CONFIGURE_ARGS+= \ --with-system-ffi \ --with-ensurepip=no \ --without-pymalloc \ + $(if $(CONFIG_PYTHON3_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \ PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ $(ENABLE_IPV6) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ @@ -160,20 +172,38 @@ define Build/Prepare endef ifdef CONFIG_PACKAGE_python3-setuptools +PYTHON3_SETUPTOOLS_BUILD:=1 +endif + +ifdef CONFIG_PACKAGE_python3-pkg-resources +PYTHON3_SETUPTOOLS_BUILD:=1 +endif + +ifeq ($(PYTHON3_SETUPTOOLS_BUILD),1) define Build/Compile/python3-setuptools - $(STAGING_DIR_HOSTPKG)/bin/pip3 install \ + $(HOST_PYTHON3_PIP) \ + --disable-pip-version-check \ + --cache-dir "$(DL_DIR)/pip-cache" \ + install \ --ignore-installed \ - --root=$(PKG_BUILD_DIR)/install-setuptools --prefix=. \ - $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-*.whl + --root=$(PKG_BUILD_DIR)/install-setuptools \ + --prefix=/usr \ + $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py2.py3-none-any.whl + $(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-setuptools,) endef endif # CONFIG_PACKAGE_python3-setuptools ifdef CONFIG_PACKAGE_python3-pip define Build/Compile/python3-pip - $(STAGING_DIR_HOSTPKG)/bin/pip3 install \ + $(HOST_PYTHON3_PIP) \ + --disable-pip-version-check \ + --cache-dir "$(DL_DIR)/pip-cache" \ + install \ --ignore-installed \ - --root=$(PKG_BUILD_DIR)/install-pip --prefix=. \ - $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-*.whl + --root=$(PKG_BUILD_DIR)/install-pip \ + --prefix=/usr \ + $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py2.py3-none-any.whl + $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,) endef endif # CONFIG_PACKAGE_python3-pip @@ -185,18 +215,24 @@ define Build/Compile endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig + $(INSTALL_DIR) $(2)/bin $(CP) \ $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(1)/usr/include/ $(CP) \ - $(HOST_PYTHON3_LIB_DIR) \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ $(1)/usr/lib/ $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \ - $(1)/usr/lib/python$(PYTHON_VERSION)/ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \ + $(1)/usr/lib/pkgconfig + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \ + $(2)/bin/ + $(SED) \ + 's|^prefix_real=.*$$$$|prefix_real="$(PYTHON3_DIR)"|' \ + $(2)/bin/python$(PYTHON_VERSION)-config endef PYTHON3_BASE_LIB_FILES:= \ @@ -249,13 +285,25 @@ define Py3Package/python3-base/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/ endef +Py3Package/python3-light/install:=: +Py3Package/python3/install:=: + define Py3Package/python3/filespec -|$(PYTHON3_PKG_DIR) endef HOST_LDFLAGS += \ - -Wl,--no-as-needed -lrt \ - $$$$(pkg-config --static --libs libcrypto libssl) + -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib + +ifeq ($(HOST_OS),Linux) +HOST_LDFLAGS += \ + -Wl,--no-as-needed -lrt +endif + +ifeq ($(HOST_OS),Darwin) +HOST_CONFIGURE_VARS += \ + ac_cv_header_libintl_h=no +endif HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ @@ -264,31 +312,45 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON3_DIR) \ --exec-prefix=$(HOST_PYTHON3_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi=no \ - --with-ensurepip=install \ + --with-ensurepip=upgrade \ CONFIG_SITE= +define Host/Configure + $(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py + $(call Host/Configure/Default) +endef + define Host/Compile - +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen + +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods endef define Host/Install + $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),, + rm -rf \ + $(HOST_PYTHON3_PKG_DIR)/easy_install.py \ + $(HOST_PYTHON3_PKG_DIR)/pkg_resources \ + $(HOST_PYTHON3_PKG_DIR)/setuptools \ + $(HOST_PYTHON3_PKG_DIR)/setuptools-* \ + $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched* \ + $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_* + ) + $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),, + rm -rf \ + $(HOST_PYTHON3_PKG_DIR)/pip \ + $(HOST_PYTHON3_PKG_DIR)/pip-* \ + $(HOST_PYTHON3_PKG_DIR)/.pip-patched* \ + $(HOST_PYTHON3_PKG_DIR)/.pip_installed_* + ) $(MAKE) -C $(HOST_BUILD_DIR) install - - $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/ $(STAGING_DIR)/mk/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3 - - # Install these mk files in the Host/Install phase ; - # The Build/InstallDev rule is activated only for target builds. - # But if someone needs only the host Python, then - # these files need to be installed in this phase, and not Build/InstallDev - $(INSTALL_DATA) \ - ./files/python3-package.mk \ - ./files/python3-host.mk \ - ./files/python3-version.mk \ - ./files/python3-package-install.sh \ - $(STAGING_DIR)/mk/ + $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),, + $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,) + touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) + ) + $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),, + $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-pip,) + touch $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) + ) endef $(eval $(call HostBuild)) @@ -309,4 +371,3 @@ $(eval $(call BuildPackage,python3)) $(eval $(call BuildPackage,python3-base-src)) $(eval $(call BuildPackage,python3-light-src)) -$(eval $(call BuildPackage,python3-src)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/config.site b/openwrt/feeds/packages/lang/python/python3/files/config.site index cfa56b89..65c2d958 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/config.site +++ b/openwrt/feeds/packages/lang/python/python3/files/config.site @@ -9,4 +9,5 @@ ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no ac_cv_buggy_getaddrinfo=no +ac_cv_header_uuid_h=yes diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-cgi.mk b/openwrt/feeds/packages/lang/python/python3/files/python3-package-cgi.mk new file mode 100644 index 00000000..165800a1 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/files/python3-package-cgi.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2006-2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Package/python3-cgi +$(call Package/python3/Default) + TITLE:=Python $(PYTHON3_VERSION) cgi module + DEPENDS:=+python3-light +python3-email +endef + +define Package/python3-cgitb +$(call Package/python3/Default) + TITLE:=Python $(PYTHON3_VERSION) cgitb module + DEPENDS:=+python3-light +python3-cgi +python3-pydoc +endef + + +$(eval $(call Py3BasePackage,python3-cgi, \ + /usr/lib/python$(PYTHON3_VERSION)/cgi.py \ +)) + +$(eval $(call Py3BasePackage,python3-cgitb, \ + /usr/lib/python$(PYTHON3_VERSION)/cgitb.py \ +)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-install.sh b/openwrt/feeds/packages/lang/python/python3/files/python3-package-install.sh deleted file mode 100644 index dd1e708f..00000000 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-package-install.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -set -e - -process_filespec() { - local src_dir="$1" - local dst_dir="$2" - local filespec="$3" - echo "$filespec" | ( - IFS='|' - while read fop fspec fperm; do - local fop=`echo "$fop" | tr -d ' \t\n'` - if [ "$fop" = "+" ]; then - if [ ! -e "${src_dir}${fspec}" ]; then - echo "File not found '${src_dir}${fspec}'" - exit 1 - fi - dpath=`dirname "$fspec"` - if [ -z "$fperm" ]; then - dperm=`stat -c "%a" ${src_dir}${dpath}` - fi - mkdir -p -m$dperm ${dst_dir}${dpath} - echo "copying: '$fspec'" - cp -fpR ${src_dir}${fspec} ${dst_dir}${dpath}/ - if [ -n "$fperm" ]; then - chmod -R $fperm ${dst_dir}${fspec} - fi - elif [ "$fop" = "-" ]; then - echo "removing: '$fspec'" - rm -fR ${dst_dir}${fspec} - elif [ "$fop" = "=" ]; then - echo "setting permissions: '$fperm' on '$fspec'" - chmod -R $fperm ${dst_dir}${fspec} - fi - done - ) -} - -src_dir="$1" -dst_dir="$2" -python="$3" -mode="$4" -filespec="$5" - -process_filespec "$src_dir" "$dst_dir" "$filespec" || { - echo "process filespec error-ed" - exit 1 -} - -# delete egg-info directories -find "$dst_dir" -name "*.egg-info" | xargs rm -rf - -if [ "$mode" == "sources" ] ; then - # Copy only python source files - find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f - - # Delete empty folders (if the case) - if [ -d "$dst_dir/usr" ] ; then - find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty - rmdir --ignore-fail-on-non-empty $dst_dir/usr - fi - exit 0 -fi - -# XXX [So that you won't goof as I did] -# Note: Yes, I tried to use the -O & -OO flags here. -# However the generated byte-codes were not portable. -# So, we just stuck to un-optimized byte-codes, -# which is still way better/faster than running -# Python sources all the time. -$python -m compileall -b -d '/' $dst_dir || { - echo "python -m compileall err-ed" - exit 1 -} - -# Delete source files and pyc [ un-optimized bytecode files ] -# We may want to make this optimization thing configurable later, but not sure atm -find $dst_dir -type f -name "*\.py" | xargs rm -f - -# Delete empty folders (if the case) -if [ -d "$dst_dir/usr" ] ; then - find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty - rmdir --ignore-fail-on-non-empty $dst_dir/usr -fi - -exit 0 diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-pip.mk b/openwrt/feeds/packages/lang/python/python3/files/python3-package-pip.mk index ff9b5ac7..a27d40a4 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-package-pip.mk +++ b/openwrt/feeds/packages/lang/python/python3/files/python3-package-pip.mk @@ -8,19 +8,22 @@ define Package/python3-pip $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) pip module - VERSION:=$(PYTHON3_PIP_VERSION) + VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE.txt +# CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan DEPENDS:=+python3 +python3-setuptools +python-pip-conf endef -define Package/python3-pip/install +define Py3Package/python3-pip/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages - # Adjust shebang to proper python location on target - sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/* - $(CP) $(PKG_BUILD_DIR)/install-pip/bin/pip3* $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip3* $(1)/usr/bin $(CP) \ - $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ - find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete endef $(eval $(call Py3BasePackage,python3-pip, \ diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-pkg-resources.mk b/openwrt/feeds/packages/lang/python/python3/files/python3-package-pkg-resources.mk new file mode 100644 index 00000000..592fe2c8 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/files/python3-package-pkg-resources.mk @@ -0,0 +1,30 @@ +# +# Copyright (C) 2019 Alexandru Ardelean +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Package/python3-pkg-resources +$(call Package/python3/Default) + TITLE:=Python $(PYTHON3_VERSION) pkg_resources module (part of setuptools) + VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE +# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan + DEPENDS:=+python3 +endef + +define Py3Package/python3-pkg-resources/install + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages + $(CP) \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete +endef + +$(eval $(call Py3BasePackage,python3-pkg-resources, \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ +)) diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-setuptools.mk b/openwrt/feeds/packages/lang/python/python3/files/python3-package-setuptools.mk index 684d3e64..64a86b81 100644 --- a/openwrt/feeds/packages/lang/python/python3/files/python3-package-setuptools.mk +++ b/openwrt/feeds/packages/lang/python/python3/files/python3-package-setuptools.mk @@ -8,22 +8,24 @@ define Package/python3-setuptools $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) setuptools module - VERSION:=$(PYTHON3_SETUPTOOLS_VERSION) - DEPENDS:=+python3 + VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) + LICENSE:=MIT + LICENSE_FILES:=LICENSE +# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan + DEPENDS:=+python3 +python3-pkg-resources endef define Py3Package/python3-setuptools/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages - # Adjust shebang to proper python location on target - sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/* - $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/easy_install-* $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3 $(CP) \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \ - $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \ + $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages - find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete + find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete endef $(eval $(call Py3BasePackage,python3-setuptools, \ diff --git a/openwrt/feeds/packages/lang/python/python3/files/python3-package-urllib.mk b/openwrt/feeds/packages/lang/python/python3/files/python3-package-urllib.mk new file mode 100644 index 00000000..ddd7b1db --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/files/python3-package-urllib.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2019 Alexandru Ardelean +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Package/python3-urllib +$(call Package/python3/Default) + TITLE:=Python $(PYTHON3_VERSION) URL library module + DEPENDS:=+python3-light +python3-email +endef + +$(eval $(call Py3BasePackage,python3-urllib, \ + /usr/lib/python$(PYTHON3_VERSION)/urllib \ +)) diff --git a/openwrt/feeds/packages/lang/python/python3/patches-setuptools/001-reproducible.patch b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/001-reproducible.patch new file mode 100644 index 00000000..32edc568 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/001-reproducible.patch @@ -0,0 +1,16 @@ +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848136 +https://sources.debian.org/patches/python-setuptools/40.8.0-1/reproducible.diff/ + +Index: b/setuptools/command/easy_install.py +=================================================================== +--- a/setuptools/command/easy_install.py ++++ b/setuptools/command/easy_install.py +@@ -436,7 +436,7 @@ consider to install to another location, + for spec in self.args: + self.easy_install(spec, not self.no_deps) + if self.record: +- outputs = self.outputs ++ outputs = list(sorted(self.outputs)) + if self.root: # strip any package prefix + root_len = len(self.root) + for counter in range(len(outputs)): diff --git a/openwrt/feeds/packages/lang/python/python3/patches-setuptools/002-sorted-requires.patch b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/002-sorted-requires.patch new file mode 100644 index 00000000..2ad4795b --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/002-sorted-requires.patch @@ -0,0 +1,16 @@ +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804249 +https://sources.debian.org/patches/python-setuptools/40.8.0-1/sorted-requires.diff/ + +Index: b/setuptools/command/egg_info.py +=================================================================== +--- a/setuptools/command/egg_info.py ++++ b/setuptools/command/egg_info.py +@@ -621,7 +621,7 @@ def warn_depends_obsolete(cmd, basename, + def _write_requirements(stream, reqs): + lines = yield_lines(reqs or ()) + append_cr = lambda line: line + '\n' +- lines = map(append_cr, lines) ++ lines = map(append_cr, sorted(lines)) + stream.writelines(lines) + + diff --git a/openwrt/feeds/packages/lang/python/python3/patches-setuptools/003-PKG-INFO-output-reproducible.patch b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/003-PKG-INFO-output-reproducible.patch new file mode 100644 index 00000000..15f34dcd --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches-setuptools/003-PKG-INFO-output-reproducible.patch @@ -0,0 +1,14 @@ +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894215 +https://sources.debian.org/patches/python-setuptools/40.8.0-1/PKG-INFO-output-reproducible.diff/ + +--- a/setuptools/dist.py ++++ b/setuptools/dist.py +@@ -191,7 +191,7 @@ def write_pkg_file(self, file): + self.long_description_content_type + ) + if self.provides_extras: +- for extra in self.provides_extras: ++ for extra in sorted(self.provides_extras): + write_field('Provides-Extra', extra) + + diff --git a/openwrt/feeds/packages/lang/python/python3/patches/001-enable-zlib.patch b/openwrt/feeds/packages/lang/python/python3/patches/001-enable-zlib.patch index 14d98ceb..9a93eb26 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/001-enable-zlib.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/001-enable-zlib.patch @@ -1,15 +1,6 @@ -From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Thu, 25 Sep 2014 18:18:29 +0300 -Subject: [PATCH] enable zlib - ---- - Modules/Setup.dist | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/Modules/Setup.dist -+++ b/Modules/Setup.dist -@@ -362,7 +362,7 @@ _symtable symtablemodule.c +--- a/Modules/Setup ++++ b/Modules/Setup +@@ -334,7 +334,7 @@ _symtable symtablemodule.c # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.gzip.org/zlib/ @@ -17,4 +8,4 @@ Subject: [PATCH] enable zlib +zlib zlibmodule.c -lz # Interface to the Expat XML parser - # + # More information on Expat can be found at www.libexpat.org. diff --git a/openwrt/feeds/packages/lang/python/python3/patches/002-fix-blake2-detection.patch b/openwrt/feeds/packages/lang/python/python3/patches/002-fix-blake2-detection.patch new file mode 100644 index 00000000..88916af0 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches/002-fix-blake2-detection.patch @@ -0,0 +1,11 @@ +--- a/Modules/_hashopenssl.c ++++ b/Modules/_hashopenssl.c +@@ -42,7 +42,7 @@ + #define PY_OPENSSL_HAS_SHAKE 1 + #endif + +-#ifdef NID_blake2b512 ++#if defined(NID_blake2b512) && !defined(OPENSSL_NO_BLAKE2) + #define PY_OPENSSL_HAS_BLAKE2 1 + #endif + diff --git a/openwrt/feeds/packages/lang/python/python3/patches/003-do-not-run-distutils-tests.patch b/openwrt/feeds/packages/lang/python/python3/patches/003-do-not-run-distutils-tests.patch index 7e7b2522..4784ba22 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/003-do-not-run-distutils-tests.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/003-do-not-run-distutils-tests.patch @@ -1,44 +1,18 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1307,41 +1307,6 @@ libinstall: build_all $(srcdir)/Modules/ +@@ -1451,6 +1451,7 @@ libinstall: build_all $(srcdir)/Modules/ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ -- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ -- $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -- fi -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt ++ifeq (@COMPILE_ALL_TESTS@,yes) + if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ +@@ -1486,6 +1487,7 @@ libinstall: build_all $(srcdir)/Modules/ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt ++endif - python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh - # Substitution happens here, as the completely-expanded BINDIR + # bpo-21536: Misc/python-config.sh is generated in the build directory + # from $(srcdir)Misc/python-config.sh.in. diff --git a/openwrt/feeds/packages/lang/python/python3/patches/004-do-not-write-bytes-codes.patch b/openwrt/feeds/packages/lang/python/python3/patches/004-do-not-write-bytes-codes.patch index 558ee4a1..a67f5533 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/004-do-not-write-bytes-codes.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/004-do-not-write-bytes-codes.patch @@ -1,20 +1,11 @@ ---- a/Python/pylifecycle.c -+++ b/Python/pylifecycle.c -@@ -88,7 +88,7 @@ int Py_BytesWarningFlag; /* Warn on str( - int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ - int Py_FrozenFlag; /* Needed by getpath.c */ - int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */ --int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.pyc) */ +--- a/Python/initconfig.c ++++ b/Python/initconfig.c +@@ -120,7 +120,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo + int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ + int Py_FrozenFlag = 0; /* Needed by getpath.c */ + int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */ +-int Py_DontWriteBytecodeFlag = 0; /* Suppress writing bytecode files (*.pyc) */ +int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.pyc) */ int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ -@@ -329,7 +329,7 @@ _Py_InitializeEx_Private(int install_sig - if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') - Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); - if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') -- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); -+ Py_DontWriteBytecodeFlag = atoi(p); - /* The variable is only tested for existence here; _PyRandom_Init will - check its value further. */ - if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') diff --git a/openwrt/feeds/packages/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch b/openwrt/feeds/packages/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch new file mode 100644 index 00000000..16ef86ab --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -654,7 +654,8 @@ class PyBuildExt(build_ext): + # only change this for cross builds for 3.3, issues on Mageia + if CROSS_COMPILING: + self.add_cross_compiling_paths() +- self.add_multiarch_paths() ++ else: ++ self.add_multiarch_paths() + self.add_ldflags_cppflags() + + def init_inc_lib_dirs(self): diff --git a/openwrt/feeds/packages/lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch b/openwrt/feeds/packages/lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch deleted file mode 100644 index 903e35d8..00000000 --- a/openwrt/feeds/packages/lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -487,16 +487,9 @@ class PyBuildExt(build_ext): - return ['m'] - - def detect_modules(self): -- # Ensure that /usr/local is always used, but the local build -- # directories (i.e. '.' and 'Include') must be first. See issue -- # 10520. -- if not cross_compiling: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia - if cross_compiling: - self.add_gcc_paths() -- self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. diff --git a/openwrt/feeds/packages/lang/python/python3/patches/008-distutils-use-python-sysroot.patch b/openwrt/feeds/packages/lang/python/python3/patches/008-distutils-use-python-sysroot.patch new file mode 100644 index 00000000..751f9d79 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches/008-distutils-use-python-sysroot.patch @@ -0,0 +1,60 @@ +From e359a7a3c4f9e70360a068bef19c95938fdacede Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:33:14 +0100 +Subject: [PATCH] Adjust library/header paths for cross-compilation + +When cross-compiling third-party extensions, the get_python_inc() or +get_python_lib() can be called, to return the path to headers or +libraries. However, they use the sys.prefix of the host Python, which +returns incorrect paths when cross-compiling (paths pointing to host +headers and libraries). + +In order to fix this, we introduce the _python_sysroot, _python_prefix +and _python_exec_prefix variables, that allow to override these +values, and get correct header/library paths when cross-compiling +third-party Python modules. + +Signed-off-by: Thomas Petazzoni +--- + Lib/distutils/command/build_ext.py | 5 ++++- + Lib/distutils/sysconfig.py | 15 +++++++++++---- + 2 files changed, 15 insertions(+), 5 deletions(-) + +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -234,7 +234,10 @@ class build_ext(Command): + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): + if not sysconfig.python_build: + # building third party extensions +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if "_python_sysroot" in os.environ: ++ libdir = os.environ.get("_python_sysroot") + libdir ++ self.library_dirs.append(libdir) + else: + # building python standard extensions + self.library_dirs.append('.') +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -18,10 +18,17 @@ from .errors import DistutilsPlatformErr + from .util import get_platform, get_host_platform + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +-BASE_PREFIX = os.path.normpath(sys.base_prefix) +-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) ++if "_python_sysroot" in os.environ: ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ BASE_PREFIX = PREFIX ++ BASE_EXEC_PREFIX = EXEC_PREFIX ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++ BASE_PREFIX = os.path.normpath(sys.base_prefix) ++ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCbuild/win32 or project/PCbuild/amd64. diff --git a/openwrt/feeds/packages/lang/python/python3/patches/008-fix-distutils-path-creation.patch b/openwrt/feeds/packages/lang/python/python3/patches/008-fix-distutils-path-creation.patch deleted file mode 100644 index 796c1a2e..00000000 --- a/openwrt/feeds/packages/lang/python/python3/patches/008-fix-distutils-path-creation.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/Lib/imp.py -+++ b/Lib/imp.py -@@ -203,8 +203,9 @@ def load_package(name, path): - extensions = (machinery.SOURCE_SUFFIXES[:] + - machinery.BYTECODE_SUFFIXES[:]) - for extension in extensions: -- path = os.path.join(path, '__init__'+extension) -- if os.path.exists(path): -+ init_path = os.path.join(path, '__init__'+extension) -+ if os.path.exists(init_path): -+ path = init_path - break - else: - raise ValueError('{!r} is not a package'.format(path)) diff --git a/openwrt/feeds/packages/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/openwrt/feeds/packages/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch index e593a1b7..b3da28a6 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch @@ -1,10 +1,10 @@ --- a/setup.py +++ b/setup.py -@@ -497,8 +497,9 @@ class PyBuildExt(build_ext): +@@ -631,8 +631,9 @@ class PyBuildExt(build_ext): # directly since an inconsistently reproducible issue comes up where # the environment variable is not set even though the value were passed # into configure and stored in the Makefile (issue found on OS X 10.3). -+ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs ++ rt_lib_dirs = [] if CROSS_COMPILING else self.compiler.runtime_library_dirs for env_var, arg_name, dir_list in ( - ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), + ('LDFLAGS', '-R', rt_lib_dirs), diff --git a/openwrt/feeds/packages/lang/python/python3/patches/011-fix-ncursesw-definition-colisions.patch b/openwrt/feeds/packages/lang/python/python3/patches/011-fix-ncursesw-definition-colisions.patch deleted file mode 100644 index 1597f4af..00000000 --- a/openwrt/feeds/packages/lang/python/python3/patches/011-fix-ncursesw-definition-colisions.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Modules/_cursesmodule.c -+++ b/Modules/_cursesmodule.c -@@ -116,7 +116,6 @@ char *PyCursesVersion = "2.2"; - #defines many common symbols (such as "lines") which breaks the - curses module in other ways. So the code will just specify - explicit prototypes here. */ --extern int setupterm(char *,int,int *); - #ifdef __sgi - #include - #endif diff --git a/openwrt/feeds/packages/lang/python/python3/patches/012-disable-wcsftime-detection.patch b/openwrt/feeds/packages/lang/python/python3/patches/012-disable-wcsftime-detection.patch deleted file mode 100644 index 8432ac2a..00000000 --- a/openwrt/feeds/packages/lang/python/python3/patches/012-disable-wcsftime-detection.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure -+++ b/configure -@@ -11271,7 +11271,7 @@ for ac_func in alarm accept4 setitimer g - sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ - sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ - truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ -- wcscoll wcsftime wcsxfrm wmemcmp writev _getpty -+ wcscoll wcsxfrm wmemcmp writev _getpty - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/openwrt/feeds/packages/lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch b/openwrt/feeds/packages/lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch new file mode 100644 index 00000000..503159d6 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch @@ -0,0 +1,28 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -735,6 +735,16 @@ regen-all: regen-opcode regen-opcode-tar + ############################################################################ + # Special rules for object files + ++DATE_FMT = %b %d %Y ++TIME_FMT = %H:%M:%S ++ifdef SOURCE_DATE_EPOCH ++ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)") ++ BUILD_TIME ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u "+$(TIME_FMT)") ++else ++ BUILD_DATE ?= $(shell date "+$(DATE_FMT)") ++ BUILD_TIME ?= $(shell date "+$(TIME_FMT)") ++endif ++ + Modules/getbuildinfo.o: $(PARSER_OBJS) \ + $(OBJECT_OBJS) \ + $(PYTHON_OBJS) \ +@@ -743,6 +753,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ + $(DTRACE_OBJS) \ + $(srcdir)/Modules/getbuildinfo.c + $(CC) -c $(PY_CORE_CFLAGS) \ ++ -DDATE="\"$(BUILD_DATE)\"" \ ++ -DTIME="\"$(BUILD_TIME)\"" \ + -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ + -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ + -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ diff --git a/openwrt/feeds/packages/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/openwrt/feeds/packages/lang/python/python3/patches/014-remove-platform-so-suffix.patch index 88fff659..cc6a8511 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/014-remove-platform-so-suffix.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -14986,7 +14986,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -15142,7 +15142,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -4639,7 +4639,7 @@ AC_SUBST(SOABI) +@@ -4633,7 +4633,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) @@ -19,4 +19,4 @@ +SOABI='cpython-'`echo $VERSION | tr -d .` AC_MSG_RESULT($SOABI) - AC_SUBST(EXT_SUFFIX) + # Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI diff --git a/openwrt/feeds/packages/lang/python/python3/patches/015-abort-on-failed-modules.patch b/openwrt/feeds/packages/lang/python/python3/patches/015-abort-on-failed-modules.patch index a49641c8..234ef6c5 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/015-abort-on-failed-modules.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/015-abort-on-failed-modules.patch @@ -1,10 +1,10 @@ --- a/setup.py +++ b/setup.py -@@ -308,6 +308,7 @@ class PyBuildExt(build_ext): +@@ -441,6 +441,7 @@ class PyBuildExt(build_ext): print("Failed to build these modules:") print_three_column(failed) print() -+ if cross_compiling: sys.exit(1) ++ if CROSS_COMPILING: sys.exit(1) if self.failed_on_import: failed = self.failed_on_import[:] diff --git a/openwrt/feeds/packages/lang/python/python3/patches/016-adjust-config-paths.patch b/openwrt/feeds/packages/lang/python/python3/patches/016-adjust-config-paths.patch index cca6e1ed..b8ea6ccf 100644 --- a/openwrt/feeds/packages/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/openwrt/feeds/packages/lang/python/python3/patches/016-adjust-config-paths.patch @@ -1,6 +1,6 @@ --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -421,6 +421,7 @@ def _init_posix(): +@@ -445,6 +445,7 @@ def _init_posix(): platform=sys.platform, multiarch=getattr(sys.implementation, '_multiarch', ''), )) @@ -10,7 +10,7 @@ global _config_vars --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py -@@ -343,6 +343,7 @@ def get_makefile_filename(): +@@ -344,6 +344,7 @@ def get_makefile_filename(): def _get_sysconfigdata_name(): @@ -20,7 +20,7 @@ abi=sys.abiflags, --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1304,7 +1304,7 @@ libinstall: build_all $(srcdir)/Modules/ +@@ -1460,7 +1460,7 @@ libinstall: build_all $(srcdir)/Modules/ esac; \ done; \ done @@ -28,8 +28,8 @@ + $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt - -@@ -1404,7 +1404,7 @@ sharedinstall: sharedmods + ifeq (@COMPILE_ALL_TESTS@,yes) +@@ -1618,7 +1618,7 @@ sharedinstall: sharedmods --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ --root=$(DESTDIR)/ @@ -40,8 +40,8 @@ # Here are a couple of targets for MacOSX again, to install a full --- a/configure +++ b/configure -@@ -15005,7 +15005,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' - $as_echo "$LDVERSION" >&6; } +@@ -15181,7 +15181,7 @@ else + fi -if test x$PLATFORM_TRIPLET = x; then @@ -51,7 +51,7 @@ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" --- a/configure.ac +++ b/configure.ac -@@ -4656,7 +4656,7 @@ AC_MSG_RESULT($LDVERSION) +@@ -4667,7 +4667,7 @@ fi dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) diff --git a/openwrt/feeds/packages/lang/python/python3/patches/024-musl-find_library.patch b/openwrt/feeds/packages/lang/python/python3/patches/024-musl-find_library.patch new file mode 100644 index 00000000..9ad33c05 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/python3/patches/024-musl-find_library.patch @@ -0,0 +1,74 @@ +https://bugs.python.org/issue21622 + +Based on the patch from Alpine Linux +https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch + +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -92,6 +92,8 @@ elif sys.platform.startswith("aix"): + elif os.name == "posix": + # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump + import re, tempfile ++ from glob import glob ++ musl_ldso = glob('/lib/ld-musl-*.so.1') + + def _findLib_gcc(name): + # Run GCC's linker with the -t (aka --trace) option and examine the +@@ -252,6 +254,57 @@ elif os.name == "posix": + def find_library(name, is64 = False): + return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) + ++ elif musl_ldso and os.path.isfile(musl_ldso[0]): ++ ++ def _is_elf(filepath): ++ try: ++ with open(filepath, 'rb') as fh: ++ return fh.read(4) == b'\x7fELF' ++ except: ++ return False ++ ++ def find_library(name): ++ # absolute name? ++ if os.path.isabs(name): ++ if _is_elf(name): ++ return name ++ else: ++ return None ++ ++ # special case for unified standard libs ++ stdlibs = ['libcrypt.so', 'libdl.so', 'libm.so', 'libpthread.so', 'libresolv.so', 'librt.so', 'libutil.so', 'libxnet.so'] ++ if name in stdlibs: ++ name = 'libc.so' ++ elif ('lib' + name + '.so') in stdlibs: ++ name = 'c' ++ ++ paths = [] ++ # read path list from /etc/ld-musl-$(ARCH).path ++ path_list = musl_ldso[0].replace('/lib/', '/etc/').replace('.so.1', '.path') ++ try: ++ with open(path_list, 'r') as fh: ++ paths = [path for line in fh for path in line.rstrip('\n').split(':') if path] ++ except: ++ paths = [] ++ # default path list if /etc/ld-musl-$(ARCH).path is empty or does not exist ++ if not paths: ++ paths = ['/lib', '/usr/local/lib', '/usr/lib'] ++ ++ # prepend paths from LD_LIBRARY_PATH ++ if 'LD_LIBRARY_PATH' in os.environ: ++ paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths ++ ++ for d in paths: ++ f = os.path.join(d, name) ++ if _is_elf(f): ++ return os.path.basename(f) ++ ++ prefix = os.path.join(d, 'lib'+name) ++ for suffix in ['.so', '.so.*']: ++ for f in glob('{0}{1}'.format(prefix, suffix)): ++ if _is_elf(f): ++ return os.path.basename(f) ++ + else: + + def _findSoname_ldconfig(name): diff --git a/openwrt/feeds/packages/lang/python/pytz/Makefile b/openwrt/feeds/packages/lang/python/pytz/Makefile deleted file mode 100644 index 205338d0..00000000 --- a/openwrt/feeds/packages/lang/python/pytz/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=pytz -PKG_VERSION:=2016.6.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/5d/8e/6635d8f3f9f48c03bb925fab543383089858271f9cfd1216b83247e8df94/ -PKG_MD5SUM:=b6c28a3b968bc1d8badfb61b93874e03 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/pytz - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=World timezone definitions, modern and historical - URL:=https://sourceforge.net/projects/pytz/ - DEPENDS:=+python -endef - -define Package/pytz/description - World timezone definitions, modern and historical -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/pytz/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,pytz)) diff --git a/openwrt/feeds/packages/lang/python/rcssmin/Makefile b/openwrt/feeds/packages/lang/python/rcssmin/Makefile deleted file mode 100644 index 57224742..00000000 --- a/openwrt/feeds/packages/lang/python/rcssmin/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=rcssmin -PKG_VERSION:=1.0.6 -PKG_RELEASE=1 -PKG_LICENSE:=Apache-2.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ndparker/rcssmin.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=4764e3bc47ca8d44be3198892e73c51d8a0a9970 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/rcssmin - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Fast CSS minifier for Python - MAINTAINER:=Gergely Kiss - URL:=http://opensource.perlig.de/rcssmin/ - DEPENDS:=+python -endef - -define Package/rcssmin/description - Fast CSS minifier for Python -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -define Package/rcssmin/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,rcssmin)) diff --git a/openwrt/feeds/packages/lang/python/ruamel-yaml/Makefile b/openwrt/feeds/packages/lang/python/ruamel-yaml/Makefile new file mode 100644 index 00000000..bf8119f6 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/ruamel-yaml/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ruamel-yaml +PKG_VERSION:=0.15.100 +PKG_RELEASE:=1 + +PYPI_NAME:=ruamel.yaml +PKG_HASH:=8e42f3067a59e819935a2926e247170ed93c8f0b2ab64526f888e026854db2e4 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/ruamel-yaml/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=YAML 1.2 loader/dumper package for Python + URL:=https://bitbucket.org/ruamel/yaml +endef + +define Package/python-ruamel-yaml +$(call Package/ruamel-yaml/Default) + DEPENDS:= \ + +PACKAGE_python-ruamel-yaml:python-light + VARIANT:=python +endef + +define Package/python3-ruamel-yaml +$(call Package/ruamel-yaml/Default) + DEPENDS:= \ + +PACKAGE_python3-ruamel-yaml:python3-light + VARIANT:=python3 +endef + +define Package/ruamel-yaml/description +ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order +endef + +define Package/python3-ruamel-yaml/description +$(call Package/ruamel-yaml/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-ruamel-yaml)) +$(eval $(call BuildPackage,python-ruamel-yaml)) +$(eval $(call BuildPackage,python-ruamel-yaml-src)) + +$(eval $(call Py3Package,python3-ruamel-yaml)) +$(eval $(call BuildPackage,python3-ruamel-yaml)) +$(eval $(call BuildPackage,python3-ruamel-yaml-src)) diff --git a/openwrt/feeds/packages/lang/python/simplejson/Makefile b/openwrt/feeds/packages/lang/python/simplejson/Makefile deleted file mode 100644 index c6d9c2b3..00000000 --- a/openwrt/feeds/packages/lang/python/simplejson/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 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:=simplejson -PKG_VERSION:=3.10.0 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/40/ad/52c1f3a562df3b210e8f165e1aa243a178c454ead65476a39fa3ce1847b6/ -PKG_MD5SUM:=426a9631d22851a7a970b1a677368b15 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/simplejson - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Simple, fast, extensible JSON encoder/decoder for Python - URL:=http://simplejson.readthedocs.org/ - DEPENDS:=+python -endef - -define Package/simplejson/description - Simple, fast, extensible JSON encoder/decoder for Python -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/simplejson/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,simplejson)) diff --git a/openwrt/feeds/packages/lang/python/text-unidecode/Makefile b/openwrt/feeds/packages/lang/python/text-unidecode/Makefile new file mode 100644 index 00000000..3bc448bc --- /dev/null +++ b/openwrt/feeds/packages/lang/python/text-unidecode/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-text-unidecode +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PYPI_NAME:=text-unidecode +PKG_HASH:=5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d + +PKG_LICENSE:=Artistic-1.0-cl8 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Josef Schlehofer + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +define Package/python-text-unidecode/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=The most basic Text::Unidecode port + URL:=https://github.com/kmike/text-unidecode/ +endef + +define Package/python-text-unidecode +$(call Package/python-text-unidecode/Default) + DEPENDS:= \ + +PACKAGE_python-text-unidecode:python-light + VARIANT:=python +endef + +define Package/python3-text-unidecode +$(call Package/python-text-unidecode/Default) + DEPENDS:= \ + +PACKAGE_python3-text-unidecode:python3-light + VARIANT:=python3 +endef + +define Package/python-text-unidecode/description +text-unidecode is the most basic port of the Text::Unidecode Perl library. +endef + +define Package/python3-text-unidecode/description +$(call Package/python-text-unidecode/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-text-unidecode)) +$(eval $(call BuildPackage,python-text-unidecode)) +$(eval $(call BuildPackage,python-text-unidecode-src)) + +$(eval $(call Py3Package,python3-text-unidecode)) +$(eval $(call BuildPackage,python3-text-unidecode)) +$(eval $(call BuildPackage,python3-text-unidecode-src)) diff --git a/openwrt/feeds/packages/lang/python/twisted/Makefile b/openwrt/feeds/packages/lang/python/twisted/Makefile deleted file mode 100644 index dc92e4d9..00000000 --- a/openwrt/feeds/packages/lang/python/twisted/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2006-2011, 2015-2016 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:=twisted -PKG_VERSION:=16.4.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://pypi.python.org/packages/6b/23/8dbe86fc83215015e221fbd861a545c6ec5c9e9cd7514af114d1f64084ab \ - http://twistedmatrix.com/Releases/Twisted/16.4 -PKG_MD5SUM:=c6d09bdd681f538369659111f079c29d - -PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=python python-setuptools USE_MUSL:librpc - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jeffery To - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/twisted - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Python networking engine - URL:=http://twistedmatrix.com/ - DEPENDS:=+python-light +zope-interface -endef - -define Package/twisted/description - Twisted is a networking engine written in Python, supporting numerous - protocols. It contains a web server, numerous chat clients, chat servers, - mail servers, and more. -endef - -define PyPackage/twisted/filespec -+|/usr/bin --|/usr/bin/tkconch -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py -endef - -define Build/Compile - $(call Build/Compile/PyMod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \ - ) -endef - -$(eval $(call PyPackage,twisted)) -$(eval $(call BuildPackage,twisted)) diff --git a/openwrt/feeds/packages/lang/python/twisted/patches/001-fix-zsh-completion.patch b/openwrt/feeds/packages/lang/python/twisted/patches/001-fix-zsh-completion.patch deleted file mode 100644 index 6cb85c60..00000000 --- a/openwrt/feeds/packages/lang/python/twisted/patches/001-fix-zsh-completion.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/twisted/python/twisted-completion.zsh b/twisted/python/twisted-completion.zsh -index 4d97aa5..9a8d4d8 100644 ---- a/twisted/python/twisted-completion.zsh -+++ b/twisted/python/twisted-completion.zsh -@@ -1,4 +1,4 @@ --#compdef twistd trial conch cftp ckeygen pyhtmlizer tkconch -+#compdef twistd trial conch cftp ckeygen pyhtmlizer - # - # This is the ZSH completion file for Twisted commands. It calls the current - # command-line with the special "--_shell-completion" option which is handled diff --git a/openwrt/feeds/packages/lang/python/twisted/patches/002-omit-tests.patch b/openwrt/feeds/packages/lang/python/twisted/patches/002-omit-tests.patch deleted file mode 100644 index 8d545bfd..00000000 --- a/openwrt/feeds/packages/lang/python/twisted/patches/002-omit-tests.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/setup.py b/setup.py -index e21ef70..a4d9ee8 100755 ---- a/setup.py -+++ b/setup.py -@@ -55,13 +55,14 @@ def main(args): - setup_args = STATIC_PACKAGE_METADATA.copy() - - setup_args.update(dict( -- packages=setuptools.find_packages(), -+ packages=setuptools.find_packages(exclude=["*.test", "*.test.*"]), - install_requires=requirements, - conditionalExtensions=getExtensions(), - entry_points={ - 'console_scripts': getConsoleScripts() - }, - include_package_data=True, -+ exclude_package_data={'':['test/*']}, - zip_safe=False, - extras_require=_EXTRAS_REQUIRE, - )) -diff --git a/twisted/python/dist.py b/twisted/python/dist.py -index dfff9dc..a05b716 100644 ---- a/twisted/python/dist.py -+++ b/twisted/python/dist.py -@@ -191,11 +191,11 @@ def getExtensions(): - Get the C extensions used for Twisted. - """ - extensions = [ -- ConditionalExtension( -- "twisted.test.raiser", -- ["twisted/test/raiser.c"], -- condition=lambda _: _isCPython -- ), -+ #ConditionalExtension( -+ # "twisted.test.raiser", -+ # ["twisted/test/raiser.c"], -+ # condition=lambda _: _isCPython -+ #), - ConditionalExtension( - "twisted.internet.iocpreactor.iocpsupport", - ["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c", diff --git a/openwrt/feeds/packages/lang/python/vobject/Makefile b/openwrt/feeds/packages/lang/python/vobject/Makefile new file mode 100644 index 00000000..49e81e14 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/vobject/Makefile @@ -0,0 +1,56 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vobject +PKG_VERSION:=0.9.6.1 +PKG_RELEASE:=1 +PKG_LICENSE:=Apache-2.0 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=96512aec74b90abb71f6b53898dd7fe47300cc940104c4f79148f0671f790101 + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk + +include ../python-package.mk +include ../python3-package.mk + +define Package/python-vobject/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Daniel Dickinson + TITLE:=VObject + URL:=http://eventable.github.io/vobject/ +endef + +define Package/python-vobject +$(call Package/python-vobject/Default) + DEPENDS:=+PACKAGE_python-vobject:python +PACKAGE_python-vobject:python-dateutil + VARIANT:=python +endef + +define Package/python3-vobject +$(call Package/python-vobject/Default) + DEPENDS:=+PACKAGE_python3-vobject:python3 +PACKAGE_python3-vobject:python3-dateutil + VARIANT:=python3 +endef + +define Package/python-vobject/description + vCard and vCalendar support for Python +endef + +define Package/python3-vobject/description +$(call Package/python-vobject/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-vobject)) +$(eval $(call BuildPackage,python-vobject)) +$(eval $(call BuildPackage,python-vobject-src)) +$(eval $(call Py3Package,python3-vobject)) +$(eval $(call BuildPackage,python3-vobject)) +$(eval $(call BuildPackage,python3-vobject-src)) diff --git a/openwrt/feeds/packages/lang/python/xmltodict/Makefile b/openwrt/feeds/packages/lang/python/xmltodict/Makefile new file mode 100644 index 00000000..78d9d6a5 --- /dev/null +++ b/openwrt/feeds/packages/lang/python/xmltodict/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-xmltodict +PKG_VERSION:=0.12.0 +PKG_RELEASE:=1 + +PYPI_NAME:=xmltodict +PKG_HASH:=50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21 + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-xmltodict + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Work with XML like JSON + URL:=https://github.com/martinblech/xmltodict + DEPENDS:= \ + +python3-light \ + +python3-xml \ + +python3-urllib + VARIANT:=python3 +endef + +define Package/python3-xmltodict/description + xmltodict is a Python module that makes working with XML feel like you are working with JSON. +endef + +$(eval $(call Py3Package,python3-xmltodict)) +$(eval $(call BuildPackage,python3-xmltodict)) +$(eval $(call BuildPackage,python3-xmltodict-src)) diff --git a/openwrt/feeds/packages/lang/python/zope-interface/Makefile b/openwrt/feeds/packages/lang/python/zope-interface/Makefile deleted file mode 100644 index 34b5e2b0..00000000 --- a/openwrt/feeds/packages/lang/python/zope-interface/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2006-2011, 2015-2016 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:=zope.interface -PKG_VERSION:=4.3.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/38/1b/d55c39f2cf442bd9fb2c59760ed058c84b57d25c680819c25f3aff741e1f -PKG_MD5SUM:=5f7e15a5bcdfa3c6c0e93ffe45caf87c - -PKG_BUILD_DEPENDS:=python python-setuptools - -PKG_LICENSE:=ZPL-2.1 -PKG_LICENSE_FILES:=LICENSE.txt -PKG_MAINTAINER:=Jeffery To - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/zope-interface - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Zope interface - URL:=https://github.com/zopefoundation/zope.interface - DEPENDS:=+python-light -endef - -define Package/zope-interface/description -This package provides an implementation of "object interfaces" for -Python. Interfaces are a mechanism for labeling objects as conforming to -a given API or contract. So, this package can be considered as -implementation of the Design By Contract methodology support in Python. -endef - -define PyPackage/zope-interface/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/zope/interface/common/tests --|$(PYTHON_PKG_DIR)/zope/interface/tests -endef - -define Build/Compile - $(call Build/Compile/PyMod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \ - ) -endef - -$(eval $(call PyPackage,zope-interface)) -$(eval $(call BuildPackage,zope-interface))