-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jinzhe Zeng <[email protected]>
- Loading branch information
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From da61816c3a41ffbf8381c04b6df5e4aada262e01 Mon Sep 17 00:00:00 2001 | ||
From: Jinzhe Zeng <[email protected]> | ||
Date: Thu, 28 Nov 2024 18:44:21 -0500 | ||
Subject: [PATCH] hack ROOT_DIR | ||
|
||
--- | ||
nodejs_wheel/executable.py | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/nodejs_wheel/executable.py b/nodejs_wheel/executable.py | ||
index 42f216e..dede038 100644 | ||
--- a/nodejs_wheel/executable.py | ||
+++ b/nodejs_wheel/executable.py | ||
@@ -10,7 +10,7 @@ try: | ||
except ImportError: | ||
from typing_extensions import Literal # type: ignore | ||
|
||
-ROOT_DIR = os.path.dirname(__file__) | ||
+ROOT_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..") | ||
|
||
|
||
@overload | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{% set name = "nodejs-wheel" %} | ||
{% set version = "22.11.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/njzjz/nodejs-wheel/archive/v{{ version }}.tar.gz | ||
sha256: 66a58de579f1d2fb64aa021ef324877375beb0b86596d4ddb4edfadcbb714f81 | ||
patches: | ||
- 0001-hack-ROOT_DIR.patch | ||
|
||
build: | ||
noarch: python | ||
number: 0 | ||
script_env: | ||
- SETUPTOOLS_SCM_PRETEND_VERSION={{version}} | ||
- SKBUILD_WHEEL_CMAKE=0 | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
|
||
requirements: | ||
host: | ||
- python {{ python_min }} | ||
- pip | ||
- scikit-build-core | ||
run: | ||
- python >={{ python_min }} | ||
# unpin nodejs, so downstream packages can control the version | ||
- nodejs | ||
|
||
test: | ||
imports: | ||
- nodejs_wheel | ||
requires: | ||
- python {{ python_min }} | ||
- pip | ||
commands: | ||
- python -m nodejs_wheel --version | ||
- pip check | ||
|
||
about: | ||
home: https://github.com/njzjz/nodejs-wheel | ||
summary: 'Python wrapper for Node.js wheels' | ||
description: | | ||
On PyPI, nodejs-wheel is unoffical Node.js wheels; | ||
on conda-forge, only the Python wrapper is provided. | ||
license: MIT | ||
license_family: MIT | ||
license_file: LICENSE | ||
doc_url: https://github.com/njzjz/nodejs-wheel | ||
dev_url: https://github.com/njzjz/nodejs-wheel | ||
|
||
extra: | ||
recipe-maintainers: | ||
- njzjz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from nodejs_wheel import ( | ||
node, | ||
npm, | ||
npx, | ||
) | ||
|
||
|
||
return_code0 = node(["--version"]) | ||
assert return_code0 == 0 | ||
|
||
return_code1 = npm(["--version"]) | ||
assert return_code1 == 0 | ||
|
||
return_code2 = npx(["--version"]) | ||
assert return_code2 == 0 |