Skip to content

Commit 1bcc6ca

Browse files
committed
Remove sniffer and add entr for file watching
This works better across POSIX platforms. The lack of support for file watching on FreeBSD (lack of FSEvents, inotify) can be tricky. This pipes ``find(1)`` + ``grep(1)`` into ``entr`` and runs the desired tests at our convenience. See also: http://entrproject.org/
1 parent 7b59057 commit 1bcc6ca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.tmuxp.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ windows:
1212
panes:
1313
- focus: true
1414
- pane
15-
- sniffer
15+
- find . -type f -not -path '*/\.*' | grep -i '.*[.]py$' | entr -c ./run-tests.py
1616
- window_name: docs
1717
layout: main-horizontal
1818
options:
@@ -24,4 +24,4 @@ windows:
2424
- focus: true
2525
- pane
2626
- echo 'docs built to <http://0.0.0.0:8003/_build/html>'; python -m SimpleHTTPServer 8003
27-
- sniffer
27+
- find .. -print | grep -i '.*[.]rst' | entr -c make html

bootstrap_env.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ def which(exe=None, throw=True):
106106

107107

108108
def main():
109+
if not which('entr', throw=False):
110+
message = (
111+
'entr(1) is used in this app as a cross platform file watcher.'
112+
'You can install it via your package manager on most POSIX '
113+
'systems. See the site at http://entrproject.org/'
114+
)
115+
fail(message)
109116
if not virtualenv_exists:
110117
virtualenv_bin = which('virtualenv', throw=False)
111118

0 commit comments

Comments
 (0)