Convert npm packages to rez packages
Project description
npm2rez
A tool to convert Node.js packages to rez packages for VFX and animation pipeline integration.
Features
- Support for installing Node.js packages from npm or GitHub
- Automatically create rez-compliant package structure
- Configure correct environment variables and paths
- Support for executable creation and configuration
- Generate detailed documentation and changelogs
Installation
# Install from PyPI
pip install npm2rez
# Or use uv to install
uv pip install npm2rez
# Or install from source
git clone https://github.com/loonghao/npm2rez.git
cd npm2rez
uv pip install -e .
Usage
Basic Usage
# Run with uvx (recommended)
uvx npm2rez --name typescript --version 4.9.5 --source npm --node-version 16.14.0
# Or run directly
npm2rez --name typescript --version 4.9.5 --source npm --node-version 16.14.0
# Create package from GitHub
uvx npm2rez --name typescript --version 4.9.5 --source github --repo microsoft/TypeScript
Command Line Arguments
| Parameter | Description | Default |
|---|---|---|
--name |
Package name | (required) |
--version |
Package version | (required) |
--source |
Package source (npm or github) | npm |
--repo |
GitHub repository (format: user/repo), required when source=github | None |
--output |
Output directory | ./rez-packages |
--node-version |
Node.js version requirement | 16 |
--global |
Install package globally | False |
--install |
Install package after creation | False |
Examples
Creating a TypeScript Package
npm2rez --name typescript --version 4.9.5
This will create a rez package for TypeScript version 4.9.5.
Using the Created Package
# Activate the package environment
rez env typescript-4.9.5
# Or directly run the executable
rez env typescript-4.9.5 -- tsc --version
Development
# Clone the repository
git clone https://github.com/loonghao/npm2rez.git
cd npm2rez
# Install development dependencies
uv pip install -e ".[dev]"
# Run tests
uvx nox -s pytest
# Run real package tests
uvx nox -s pytest-real-packages
# Run linting
uvx nox -s lint
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file npm2rez-0.2.1.tar.gz.
File metadata
- Download URL: npm2rez-0.2.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d796e5531912629bcb5401da1464c7e8ce6b16ab848b876867da4ee2d5d0c63b
|
|
| MD5 |
60d290dc2a032ba4273a7a3b9e205511
|
|
| BLAKE2b-256 |
1542d8ecbb5e353066b4cf54bf0c551059fef9fd38fe1412ecebea8c957b38aa
|
Provenance
The following attestation bundles were made for npm2rez-0.2.1.tar.gz:
Publisher:
python-publish.yml on loonghao/npm2rez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npm2rez-0.2.1.tar.gz -
Subject digest:
d796e5531912629bcb5401da1464c7e8ce6b16ab848b876867da4ee2d5d0c63b - Sigstore transparency entry: 179382258
- Sigstore integration time:
-
Permalink:
loonghao/npm2rez@a4ff3e6e8d3bad58a80220f6a9cb027d22f00c6d -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/loonghao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a4ff3e6e8d3bad58a80220f6a9cb027d22f00c6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file npm2rez-0.2.1-py3-none-any.whl.
File metadata
- Download URL: npm2rez-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e342d11313de22c900395312e339b44fc2a0d55c1425148ac2a20cf21d948e7
|
|
| MD5 |
b1c09bb6179034d03324d69f1a1fe981
|
|
| BLAKE2b-256 |
dd143701c12a1d2474ef15428a00ea151d93bdedfbcadc9df058be4204fa03c7
|
Provenance
The following attestation bundles were made for npm2rez-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on loonghao/npm2rez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npm2rez-0.2.1-py3-none-any.whl -
Subject digest:
5e342d11313de22c900395312e339b44fc2a0d55c1425148ac2a20cf21d948e7 - Sigstore transparency entry: 179382262
- Sigstore integration time:
-
Permalink:
loonghao/npm2rez@a4ff3e6e8d3bad58a80220f6a9cb027d22f00c6d -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/loonghao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a4ff3e6e8d3bad58a80220f6a9cb027d22f00c6d -
Trigger Event:
push
-
Statement type: