posit-dev / posit-dev/py-shiny

Problems with editable installs and setuptools >=64

Open
#461 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Description

With Python 3.11.3, I installed Shiny in a venv for another project, with pip install -e ../py-shiny, but when I did this, the new project couldn't find the py.typed file.

I'm not 100% sure, but I believe that this is because setuptools >=64 uses a new mechanism instead of egg-link.
See:

Apparently one can also install with strict mode (https://setuptools.pypa.io/en/latest/userguide/development_mode.html#strict-editable-installs):

pip install -e ../py-shiny --config-settings editable_mode=strict

I tried this with py-shiny, and it resulted in the JS and CSS web assets not being available when running an app. So we'll probably want to fix it in that case.

What does work for now is to use compat mode:

pip install -e ../py-shiny --config-settings editable_mode=compat

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the editable install with Python 3.11.3 using pip install -e ../py-shiny, then compare the default and strict modes described in the issue. Verify that strict editable installs expose both py.typed and the JavaScript and CSS web assets when running an app; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.