-
Notifications
You must be signed in to change notification settings - Fork 4.2k
On a Mac, check if xcode installed before requiring watchdog #66
Copy link
Copy link
Closed
Labels
type:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Streamlit watches files in the current folder for changes by using one of two methods:
- The
watchdogPython module, which uses OS-level event-based APIs - A custom module that polls the files we care about every so often.
If the watchdog module is available on the user's system, we currently use Method 1. If not, we use Method 2.
The problem is that the watchdog module it compiled locally by Pip when the user pip-installs it -- and on a Mac this compilation step requires the free XCode CLI tools with:
xcode-select --install
So what we'd like to do is:
- Modify
setup.pyso we check whether xcode tools are available before makingwatchdoga dependency (only if the current system is a Mac, of course). - In
LocalSourcesWatcher.py, when we fall back to the polling solution, print a message telling the user to install the watchdog module (see below). - Add config option to turn that message off:
global.disableWatchdogWarning
Message:
For better performance, install the Watchdog module:
$ xcode-select --install [only show this message if on a Mac]
$ pip install watchdog
(leave a blank line at the end, so the message does not merge with whatever we print after it.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features