Comments (8)
Hello,
yes, I would expect this do work. Actually, I could distribute the relocated Pythons as zip files as well. AppImage is relevant only when running live without extracting. But for Python runtimes I find it more convenient to extract the images because then you can also pip install to the extracted image etc.
A starting point could be to use the relocate function on an OSX Python install. There might be some specificities related to OSX requiring extra tweaks though?
Do you have access to an OSX to test? If not this project can be very helpful: macos-virtualbox.
In a second step, if it works, you could use GitHub CI with an OSX worker and relocate its Python install(s)
from python-appimage.
Got it! Yep, I have OSX in VB for tests. Thank you for details and links! I'll dive into it.
from python-appimage.
Hey @anki-code . I was just curious if you had any success on this? I could make use of it as well for OSX :) But maybe this was not so straightforward? As they say: "the devil is in the details".
from python-appimage.
First of all I tried on Arch with Miniconda and had a success:
mkdir /tmp/reloc
cd /tmp/reloc
sudo python -m python_appimage build local
# No such file or directory: /usr/share/tcl8.6
vim /opt/miniconda3/lib/python3.8/site-packages/python_appimage/appimage/relocate.py
# Replace /usr/share to /usr/lib
sudo python -m python_appimage build local
# [2021-05-03 19:38:00,995] CLONE python3.8 from /opt/miniconda3
# [2021-05-03 19:38:12,748] PRUNE python3.8 packages
# [2021-05-03 19:38:12,749] SYMLINK python, python3 to python3.8
# [2021-05-03 19:38:12,749] SYMLINK pip, pip3 to pip3.8
# [2021-05-03 19:38:12,749] HOOK python3.8 site packages
# [2021-05-03 19:38:12,749] LINK python3.8 C-extensions
# [2021-05-03 19:38:14,705] INSTALL AppRun
# [2021-05-03 19:38:14,719] INSTALL python3.8.5.desktop
# [2021-05-03 19:38:14,720] INSTALL python.png
# [2021-05-03 19:38:14,720] INSTALL python3.8.5.appdata.xml
# [2021-05-03 19:38:14,721] BUILD AppDir
ls
# python3.8.5-x86_64.AppImage
Then I tried MacOS with Miniconda:
vim /Users/pc/miniconda3/lib/python3.8/site-packages/python_appimage/__init__.py
# Disable check
sudo python -m python_appimage build local
# [2021-05-03 09:42:16,608] CLONE python3.8 from /Users/pc/miniconda3
# [2021-05-03 09:42:30,737] PRUNE python3.8 packages
# [2021-05-03 09:42:30,745] SYMLINK python, python3 to python3.8
# [2021-05-03 09:42:30,747] HOOK python3.8 site packages
# [2021-05-03 09:42:30,750] LINK python3.8 C-extensions
# [2021-05-03 09:42:30,751] INSTALL patchelf from https://github.com/niess/patchelf.appimage/releases/download
# RuntimeError: /bin/sh: ./patchelf-x86_64.AppImage: cannot execute binary file
That's all for now :)
from python-appimage.
OK, I see. Patchelf needs a replacement on OSX. It is used to make binaries look for shared libs under a relative path (hence in the AppImage as well) instead of using an absolute one. So unfortunately more work is needed to make it relocatable on OSX.
from python-appimage.
I've found some builds of Python here - https://github.com/indygreg/python-build-standalone/releases/tag/20210415
from python-appimage.
Hey @anki-code . Interesting :) Does it work fine for xxh on OSX?
It looks like everything is built from scratch, isn'it?
Python-appimage instead relies on an existing install. It patches it in order to make it relocatable. In particular the manylinux installs are used, i.e. the same than for generating binary wheels which should ensure the same compatibility tags.
from python-appimage.
I tried to use libpython3.8.a
from python-build-standalone for xonsh-portable-binary (dockerfile) but without success. I got strange error about wrong format. That's all for now.
from python-appimage.
Related Issues (20)
- AttributeError: module 'importlib' has no attribute 'util' HOT 1
- Feature Request HOT 3
- Python Environment Does Not Work Under Directories With Spaces HOT 4
- {install,build,which} response HOT 1
- Support for manylinux_2_24 and manylinux_2_28 HOT 5
- [Question] Adding wxPython HOT 4
- URL correction request in documentation HOT 1
- xonsh AppImage is broken after Jun changes HOT 3
- PyPy AppImages HOT 3
- License question HOT 5
- _sysconfigdata_m_linux_{{arch}}-linux-gnu.py needs to be relocated HOT 1
- Set rpath also to $ORIGIN/../lib HOT 2
- uuid.getnode() discrepancy HOT 7
- Allow < and @ sign in requirements.txt HOT 2
- how can use this and linuxdeploy to build appimage HOT 2
- Trying to use ranger with python-appimage HOT 7
- Could you add libpython.a files to the AppImages? HOT 2
- Why does this project release often while source code did not change? HOT 5
- python3.12 support/release HOT 2
- [question] Support for relative path based requirements HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-appimage.