Skip to main content

Convert npm packages to rez packages

Project description

npm2rez

npm2rez Logo

A tool to convert Node.js packages to rez packages for VFX and animation pipeline integration.

PyPI version Python Version Downloads Code style: ruff License: MIT codecov

English | 中文

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npm2rez-0.3.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npm2rez-0.3.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file npm2rez-0.3.0.tar.gz.

File metadata

  • Download URL: npm2rez-0.3.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for npm2rez-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3c8f27c3213abdeeccabc702803fd42f144dd745131dd70a4cbb74a5fb4fa4aa
MD5 71137e2cf7b22089422b986350eae0e0
BLAKE2b-256 26dcd6f8193ff859a5b9a798e44b58d19cc72e1372c8100d757493c021d0a58a

See more details on using hashes here.

Provenance

The following attestation bundles were made for npm2rez-0.3.0.tar.gz:

Publisher: python-publish.yml on loonghao/npm2rez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file npm2rez-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: npm2rez-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for npm2rez-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c574a0f3bfb7632b5cca5880c6fee09b6d63e30866c71c11894d373f19741d0d
MD5 7f4e1554314a7394cf3ef84edeb8d333
BLAKE2b-256 ab3a918899776b62278dcb5599d8508f389abb76c51c2887f32a72eab8f026d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for npm2rez-0.3.0-py3-none-any.whl:

Publisher: python-publish.yml on loonghao/npm2rez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page