Skip to content

Commit

Permalink
Support pip installation more sensibly (#116)
Browse files Browse the repository at this point in the history
* Updated pyproject.toml to install an executable to the bin directory that links back to the server main function
* Specified dependencies in pyproject.toml

Co-authored-by: Jeremy Nimmer <[email protected]>
  • Loading branch information
marip8 and jwnimmer-tri authored Feb 11, 2025
1 parent 36919c6 commit 2dc64bc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,13 @@ jobs:
with:
path: ~/.cache/bazel_ci
key: bazel_ci-${{ github.ref }}-${{ github.run_number }}-${{ github.run_attempt }}
install_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- run: pip install .
- run: drake-blender-server --help
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# SPDX-License-Identifier: BSD-2-Clause
# Contains configuration settings for linting Python.

[project]
name = "drake-blender"
version = "0.2.1.dev0"
# NOTE TO MAINTAINERS: when editing this list, you must copy the identical
# update into requirements.in as well.
dependencies = [
"bpy==3.6.0",
"flask"
]

[project.scripts]
drake-blender-server = "server:main"

[tool.black]
line-length = 79
Expand Down
6 changes: 6 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# To compile this file into requirements.txt, run:
# ./tools/upgrade.sh

# NOTE TO MAINTAINERS: when editing this file, you must copy the identical
# update into pyproject.toml as well.
#
# TODO(jwnimmer-tri) Figure out how to keep only a single copy of our list
# of dependencies.

# TODO(jwnimmer-tri) When upgrading to blender 4.0, we'll need to figure out
# how to make depth and label images work correctly.
bpy==3.6.0
Expand Down

0 comments on commit 2dc64bc

Please sign in to comment.