Skip to content

Commit cf8473d

Browse files
committed
Get the version from the pytest_dependency module rather then the
.version file.
1 parent 5952588 commit cf8473d

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
PYTHON = python3
2-
BUILDDIR = $(CURDIR)/build
2+
BUILDLIB = $(CURDIR)/build/lib
33

44

55
build:
66
$(PYTHON) setup.py build
77

88
test: build
9-
PYTHONPATH=$(BUILDDIR)/lib $(PYTHON) -m pytest tests
9+
PYTHONPATH=$(BUILDLIB) $(PYTHON) -m pytest tests
1010

1111
sdist:
1212
$(PYTHON) setup.py sdist
1313

14-
doc-html: .version
15-
$(MAKE) -C doc html
14+
doc-html: build
15+
$(MAKE) -C doc html PYTHONPATH=$(BUILDLIB)
1616

1717
clean:
1818
rm -f *~ tests/*~
@@ -27,7 +27,4 @@ distclean: clean
2727
rm -rf pytest_dependency.egg-info
2828
$(MAKE) -C doc distclean
2929

30-
.version:
31-
$(PYTHON) setup.py check
32-
3330
.PHONY: build test sdist doc-html clean distclean

doc/src/conf.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
# full list see the documentation:
77
# http://www.sphinx-doc.org/en/master/config
88

9-
# -- Path setup --------------------------------------------------------------
10-
11-
from pathlib import Path
12-
import sys
13-
topdir = Path("../..").resolve()
14-
sys.path.insert(0, str(topdir))
15-
9+
import pytest_dependency
1610

1711
# -- Project information -----------------------------------------------------
1812

@@ -21,8 +15,7 @@
2115
author = 'Rolf Krahl'
2216

2317
# The full version, including alpha/beta/rc tags
24-
with (topdir / ".version").open("rt") as f:
25-
release = f.read()
18+
release = pytest_dependency.__version__
2619
# The short X.Y version
2720
version = ".".join(release.split(".")[0:2])
2821

0 commit comments

Comments
 (0)