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.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

nox_pdm-0.0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nox_pdm-0.0.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.5

File hashes

Hashes for nox_pdm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8de2f5e81c1e4ac0265547ae09b09b945b67b7510b1208b9f38df928bfb7a8e2
MD5 fb88488f9deda55a4f0569ff339082c1
BLAKE2b-256 e5e8549231d00757b6b821f887d33981bceeffef57ee7a5d2a4462d58d9c1082

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nox_pdm-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.5

File hashes

Hashes for nox_pdm-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b3e6de2a125a68d6999ecca1a1f129e583f6ec740ac515740d7e9fa09cd50fa
MD5 7ba412a4bbb066a62e4269db82b4be93
BLAKE2b-256 8ca9e7cece8cd2db5cfc163d22363bc96cf150125d2863f3d88bcb632801e1cc

See more details on using hashes here.

Supported by

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