Closed KristianHolsheimer closed 3 years ago
@GaretJax The CI pipeline is failing, because pyaml doesn't like python 3.4:
Collecting PyYAML>=3.10 (from -r requirements.txt (line 4)) PyYAML requires Python '>=2.7, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.*' but the running Python is 3.4.8
Would you be able to fix this? And if so, would you be able to let me know when I can rebase?
Thanks for this PR @KristianHolsheimer! I recently got the commit bit here -- #81 -- I'm taking a bit of time modernizing stuff here.
I'll ping you here once all of that is done! ^>^
This looks like a reasonable alternative fix for #58.
Here's the updated patch for this:
diff --git a/pyproject.toml b/pyproject.toml
index faaf9dd..5772558 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,6 +25,7 @@ classifiers = [
home-page = "https://github.com/GaretJax/sphinx_autobuild"
license = "MIT"
requires = [
+ "sphinx",
"watchdog",
"livereload",
]
diff --git a/src/sphinx_autobuild/sphinx.py b/src/sphinx_autobuild/sphinx.py
index edf41ea..d14c5c7 100644
--- a/src/sphinx_autobuild/sphinx.py
+++ b/src/sphinx_autobuild/sphinx.py
@@ -61,7 +61,7 @@ class SphinxBuilder(object):
sys.stdout.write("-" * (81 - len(pre)))
sys.stdout.write("\n")
- args = ["sphinx-build"] + self._args
+ args = [sys.executable, "-m", "sphinx"] + self._args
if pty:
master, slave = pty.openpty()
stdout = os.fdopen(master)
Feel free to add me as a co-author on the commit if you want, by including the following line in the commit message:
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
@pradyunsg I rebased on develop
Many thanks @KristianHolsheimer! ^>^
Fixes #58 Fixes #74
Some of my CI/CD pipelines were failing because of this. The problem arises if
sphinx-build
in the local PATH points to a different python version from the mainsys.executable
.