Seite 1 von 3

python für neutrino

Verfasst: So 16. Jul 2023, 14:40
von satbaby
Hi@all
Gibt es irgendwo ein fertige build target für pytnon neutrino image?
Da youtube wohl endgültig mit lua nicht mehr laufen wird, wollte ich yt-dlp versuchen.

gruß

Re: python für neutrino

Verfasst: So 16. Jul 2023, 16:42
von vanhofen
Fertig hab ich das nicht. Ich schaue es mir mal an.

Re: python für neutrino

Verfasst: Di 19. Sep 2023, 13:03
von Kittybua1210!
satbaby hat geschrieben: So 16. Jul 2023, 14:40 Hi@all
Gibt es irgendwo ein fertige build target für pytnon neutrino image?
Da youtube wohl endgültig mit lua nicht mehr laufen wird, wollte ich yt-dlp versuchen.

gruß
Du kannst auch über Tux das ni bauen dann hast du python und ipks machte das lange so

Hatte momentan ehrlich gesagt nur noch PC mit ni und Android sat Boxen - ( habe ich natürlich noch 2x strong 4150 + Nokia 8010 mit DVB s2 Adapter) , aber jetzt hatte ich wieder Lust auf eine Box mit ni bzw Tux ni und habe gestern eine Protek 4k V2 um 55 mit Versand ergattert und freue mich wieder aufs bauen ! Ni kommt gleich mal drauf am Freitag bzw wenn sie da ist 😉 und spiele mich auch bischen damit ! Sollte ja möglich sein Python 😉 wäre top da geht dann einiges mehr !

Ein ni mit Python wäre natürlich auch top ohne Tux ni 😁 mfg kittybua

Re: python für neutrino

Verfasst: Sa 23. Sep 2023, 20:50
von vanhofen
Ich konnte mich heute endlich mal damit beschäftigen und ein python-Target fürs Buildsystem basteln. Es läuft sogar.

Code: Alles auswählen

    ###   ###  ###
     ###   ##  ##
     ####  ##  ##
     ## ## ##  ##
     ##  ####  ##
     ##   ###  ##
     ##    ##  ##      http://www.neutrino-images.de
            #

Kernel: 4.10.12 #1 SMP Sat Sep 23 19:09:54 CEST 2023 @armv7l
Date: Saturday, 23 September 2023, 20:43:47

e4hdultra.NI-07863F login: root
Password:
/var/root # python3
Python 3.11.5 (main, Sep 23 2023, 11:17:25) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("NI \o/")
NI \o/
>>> exit()
/var/root #
Ich mach das noch ein wenig schick und checke es dann ein. Ab morgen werden dann alle ARMBOXen Python3 mit an Bord haben. Ob es das jemals für Coolstream geben wird, weiß ich nicht.

Viel Spaß damit. :)

Re: python für neutrino

Verfasst: So 24. Sep 2023, 16:56
von Janus

Code: Alles auswählen

sed -e "s,@EXENAME@,/home/janus/development/ni/hd51/host/bin/python3.11," < ./Misc/python-config.in >python-config.py
LC_ALL=C sed -e 's,\$(\([A-Za-z0-9_]*\)),\$\{\1\},g' < Misc/python-config.sh >python-config
/usr/bin/gcc -pthread -c -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -I/home/janus/development/ni/hd51/host/include   -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include -I/home/janus/development/ni/hd51/host/include   -DPy_BUILD_CORE \
      -DGITVERSION="\"`LC_ALL=C `\"" \
      -DGITTAG="\"`LC_ALL=C `\"" \
      -DGITBRANCH="\"`LC_ALL=C `\"" \
      -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
./Modules/getbuildinfo.c: In function ‘Py_GetBuildInfo’:
./Modules/getbuildinfo.c:48:19: error: environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799
                   DATE, TIME);
                   ^~~~
make[1]: *** [Makefile:1365: Modules/getbuildinfo.o] Fehler 1
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make: *** [package/python3/python3.mk:218: host-python3] Fehler 2
janus@vmBuster:~/development/ni/hd51$ 
Da passt was nicht.
Ursache unbekannt. Könnte auch an meinem"System" liegen ?

Re: python für neutrino

Verfasst: So 24. Sep 2023, 18:09
von flk
Janus hat geschrieben: So 24. Sep 2023, 16:56 ./Modules/getbuildinfo.c:48:19: error: environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799
SOURCE_DATE_EPOCH ist eine System Environment Variable die gesetzt werden kann, um zu verhindern, dass Programme die compile time ins binary leaken.
Das macht man, um die binary reproducibility zu verbessern. Zwei an unterschiedleichen Tagen gebaute Binaries sollten bei unverändertem Code identisch sein,
sind sie aber nicht, wenn sich der Zeitpunkt des Build geändert hat und die build time mit 'eingebaut' wird. Dadurch ändert sich dann die Binärgröße.

SOURCE_DATE_EPOCH kann also auf eine feste Zeit gesetzt werden, die dann von Projekten als konstanter time stamp genutzt werden kann.

Ich würde einfach mal versuchen 'export SOURCE_DATE_EPOCH=irgendeineunixtime' zu setzen und schauen, ob das hilft

Re: python für neutrino

Verfasst: So 24. Sep 2023, 18:18
von Don de Deckelwech
Hi,
dafür gab es extra einen Commit: https://github.com/neutrino-images/ni-b ... 75410a2038

Aber vllt passt das Format nicht, kA.

Ciao,
DdD.

Re: python für neutrino

Verfasst: So 24. Sep 2023, 20:03
von vanhofen
Dass irgendetwas an SOURCE_DATE_EPOCH nicht stimmt, halte ich für ausgeschlossen. Ich habe das 1:1 von Buildroot übernommen und sowohl bei mir lokal als auch auf dem Buildserver gab es damit keine Sorgen. Schließlich wurden ja heute alle Nightlies gebaut.

Die Variable wird hier lokal wiefolgt gefüllt:

Code: Alles auswählen

find  -name '*.py' -print0 | xargs -0 --no-run-if-empty touch -d @1695508493
https://www.epochconverter.com/?q=1695508493

Re: python für neutrino

Verfasst: So 24. Sep 2023, 22:48
von Janus
Ich hatte nach 'make update' und 'make all-clean' komplett neugebaut.
Es hatte sich ja in letzter Zeit auch was an der Verzeichnisstruktur des Buildsystems geändert.
Ich schaue mir das bei mir lokal nochmal genauer an. Dauert aber, melde mich dann...

Re: python für neutrino

Verfasst: Di 26. Sep 2023, 08:37
von Gorcon
Gibt es bestimmte Voraussetzungen um Python für Plugins nutzen zu können?
Ich versuche gerade das Dreamscreen Plugin das für Enigma geschrieben ist anzupassen.

Re: python für neutrino

Verfasst: Di 26. Sep 2023, 11:52
von Janus

Code: Alles auswählen

SOURCE_DATE_EPOCH=253402300799
export SOURCE_DATE_EPOCH
printenv | grep SOURCE_DATE_EPOCH
Vor "make bootstrap" In der Console hat erstmal geholfen... :sunglasses:

Re: python für neutrino

Verfasst: Di 26. Sep 2023, 17:00
von vanhofen
Wenn der 11. Januar 1978 für dich OK ist ...

Genau das gleiche wird übrigens im Buildsystem gemacht. Nur wird dort der Zeitstempel des letzten Commits genommen.

Re: python für neutrino

Verfasst: Di 26. Sep 2023, 21:35
von Janus
Wenn der 11. Januar 1978 für dich OK ist ...
Na klar!
Immer möglichst früh dabei... :innocent:

Und der personalisierte Build für die HD51 ist danach auch durchgelaufen.

Da meine verschiedenen hardwarebezogenen Buildverzeichnisse 'parallel* zum BS-Verzeichnis eingerichtet sind und nur per Symlinks darauf zugreifen, dürfte da der eigentliche Knackpunkt liegen.
Auch meine jeweilge Versionsbezeichnung ist schon immer davon betroffen: jetzt => 4.20..269

Re: python für neutrino

Verfasst: Mi 27. Sep 2023, 17:13
von TangoCash
Gorcon hat geschrieben: Di 26. Sep 2023, 08:37 Gibt es bestimmte Voraussetzungen um Python für Plugins nutzen zu können?
Ich versuche gerade das Dreamscreen Plugin das für Enigma geschrieben ist anzupassen.
Ja, die gibt es. Alle E2 Plugins erwarten auch die E2-Schnittstellen, die hier nicht vorhanden sind.
Damit laufen dann zwar normale python scripts, aber keine (E2-)Plugins im klassischen Sinne.

Die einzige direkte Python integration in Neutrino (NICHT E2) hat Mohousch in seiner Repo: https://github.com/mohousch/neutrino2
Der hat sowohl für python als auch für lua, mehr oder weniger alle Neutrino-Klassen zugänglich gemacht.

Re: python für neutrino

Verfasst: Mi 27. Sep 2023, 23:48
von vanhofen
Mir ging es in erster Linie darum, Satbaby hier bei YouTube entgegenzukommen. E2-Plugins werden keine unterstützt.
Und leider ist alles aus Mohouschs Repo unpickbar. Der Code ist zu weit weg.

Re: python für neutrino

Verfasst: Do 28. Sep 2023, 07:36
von Gorcon
Schade.
Das die E2 Plugins hier nicht laufen ist mir klar. Da stimmen halt auch die ganzen Pfade nicht.

Re: python für neutrino

Verfasst: Do 28. Sep 2023, 10:12
von jokel
vanhofen hat geschrieben: Mi 27. Sep 2023, 23:48 Mir ging es in erster Linie darum, Satbaby hier bei YouTube entgegenzukommen. E2-Plugins werden keine unterstützt.
Und leider ist alles aus Mohouschs Repo unpickbar. Der Code ist zu weit weg.
schön und gut..
ich habe auch versuche mit yt-dlp gemacht ..
das problem mit youtube ist i.p download der audio stream
video stream ist ratzfatz runter .. aber der audio strean wird gedrosselt
bsp. film dauer 60 min. dann wird der audio stream so gedrosselt das der download 30 min. beträgt
aber vllt. hat satbaby ja noch ein as im ärmel .. bin gespannt

Re: python für neutrino

Verfasst: Do 2. Nov 2023, 14:44
von satbaby
Kann jemand testen, ob die yt-dlp startet auf Box?
Ich habe nur python gebaut und habe keine Ahnung ob bei mir noch was fehlt.
Python läuft.

Code: Alles auswählen

[hd51] /usr/bin # python /usr/bin/yt-dlp
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/bin/yt-dlp/__main__.py", line 14, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/__init__.py", line 19, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/cookies.py", line 21, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/aes.py", line 6, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/__init__.py", line 8, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/traversal.py", line 7, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/_utils.py", line 41, in <module>
ModuleNotFoundError: No module named 'unicodedata'
Ich habe es mit curl installiert.
curl -L https://github.com/yt-dlp/yt-dlp/releas ... oad/yt-dlp -o /usr/bin/yt-dlp
https://github.com/yt-dlp/yt-dlp/wiki/Installation

Gruß.

Re: python für neutrino

Verfasst: Fr 3. Nov 2023, 09:38
von annie

Code: Alles auswählen


/var/root # python /usr/bin/yt-dlp
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/bin/yt-dlp/__main__.py", line 14, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/__init__.py", line 19, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/cookies.py", line 21, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/aes.py", line 6, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/__init__.py", line 8, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/traversal.py", line 7, in <module>
  File "/usr/bin/yt-dlp/yt_dlp/utils/_utils.py", line 41, in <module>
ModuleNotFoundError: No module named 'unicodedata'
Ist hier auf einer HD51 genauso.

Auf der Wiki Seite steht irgendwas von unter python installieren, das geht hier auch nicht...

You can install without any of the optional dependencies using:
python(3) -m pip install --no-deps -U yt-dlp

Kennt pip nicht...

Re: python für neutrino

Verfasst: Fr 3. Nov 2023, 10:33
von annie
OATV Enigma2 Image sagt aus:

Code: Alles auswählen

root@ax51:~# chmod a+rx /usr/bin/yt-dlp
root@ax51:~# python /usr/bin/yt-dlp

Usage: yt-dlp [OPTIONS] URL [URL...]

yt-dlp: error: You must provide at least one URL.
Type yt-dlp --help to see a list of all options.
root@ax51:~#