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.2.1.tar.gz (5.9 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.2.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

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

Hashes for npm2rez-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d796e5531912629bcb5401da1464c7e8ce6b16ab848b876867da4ee2d5d0c63b
MD5 60d290dc2a032ba4273a7a3b9e205511
BLAKE2b-256 1542d8ecbb5e353066b4cf54bf0c551059fef9fd38fe1412ecebea8c957b38aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for npm2rez-0.2.1.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.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

Hashes for npm2rez-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e342d11313de22c900395312e339b44fc2a0d55c1425148ac2a20cf21d948e7
MD5 b1c09bb6179034d03324d69f1a1fe981
BLAKE2b-256 dd143701c12a1d2474ef15428a00ea151d93bdedfbcadc9df058be4204fa03c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for npm2rez-0.2.1-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