Skip to content

Commit 62dd888

Browse files
lurchwillmcgugan
authored andcommitted
Add extra 'clean' rules to Makefile, and get 'make docs' working (#299)
1 parent 6bb366b commit 62dd888

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Makefile

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11

22
.PHONY: release
3-
release:
4-
rm dist/*.whl dist/*.tar.gz
3+
release: cleandist
54
python3 setup.py sdist bdist_wheel
65
twine upload dist/*.whl dist/*.tar.gz
76

7+
.PHONY: cleandist
8+
cleandist:
9+
rm -f dist/*.whl dist/*.tar.gz
10+
11+
.PHONY: cleandocs
12+
cleandocs:
13+
$(MAKE) -C docs clean
14+
15+
.PHONY: clean
16+
clean: cleandist cleandocs
17+
818
.PHONY: test
919
test:
1020
nosetests --with-coverage --cover-package=fs -a "!slow" tests
@@ -19,7 +29,7 @@ testall:
1929

2030
.PHONY: docs
2131
docs:
22-
cd docs && make html
32+
$(MAKE) -C docs html
2333
python -c "import os, webbrowser; webbrowser.open('file://' + os.path.abspath('./docs/build/html/index.html'))"
2434

2535
.PHONY: typecheck

docs/source/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import sys
1616
import os
17-
from fs import __version__
1817

1918

2019
import sphinx_rtd_theme
@@ -26,7 +25,7 @@
2625
# If extensions (or modules to document with autodoc) are in another directory,
2726
# add these directories to sys.path here. If the directory is relative to the
2827
# documentation root, use os.path.abspath to make it absolute, like shown here.
29-
#sys.path.insert(0, os.path.abspath('.'))
28+
sys.path.insert(0, os.path.abspath('../..'))
3029

3130
# -- General configuration ------------------------------------------------
3231

@@ -71,6 +70,7 @@
7170
# |version| and |release|, also used in various other places throughout the
7271
# built documents.
7372
#
73+
from fs import __version__
7474
# The short X.Y version.
7575
version = '.'.join(__version__.split('.')[:2])
7676
# The full version, including alpha/beta/rc tags.
@@ -303,4 +303,4 @@
303303
# If true, do not generate a @detailmenu in the "Top" node's menu.
304304
#texinfo_no_detailmenu = False
305305

306-
napoleon_include_special_with_doc = True
306+
napoleon_include_special_with_doc = True

0 commit comments

Comments
 (0)