mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Upgrade Requirement Minimums
- Upgrade requirements to specify more current minimums - Remove compatability code from sphinxgen for old versions - Upgrade pyinstaller to a minimum version that works with latest macOS
This commit is contained in:
@@ -7,10 +7,8 @@
|
||||
import os.path as op
|
||||
import re
|
||||
|
||||
from distutils.version import LooseVersion
|
||||
from pkg_resources import load_entry_point, get_distribution
|
||||
|
||||
from .build import read_changelog_file, filereplace
|
||||
from sphinx.cmd.build import build_main as sphinx_build
|
||||
|
||||
CHANGELOG_FORMAT = """
|
||||
{version} ({date})
|
||||
@@ -73,26 +71,10 @@ def gen(
|
||||
if op.exists(confpath):
|
||||
conf_out = op.join(basepath, "conf.py")
|
||||
filereplace(confpath, conf_out, **confrepl)
|
||||
if LooseVersion(get_distribution("sphinx").version) >= LooseVersion("1.7.0"):
|
||||
from sphinx.cmd.build import build_main as sphinx_build
|
||||
|
||||
# Call the sphinx_build function, which is the same as doing sphinx-build from cli
|
||||
try:
|
||||
sphinx_build([basepath, destpath])
|
||||
except SystemExit:
|
||||
print(
|
||||
"Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit"
|
||||
)
|
||||
else:
|
||||
# We used to call sphinx-build with print_and_do(), but the problem was that the virtualenv
|
||||
# of the calling python wasn't correctly considered and caused problems with documentation
|
||||
# relying on autodoc (which tries to import the module to auto-document, but fail because of
|
||||
# missing dependencies which are in the virtualenv). Here, we do exactly what is done when
|
||||
# calling the command from bash.
|
||||
cmd = load_entry_point("Sphinx", "console_scripts", "sphinx-build")
|
||||
try:
|
||||
cmd(["sphinx-build", basepath, destpath])
|
||||
except SystemExit:
|
||||
print(
|
||||
"Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit"
|
||||
)
|
||||
# Call the sphinx_build function, which is the same as doing sphinx-build from cli
|
||||
try:
|
||||
sphinx_build([basepath, destpath])
|
||||
except SystemExit:
|
||||
print(
|
||||
"Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user