Skip to content

Commit

Permalink
Use PDM instead of pip-tools to manage venv
Browse files Browse the repository at this point in the history
Replace use of pip-tools to set up and maintain a Python virtual
environment (currently, only on macOS) with PDM. In addition to
supporting more modern Python conventions, including dependency groups
(which reduces the number of files involved in managing the venv), PDM
strives to be platform agnostic and should allow us to perform lock file
updates once (or at least from a single platform), rather than having to
separately update lock files for every supported platform.
  • Loading branch information
mwoehlke-kitware committed Dec 27, 2024
1 parent 7b5bb38 commit 14e253e
Show file tree
Hide file tree
Showing 13 changed files with 2,546 additions and 774 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
# Platform artifacts generated by `install_prereqs`
/gen/

# Local Python venv artifacts
/.pdm-python

# User-specified configuration
/user.bazelrc
2,464 changes: 2,464 additions & 0 deletions pdm.lock

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[project]
name = "drake"
version = "1.36.0"
description = "Default template for PDM package"
authors = [
{name = "Drake Development Team", email = "drake-users@mit.edu"},
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "BSD-3-Clause"}
dependencies = [
"ipywidgets",
"matplotlib",
"notebook",
"Pillow",
"pydot",
"PyYAML",
]

[dependency-groups]
test = [
"flask",
"six",
"u-msgpack-python",
"websockets",
]

[tool.pdm]
distribution = false
3 changes: 0 additions & 3 deletions setup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ exports_files([
"mac/source_distribution/Brewfile",
"mac/source_distribution/Brewfile-doc-only",
"mac/source_distribution/Brewfile-maintainer-only",
"mac/source_distribution/requirements.txt",
"mac/source_distribution/requirements-maintainer-only.txt",
"mac/source_distribution/requirements-test-only.txt",
"ubuntu/binary_distribution/packages-jammy.txt",
"ubuntu/source_distribution/packages-jammy.txt",
"ubuntu/source_distribution/packages-jammy-clang.txt",
Expand Down
21 changes: 0 additions & 21 deletions setup/mac/source_distribution/requirements-build.in

This file was deleted.

315 changes: 0 additions & 315 deletions setup/mac/source_distribution/requirements-build.txt

This file was deleted.

Loading

0 comments on commit 14e253e

Please sign in to comment.