Unverified 提交 edc0d8cd authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Add --no-user in pip install commands (#1257)

上级 90f7511b
# Changelog # Changelog
### NEXT
* `tasks.py`: Always include `--no-user` in `pip install` commands to avoid the "can not combine --user and --target" error in Windows ([PR #1257](https://github.com/versatica/mediasoup/pull/1257)).
### 3.13.9 ### 3.13.9
* Update worker liburing dependency to 2.4-2 ([PR #1254](https://github.com/versatica/mediasoup/pull/1254)). * Update worker liburing dependency to 2.4-2 ([PR #1254](https://github.com/versatica/mediasoup/pull/1254)).
......
...@@ -317,7 +317,7 @@ function installInvoke() ...@@ -317,7 +317,7 @@ function installInvoke()
// Install pip invoke into custom location, so we don't depend on system-wide // Install pip invoke into custom location, so we don't depend on system-wide
// installation. // installation.
executeCmd( executeCmd(
`"${PYTHON}" -m pip install --upgrade --target="${PIP_INVOKE_DIR}" invoke`, `"${PYTHON}" -m pip install --upgrade --no-user --target="${PIP_INVOKE_DIR}" invoke`,
/* exitOnError */ true /* exitOnError */ true
); );
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"@octokit/rest": "^20.0.2", "@octokit/rest": "^20.0.2",
"@types/debug": "^4.1.12", "@types/debug": "^4.1.12",
"@types/jest": "^29.5.11", "@types/jest": "^29.5.11",
"@types/node": "^20.10.3", "@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2", "@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0", "eslint": "^8.55.0",
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"pick-port": "^1.0.1", "pick-port": "^1.0.1",
"sctp": "^1.0.0", "sctp": "^1.0.0",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"typescript": "^5.3.2" "typescript": "^5.3.3"
}, },
"engines": { "engines": {
"node": ">=16" "node": ">=16"
...@@ -1619,9 +1619,9 @@ ...@@ -1619,9 +1619,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.10.3", "version": "20.10.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz",
"integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
...@@ -6458,9 +6458,9 @@ ...@@ -6458,9 +6458,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.3.2", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
...@@ -8006,9 +8006,9 @@ ...@@ -8006,9 +8006,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "20.10.3", "version": "20.10.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz",
"integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==",
"dev": true, "dev": true,
"requires": { "requires": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
...@@ -11363,9 +11363,9 @@ ...@@ -11363,9 +11363,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "5.3.2", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true "dev": true
}, },
"undici-types": { "undici-types": {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"@octokit/rest": "^20.0.2", "@octokit/rest": "^20.0.2",
"@types/debug": "^4.1.12", "@types/debug": "^4.1.12",
"@types/jest": "^29.5.11", "@types/jest": "^29.5.11",
"@types/node": "^20.10.3", "@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2", "@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0", "eslint": "^8.55.0",
...@@ -120,6 +120,6 @@ ...@@ -120,6 +120,6 @@
"pick-port": "^1.0.1", "pick-port": "^1.0.1",
"sctp": "^1.0.0", "sctp": "^1.0.0",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"typescript": "^5.3.2" "typescript": "^5.3.3"
} }
} }
...@@ -47,7 +47,7 @@ invoke: ...@@ -47,7 +47,7 @@ invoke:
ifeq ($(wildcard $(PIP_INVOKE_DIR)),) ifeq ($(wildcard $(PIP_INVOKE_DIR)),)
# Install pip invoke into custom location, so we don't depend on system-wide # Install pip invoke into custom location, so we don't depend on system-wide
# installation. # installation.
$(PYTHON) -m pip install --upgrade --target="$(PIP_INVOKE_DIR)" invoke $(PYTHON) -m pip install --upgrade --no-user --target="$(PIP_INVOKE_DIR)" invoke
endif endif
meson-ninja: invoke meson-ninja: invoke
......
...@@ -34,6 +34,8 @@ MEDIASOUP_OUT_DIR = os.getenv('MEDIASOUP_OUT_DIR') or f'{WORKER_DIR}/out'; ...@@ -34,6 +34,8 @@ MEDIASOUP_OUT_DIR = os.getenv('MEDIASOUP_OUT_DIR') or f'{WORKER_DIR}/out';
MEDIASOUP_INSTALL_DIR = os.getenv('MEDIASOUP_INSTALL_DIR') or f'{MEDIASOUP_OUT_DIR}/{MEDIASOUP_BUILDTYPE}'; MEDIASOUP_INSTALL_DIR = os.getenv('MEDIASOUP_INSTALL_DIR') or f'{MEDIASOUP_OUT_DIR}/{MEDIASOUP_BUILDTYPE}';
BUILD_DIR = os.getenv('BUILD_DIR') or f'{MEDIASOUP_INSTALL_DIR}/build'; BUILD_DIR = os.getenv('BUILD_DIR') or f'{MEDIASOUP_INSTALL_DIR}/build';
# Custom pip folder for invoke package. # Custom pip folder for invoke package.
# NOTE: We invoke `pip install` always with `--no-user` to make it not complain
# about "can not combine --user and --target".
PIP_INVOKE_DIR = f'{MEDIASOUP_OUT_DIR}/pip_invoke'; PIP_INVOKE_DIR = f'{MEDIASOUP_OUT_DIR}/pip_invoke';
# Custom pip folder for meson and ninja packages. # Custom pip folder for meson and ninja packages.
PIP_MESON_NINJA_DIR = f'{MEDIASOUP_OUT_DIR}/pip_meson_ninja'; PIP_MESON_NINJA_DIR = f'{MEDIASOUP_OUT_DIR}/pip_meson_ninja';
...@@ -106,14 +108,14 @@ def meson_ninja(ctx): ...@@ -106,14 +108,14 @@ def meson_ninja(ctx):
# fallback to command without `--system` if the first one fails. # fallback to command without `--system` if the first one fails.
try: try:
ctx.run( ctx.run(
f'"{PYTHON}" -m pip install --system --upgrade --target="{PIP_MESON_NINJA_DIR}" pip setuptools', f'"{PYTHON}" -m pip install --system --upgrade --no-user --target="{PIP_MESON_NINJA_DIR}" pip setuptools',
echo=True, echo=True,
hide=True, hide=True,
shell=SHELL shell=SHELL
); );
except: except:
ctx.run( ctx.run(
f'"{PYTHON}" -m pip install --upgrade --target="{PIP_MESON_NINJA_DIR}" pip setuptools', f'"{PYTHON}" -m pip install --upgrade --no-user --target="{PIP_MESON_NINJA_DIR}" pip setuptools',
echo=True, echo=True,
pty=PTY_SUPPORTED, pty=PTY_SUPPORTED,
shell=SHELL shell=SHELL
...@@ -126,7 +128,7 @@ def meson_ninja(ctx): ...@@ -126,7 +128,7 @@ def meson_ninja(ctx):
# Install meson and ninja using pip into our custom location, so we don't # Install meson and ninja using pip into our custom location, so we don't
# depend on system-wide installation. # depend on system-wide installation.
ctx.run( ctx.run(
f'"{PYTHON}" -m pip install --upgrade --target="{PIP_MESON_NINJA_DIR}" {pip_build_binaries} meson=={MESON_VERSION} ninja=={NINJA_VERSION}', f'"{PYTHON}" -m pip install --upgrade --no-user --target="{PIP_MESON_NINJA_DIR}" {pip_build_binaries} meson=={MESON_VERSION} ninja=={NINJA_VERSION}',
echo=True, echo=True,
pty=PTY_SUPPORTED, pty=PTY_SUPPORTED,
shell=SHELL shell=SHELL
...@@ -371,7 +373,7 @@ def lint(ctx): ...@@ -371,7 +373,7 @@ def lint(ctx):
if not os.path.isdir(PIP_PYLINT_DIR): if not os.path.isdir(PIP_PYLINT_DIR):
# Install pylint using pip into our custom location. # Install pylint using pip into our custom location.
ctx.run( ctx.run(
f'"{PYTHON}" -m pip install --upgrade --target="{PIP_PYLINT_DIR}" pylint=={PYLINT_VERSION}', f'"{PYTHON}" -m pip install --upgrade --no-user --target="{PIP_PYLINT_DIR}" pylint=={PYLINT_VERSION}',
echo=True, echo=True,
pty=PTY_SUPPORTED, pty=PTY_SUPPORTED,
shell=SHELL shell=SHELL
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论