posit-dev / posit-dev/py-shiny
Problems with editable installs and setuptools >=64
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:
- https://github.com/python/mypy/issues/13392#issuecomment-1212727421
- https://github.com/pypa/setuptools/issues/3518
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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