Skip to main content

Use PDM inside Nox sessions

Project description

nox-pdm

Use PDM inside Nox sessions

This package provides a drop-in replacement for the nox.session decorator, and for the nox.Session object passed to user-defined session functions. This enables session.install to install packages at the versions specified in the pdm.lock file.

from nox_pdm import session, Session

@session(python=["3.10", "3.9"])
def tests(session: Session):
    # To install all packages in dependency group `tests` while using pdm.lock as constraint
    session.install(".[tests]")
    session.run("pytest")

Installation

Install nox-pdm from the Python Package Index:

pip install nox-pdm

Important: This package must be installed into the same environment that Nox is run from. If you installed Nox using pipx, use the following command to install this package into the same environment:

pipx inject nox nox-pdm

Requirements

  • Python 3.9+
  • PDM >= 2.12.0

You need to have a PDM installation on your system. It does not have to be in the same environment, but at the very least running the command pdm should work. nox-pdm uses PDM via its command-line interface.

Credits

This project was inspired by Claudio Jolowicz's https://pypi.org/project/nox-poetry.

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

nox_pdm-0.0.3.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

nox_pdm-0.0.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file nox_pdm-0.0.3.tar.gz.

File metadata

  • Download URL: nox_pdm-0.0.3.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nox_pdm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8636111313e6c8cd87a25f51c7fd79ef9f6a831a77c8d195667199af7557ff58
MD5 65dc2a02400c6f1be9d489e1689a2a14
BLAKE2b-256 4b1a6dc68a351b9fa06533db73dc5b035473d2e5f4c0ddd751bd4e164a11db5c

See more details on using hashes here.

File details

Details for the file nox_pdm-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: nox_pdm-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nox_pdm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 025fe078d66d535fcff60ac3c543f1a7f69e1e9e290389752cb78e45242e0ca3
MD5 0fd4f27c51592f9e521f99b45c8fb3f5
BLAKE2b-256 8fced09c3e68e8274ad9f60b6e65adab4fae91a1da3bd11cc9a5ff088a05c007

See more details on using hashes here.

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