aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python3-package.mk
Commit message (Collapse)AuthorAge
* python,python3: add Py[3]Shebang functions & move outside of scriptAlexandru Ardelean2019-09-20
| | | | | | | | | | | | | | | | Some packages just install some Python binaries, that may need their shebang fixed. This change adds some utilities to help with that and try to centralize the sed rules a bit. It also removes the logic from the `python-package-install.sh` into the `python-package[3].mk` files. This does 2 things: 1. It minimizes the need for the shell script to know the Python version 2/3 2. Makes the logic re-usable in packages; especially if the install rules differ a bit Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* django: move django* packages under django submenuEneas U de Queiroz2019-08-12
| | | | | | | | | | | This changes the python[3]-django dependencies in packages to be non-selecting, and adds an MDEPENDS line so that the *-src packages get placed inside the django menu as well. Added MENU:= to the src-package definitions in python[3]-package.mk, so it does not import that setting from the binary package. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* Merge pull request #9100 from jefferyto/isolate-host-pythonRosen Penev2019-06-03
|\ | | | | python,python3: Better isolate host Python
| * python,python3: Update host pip[3] install functionsJeffery To2019-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add --cache-dir option to set the pip cache to a directory in $(DL_DIR), instead of pip's default (build user's ~/.cache/pip), fixes #9066 * Add --disable-pip-version-check option, since the version check only prints a message saying a new version is available * Combine host_python_pip_install and host_python_pip_install_host into Build/Compile/HostPy[3]PipInstall * Remove --root and --prefix options, since this function is only used to install packages to host Python's default site-packages directory (setting these may serve to confuse pip) * Pass all of $(HOST_PYTHON[3]_PACKAGE_BUILD_DEPENDS) to the function, since pip can handle multiple arguments/packages Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | python,python3: Clear more fields for src packagesJeffery To2019-05-28
|/ | | | | | | This clears the CONFLICTS, PROVIDES, EXTRA_DEPENDS, and USERID fields for -src packages. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Add PYTHON[3]_PKG_SETUP_GLOBAL_ARGSJeffery To2019-04-05
| | | | | | | | | | | | Some packages (PyYAML, https://github.com/openwrt/packages/pull/8482#discussion_r270692276) recognize "global" options to setup.py; these must appear before the "install" command on the command line. This adds PYTHON[3]_PKG_SETUP_GLOBAL_ARGS, which let packages set these global options. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Fix overridden usr/bin symlinksJeffery To2019-04-03
| | | | | | | | | | | | | Currently, all files in usr/bin (presumably all Python scripts) are run through sed to replace the shebang; sed will overwrite the file whether or not a match is found. This causes symlinks to be overridden and made into copies of their targets. python[3]-base and python[3]-dev are affected by this. This adds the --follow-symlinks flag to sed, in addition to using $(SED), so that symlinks are not overridden. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: allow users to override python args & varsAlexandru Ardelean2019-02-23
| | | | | | | | If users want to define these before including python[3]-package.mk, these vars will be overridden during the include. So, override these vars if they haven't been defined. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: Add PYTHON_PKG_SETUP_DIRJeffery To2019-02-23
| | | | | | | | | This adds a variable (PYTHON_PKG_SETUP_DIR / PYTHON3_PKG_SETUP_DIR) that allows a Python package Makefile to control the directory where setup.py is called (as part of PyBuild/Compile/Default / Py3Build/Compile/Default). Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Fix calling default PyPackage/installJeffery To2019-02-18
| | | | | | | | | This fixes Package/*/install to call PyPackage/*/install correctly. Previously, if a package used the default PyPackage/*/install, then it would not called. (A custom-defined PyPackage/*/install would be called with no issue.) Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: move .exe removal in `python-package-install.sh` scriptAlexandru Ardelean2019-02-04
| | | | | | | It's a common operation for both Python & Python3, so move it to the script `python-package-install.sh` script. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: fix recursive deps caused by dangling DEPENDSAlexandru Ardelean2018-01-17
| | | | | | | For python `src` packages we should clear out the DEPENDS to prevent recursive deps from happening. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* Merge pull request #5457 from jefferyto/python-pkg-setup-args-varsHannu Nyman2018-01-17
|\ | | | | python,python3: add vars to customize setup arguments / variables
| * python,python3: add vars to customize setup arguments / variablesJeffery To2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds: * PYTHON_PKG_SETUP_ARGS * PYTHON_PKG_SETUP_VARS * PYTHON3_PKG_SETUP_ARGS * PYTHON3_PKG_SETUP_VARS to customize Python package setup arguments / environment variables. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | python,python3: disable dependencies between python src packagesAlexandru Ardelean2018-01-16
|/ | | | | | | Related to: https://github.com/openwrt/packages/issues/5424 Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: merge package install scriptsAlexandru Ardelean2018-01-10
| | | | | | | | | | | | | The only difference just a parameter for Python3 [ -b to compile bytecodes in legacy mode ]. No need to keep 2 almost identical files now that they're exported. I'm a bit scared of that param, since it may get removed at some point. But let's see until then. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: simplify path to install shell-scriptAlexandru Ardelean2018-01-10
| | | | | | | Now that all files are exported, it makes sense to just reference the script directly. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: export mk files outside of python package dirsAlexandru Ardelean2018-01-10
Since `lang/python` is it's own folder of Python packages (for both Python 2 & 3), and these build rules are needed in a lot of packages [especially Python packages], putting them here makes sense architecturally, to be shared. This also helps get rid of the `include_mk` construct which relies on OpenWrt core to provide, and seems like a broken design idea that has persisted for a while. Reason is: it requires that Python 2/3 be built to provide these mk files for other Python packages, which seems like a bad idea. Long-term, there could be an issue where some other feeds would require these mk files [e.g. telephony] for some Python packages. We'll see how we handle this a bit later. For now we limit this to this feed. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>