-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package: termux-gui-pm #12315
Merged
Merged
Add package: termux-gui-pm #12315
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TERMUX_PKG_HOMEPAGE="https://github.com/tareksander/termux-gui-pm" | ||
TERMUX_PKG_DESCRIPTION="A graphical package manager for various package formats for Termux and proot-distro distros" | ||
TERMUX_PKG_LICENSE="MPL-2.0" | ||
TERMUX_PKG_MAINTAINER="@tareksander" | ||
TERMUX_PKG_VERSION="1.0.0" | ||
TERMUX_PKG_DEPENDS="python" | ||
TERMUX_PKG_PLATFORM_INDEPENDENT=true | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_SRCURL="https://github.com/tareksander/termux-gui-pm/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz" | ||
TERMUX_PKG_SHA256="3a5a829b721d17f2002406571852e63d1984acc9732e58f2f76a2966381297c6" | ||
TERMUX_PKG_AUTO_UPDATE=true | ||
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag" | ||
|
||
termux_step_create_debscripts() { | ||
cat <<- EOF > ./postinst | ||
#!${TERMUX_PREFIX}/bin/sh | ||
echo "Installing python bindings for Termux:GUI" | ||
pip install --upgrade termuxgui | ||
EOF | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be nice to add
termuxgui==$TERMUX_PKG_VERSION
here, since package will be auto-update I guess there could be a risk of risk github being updated before pypi, leading topip install --upgrade termuxgui
installing an older version (?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make sure to only release updates to the apps when the update is already on pypi.
$TERMUX_PKG_VERSION
can't be used, since the library and all programs don't share the same version. I also though about packaging the python library as a Termux package, but the installation path changes with every minor version of python (e.g./data/data/com.termux/files/usr/lib/python3.10/site-packages
would change to/data/data/com.termux/files/usr/lib/python3.11/site-packages
). Are there other python libraries packaged as Termux packages? How do they handle that? Could I ship the wheel in the package instead and reinstall it with a dpkg hook after a python upgrade to avoid dependency on the python version?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revision of other python packages have to be increased when python is updated, so that they are install to the new path.
You could perhaps drop using pip all together and use the termux_setup_python_crossenv function to install termux-gui-pm from source into TERMUX_PREFIX, see for example python-apt for another fairly small python package that uses it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked how linux distributions deal with this, and on debian there is a directory
/usr/lib/python3/dist-packages
added to the python module search path where all python3 modules from apt packages are placed. If that was implemented for Termux, there would be no need to manually increase the revision to rebuild the packages after each python release. Debian seems to modifyLib/sysconfig.py
for that with this patch. Is that a good idea? Should I create an issue for something like that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a good idea to discuss it, it would not work (I think) for packages with native libraries as (I guess) the ABI can change on major python updates, but for termux-gui-pm it should work so might be a good idea