Comments (4)
It seems to me that it is quite easy to embed Python in any spk, simply add a dependency on it, and it will get built. Then add your own additional package. This should work, but is not my preferred solution.
Being able to use the standard python spk while embedding additional module would be far better. That would imply to have access to the (a part of) the build tree of the corresponding python spk to be able to invoke the module's setup.py, and to extract only the additional part. A python shell trampoline might also be needed to add this additional site-package directory to the PYTHON_PATH variable.
PS: your workaround is not that good, as is mk/spksrc.python-module.mk. I see potential troubles there.
from spksrc.
The problem is that some scripts may use python without the required PYTHONPATH. The idea would be to add a custom lib dir to the python sys.path rather than at execution time in PYTHONPATH.
Don't know if this is possible, AFAIK sitecustomize.py allow some customization but may be hard to manipulate. This would imply regexps to edit it...
Can't find many examples on this subject. http://docs.python.org/library/site.html
from spksrc.
I went for the easiest solution: embed python in the SPK as a dependency.
If we want to embed say, speechd python module, in the default Python SPK, this will be of no use without the actual speech-dispatcher binary and include speech-dispatcher in the python SPK is not a good idea as it has nothing to do with python (well, except a dedicated module).
However, I go for including all common python modules with C extensions in the python SPK (pyaudio, lxml, and others)
Pure python modules should not even be in cross and should be bundled with the dedicated SPK. pip bundle
can do that and I'm working on it so a new SPK should be out soon.
from spksrc.
I agree with you, keeping more generic python modules in the main python spk, and embedding python for very specific needs. The bad thing is that it will consume more RAM on our NAS, as the two python executable are different files and the code section can't be saved.
from spksrc.
Related Issues (20)
- [Package Request] expect HOT 7
- [Package Request] hardlink in synocli-misc
- [Package Update Request] rdiff-backup and Python 3.11 for DSM 7.2 HOT 5
- Lastest ffmpeg6 not work with QSV HOT 3
- [Package Request] Audiobookshelf
- ffmpeg6 segmentation fault on Marvell PJ4Bv7 Processor rev 1 (v7l) for h264 (libx264) HOT 11
- [Package Update Request] Kavita v0.8.2
- [Package Request] Komga HOT 1
- jellyfin_armv7-7.0_10.7.0-1 crashing on start in synology ds218j HOT 1
- [Package Feature Request] Cloudflare Tunnel option HOT 6
- [Package Request] gdb HOT 2
- Building usbip HOT 1
- Domoticz on SRM HOT 2
- JellyFin media paths (no longer?) match. HOT 3
- [Package Update] borg to v1.4 and borgmatic to v1.8.13
- DSM 7.x x86_64 packages? HOT 3
- [Package Request] moreutils ts HOT 2
- [Package Request] Auditd
- [Package Request] Jellyfin for armada38xx HOT 3
- Update DSM 7.2.2 toolchains - 7.2-72746
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 spksrc.