Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkgs/development/python-modules/pytubefix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
aiohttp,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
nodejs,
setuptools,
pytestCheckHook,
}:
Expand All @@ -19,6 +21,12 @@ buildPythonPackage rec {
hash = "sha256-GSXz89BztDOcAmAMPi3SIIDnUbvYJjnHf4DcWf1hqjY=";
};

patches = [
(replaceVars ./replace-nodejs-wheel-binaries.patch {
inherit nodejs;
})
];

build-system = [ setuptools ];

dependencies = [ aiohttp ];
Expand All @@ -37,6 +45,8 @@ buildPythonPackage rec {
];

disabledTests = [
"test_get_initial_function_name_with_no_match_should_error"
"test_get_throttling_function_name"
"test_playlist_failed_pagination"
"test_playlist_pagination"
"test_create_mock_html_json"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/pyproject.toml b/pyproject.toml
index 3762b62..dfee082 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -33,7 +33,7 @@ classifiers = [
"Topic :: Terminals",
"Topic :: Utilities",
]
-dependencies = ["aiohttp >=3.12.13", "nodejs-wheel-binaries >= 22.20.0"]
+dependencies = ["aiohttp >=3.12.13"]

[project.urls]
"Homepage" = "https://github.com/juanbindez/pytubefix"
diff --git a/pytubefix/botGuard/bot_guard.py b/pytubefix/botGuard/bot_guard.py
index d7bde7e..ca10816 100644
--- a/pytubefix/botGuard/bot_guard.py
+++ b/pytubefix/botGuard/bot_guard.py
@@ -1,11 +1,10 @@
import os
import subprocess
import sys
-import nodejs_wheel.executable

PLATFORM = sys.platform

-NODE_DIR = nodejs_wheel.executable.ROOT_DIR
+NODE_DIR = "@nodejs@"

def _node_path() -> str:
suffix = ".exe" if os.name == "nt" else ""
diff --git a/pytubefix/sig_nsig/node_runner.py b/pytubefix/sig_nsig/node_runner.py
index 9ac068a..a7a2c72 100644
--- a/pytubefix/sig_nsig/node_runner.py
+++ b/pytubefix/sig_nsig/node_runner.py
@@ -1,11 +1,10 @@
import os
import json
import subprocess
-import nodejs_wheel.executable


RUNNER_PATH = os.path.join(os.path.dirname(__file__), "vm", "runner.js")
-NODE_DIR = nodejs_wheel.executable.ROOT_DIR
+NODE_DIR = "@nodejs@"

class NodeRunner:
def __init__(self, code: str):
@@ -44,4 +43,4 @@ class NodeRunner:
def close(self):
self.proc.stdin.close()
self.proc.terminate()
- self.proc.wait()
\ No newline at end of file
+ self.proc.wait()
Loading