summaryrefslogtreecommitdiff
path: root/lang/python/python3-package.mk
Commit message (Collapse)AuthorAgeFilesLines
* python3: Use default _PYTHON_HOST_PLATFORMJeffery To2020-07-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets the Python build process set _PYTHON_HOST_PLATFORM instead of forcing an explicit value. Also: * Save the target _PYTHON_HOST_PLATFORM value during Build/InstallDev for use when building target Python packages (in python3-package.mk). * Use the (mostly) default PYTHON_FOR_BUILD value, instead patch configure to remove the platform triplet from the sysconfigdata file name. * Remove the "CROSS_COMPILE=yes" make variable (there is no indication that this variable is necessary). * Force host pip to build packages from source instead of downloading binary wheels. Previously, host pip can download universal (platform-independent) wheels but not platform-specific wheels, because of the custom _PYTHON_HOST_PLATFORM value. (Packages that do not have universal wheels would be compiled from source.) With a correct _PYTHON_HOST_PLATFORM, host pip can install platform-specific wheels as well. However, the pre-built shared object (.so) files in these wheels will have the host's platform triplet in their file names. When target Python packages are built (using the target's _PYTHON_HOST_PLATFORM), Python will not use these shared object files. By forcing host pip to build packages from source, the built shared object files will not have the platform triplet in their file names. (Host Python has been patched to remove the platform triplet from file names.) This allows these packages to be used when building target Python packages. (The net effect of this complete change is that platform-dependent packages will continue to be compiled from source, while platform-independent packages will now also be compiled from source.) Fixes https://github.com/openwrt/packages/issues/12680. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* django: move django* packages under django submenuEneas U de Queiroz2019-10-231-0/+1
| | | | | | | | | | | | 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> (cherry-picked from commit 90527d75afe1847fdddad973ca4ad988f826c8c4)
* Merge pull request #9100 from jefferyto/isolate-host-pythonRosen Penev2019-06-031-2/+2
|\ | | | | python,python3: Better isolate host Python
| * python,python3: Update host pip[3] install functionsJeffery To2019-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-281-0/+4
|/ | | | | | | 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-051-0/+2
| | | | | | | | | | | | 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-031-0/+1
| | | | | | | | | | | | | 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-231-2/+2
| | | | | | | | 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-231-1/+3
| | | | | | | | | 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-181-1/+1
| | | | | | | | | 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-041-2/+0
| | | | | | | 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-171-0/+1
| | | | | | | 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-171-1/+5
|\ | | | | python,python3: add vars to customize setup arguments / variables
| * python,python3: add vars to customize setup arguments / variablesJeffery To2018-01-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-1/+0
|/ | | | | | | 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-101-1/+1
| | | | | | | | | | | | | 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-101-14/+4
| | | | | | | 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-101-0/+144
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>