From a1c7e13e93da0907c562ac36910739f5be3de55c Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 7 Jul 2024 19:24:13 +0100 Subject: load key from a file with pkgutil wanted to do this before, but per comment: the official docs led me to believe that importlib_resources was the only way to do it, and that the thing i was trying to do wasn't supported in some python versions so i put it off to one side for later later came (now), and i tried to implement it with importlib.resources didn't work, i looked it up and found this stackoverflow post https://stackoverflow.com/a/58941536 and the second answer, using pkgutil (not importlib.resources), just worked and the syntax/api seems much nicer as well have tested with pip yt-dlp + raw directory plugin, and binary yt-dlp + .whl plugin also on windows, with binary+whl both worked, amazing success! so pkgutil seems like the way to go i also updated the build thing to include .bin files in the extractor dir --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml index 7bfa824..eb9b2f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,3 +17,6 @@ Homepage = "https://427738.xyz/yt-dlp-rajiko/" [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" + +[tool.setuptools.package-data] +"yt_dlp_plugins.extractor" = ["*.bin"] -- cgit v1.2.3-70-g09d2