Skip to content

Commit ff7e227

Browse files
committed
Merge branch 'entr'
2 parents 7b59057 + b8c4168 commit ff7e227

File tree

5 files changed

+22
-79
lines changed

5 files changed

+22
-79
lines changed

.tmuxp.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ windows:
1212
panes:
1313
- focus: true
1414
- pane
15-
- sniffer
15+
- if command -v entr > /dev/null; then find . -type f -not -path '*/\.*' | grep -i '.*[.]py$' | entr -c ./run-tests.py; else ./run-tests.py; echo "\nInstall entr(1) to automatically run tests on file change.\n See http://entrproject.org/"; fi
16+
1617
- window_name: docs
1718
layout: main-horizontal
1819
options:
@@ -24,4 +25,4 @@ windows:
2425
- focus: true
2526
- pane
2627
- echo 'docs built to <http://0.0.0.0:8003/_build/html>'; python -m SimpleHTTPServer 8003
27-
- sniffer
28+
- if command -v entr > /dev/null; then find .. -print | grep -i '.*[.]rst' | entr -c make html; else make html; echo "\nInstall entr(1) to automatically rebuild documentation when files change. \nSee http://entrproject.org/"; fi

bootstrap_env.py

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

107107

108108
def main():
109+
if not which('entr', throw=False):
110+
message = (
111+
'\nentr(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/\n'
114+
)
115+
print(message)
116+
109117
if not virtualenv_exists:
110118
virtualenv_bin = which('virtualenv', throw=False)
111119

@@ -117,24 +125,6 @@ def main():
117125
[pip_bin, 'install', '-e', project_dir]
118126
)
119127

120-
if not os.path.isfile(os.path.join(env_dir, 'bin', 'sniffer')):
121-
subprocess.check_call(
122-
[pip_bin, 'install', 'sniffer']
123-
)
124-
125-
if platform.system() == 'Linux':
126-
subprocess.check_call(
127-
[pip_bin, 'install', 'pyinotify']
128-
)
129-
elif platform.system() == 'Darwin':
130-
subprocess.check_call(
131-
[pip_bin, 'install', 'MacFSEvents']
132-
)
133-
elif platform.system() == 'Windows':
134-
subprocess.check_call(
135-
[pip_bin, 'install', 'pywin32']
136-
)
137-
138128
if not os.path.isfile(os.path.join(env_dir, 'bin', 'sphinx-quickstart')):
139129
subprocess.check_call(
140130
[pip_bin, 'install', '-r', sphinx_requirements_filepath]

doc/developing.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,25 @@ Run tests on save
134134
You can re-run tests automatically on file edit.
135135

136136
.. note::
137-
This requires and installation of ``sniffer`` from pypi.
137+
This requires ``entr(1)``.
138138

139-
Install `sniffer`_ from `pypi`_:
139+
Install `entr`_. Packages are available available on most Linux and BSD
140+
variants, including Debian, Ubuntu, FreeBSD, OS X.
141+
142+
To run all tests upon editing any ``.py`` file:
140143

141144
.. code-block:: bash
142145
143-
$ pip install sniffer
146+
$ find . -type f -not -path '*/\.*' | grep -i '.*[.]py$' | entr -c ./run-tests.py
144147
145-
To run all tests upon editing any ``.py`` file:
148+
.. _entr: http://entrproject.org/
146149

147-
.. code-block:: bash
150+
Rebuild the documentation when an ``.rst`` file is edited:
148151

149-
$ sniffer
152+
.. code-block:: bash
150153
151-
.. _sniffer: https://github.com/jeffh/sniffer
152-
.. _pypi: https://pypi.python.org/pypi
154+
$ cd doc
155+
$ find .. -print | grep -i '.*[.]rst' | entr -c make html
153156
154157
.. _tmuxp developer config:
155158

doc/scent.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

scent.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)