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:
Andrew Senetar 2021-08-07 19:28:41 -05:00
parent c51a82a2ce
commit cb3bbbec6e
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
3 changed files with 14 additions and 32 deletions

View File

@ -7,10 +7,8 @@
import os.path as op import os.path as op
import re import re
from distutils.version import LooseVersion
from pkg_resources import load_entry_point, get_distribution
from .build import read_changelog_file, filereplace from .build import read_changelog_file, filereplace
from sphinx.cmd.build import build_main as sphinx_build
CHANGELOG_FORMAT = """ CHANGELOG_FORMAT = """
{version} ({date}) {version} ({date})
@ -73,9 +71,6 @@ def gen(
if op.exists(confpath): if op.exists(confpath):
conf_out = op.join(basepath, "conf.py") conf_out = op.join(basepath, "conf.py")
filereplace(confpath, conf_out, **confrepl) 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 # Call the sphinx_build function, which is the same as doing sphinx-build from cli
try: try:
sphinx_build([basepath, destpath]) sphinx_build([basepath, destpath])
@ -83,16 +78,3 @@ def gen(
print( print(
"Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit" "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"
)

View File

@ -1,5 +1,5 @@
pytest>=5,<6 pytest>=6,<7
flake8 flake8
tox-travis tox-travis
black black
pyinstaller>=4.0,<5.0; sys_platform != 'linux' pyinstaller>=4.5,<5.0; sys_platform != 'linux'

View File

@ -1,7 +1,7 @@
Send2Trash>=1.3.0 Send2Trash>=1.3.0
sphinx>=1.2.2 sphinx>=3.0.0
polib>=1.0.4 polib>=1.1.0
hsaudiotag3k>=1.1.3* hsaudiotag3k>=1.1.3*
distro>=1.5.0 distro>=1.5.0
PyQt5 >=5.4,<6.0; sys_platform != 'linux' PyQt5 >=5.14.1,<6.0; sys_platform != 'linux'
pywin32>=200; sys_platform == 'win32' pywin32>=228; sys_platform == 'win32'