summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-26 17:08:06 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-26 17:47:38 +0100
commit5593c8f4117fd64328d312523f756ba9ed650822 (patch)
treeace36fa52506e3076b018745bfca1f1963d4f8de
parent579585d55423914dc6b120b5a454000573ce67d7 (diff)
downloadqutebrowser-5593c8f4117fd64328d312523f756ba9ed650822.tar.gz
qutebrowser-5593c8f4117fd64328d312523f756ba9ed650822.zip
Finish dropping pkg_resources
Closes #4467
-rw-r--r--README.asciidoc2
-rw-r--r--doc/changelog.asciidoc5
-rw-r--r--qutebrowser/misc/earlyinit.py1
-rw-r--r--qutebrowser/utils/utils.py4
4 files changed, 4 insertions, 8 deletions
diff --git a/README.asciidoc b/README.asciidoc
index 6867a5acc..4e35e83c3 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -91,8 +91,6 @@ unpatched vulnerabilities. Please use it carefully and avoid visiting untrusted
websites and using it for transmission of sensitive data._
* https://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.12.0 or newer
for Python 3
-* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools] (being
- phased out for qutebrowser v2.0.0)
* https://palletsprojects.com/p/jinja/[jinja2]
* https://pygments.org/[pygments]
* https://github.com/yaml/pyyaml[PyYAML]
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index f8442bb9b..45c32638d 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -32,7 +32,7 @@ Major changes
if not used elsewhere - it's https://fdik.org/pyPEG2/[inactive upstream]
and the repository was removed by Bitbucket).
* Move the `pygments` dependency from required to optional.
- * TODO: Move the `setuptools` dependency from runtime (for `pkg_resources`) to
+ * Move the `setuptools` dependency from runtime (for `pkg_resources`) to
build-time.
* For Python 3.6, 3.7 or 3.8, add a dependency on the `importlib_resources`
backport.
@@ -66,8 +66,7 @@ Major changes
used when using `:view-source` with QtWebKit, or when forcing it via
`:view-source --pygments` on QtWebEngine. If it is unavailable, an
unhighlighted fallback version of the page's source is shown.
-- TODO: The former dependency on the `pkg_resources` module (part of the
- `setuptools` project) got dropped.
+- The former dependency on the `pkg_resources` module (part of the `setuptools`project) got dropped.
- A new dependency on the `importlib_resources` module got introduced for
Python versions up to and including 3.8. Note that the stdlib
`importlib.resources` module for Python 3.7 and 3.8 is missing the needed APIs,
diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py
index 1938a8361..d871423f7 100644
--- a/qutebrowser/misc/earlyinit.py
+++ b/qutebrowser/misc/earlyinit.py
@@ -224,7 +224,6 @@ def _check_modules(modules):
def check_libraries():
"""Check if all needed Python libraries are installed."""
modules = {
- 'pkg_resources': _missing_str("pkg_resources/setuptools"),
'jinja2': _missing_str("jinja2"),
'yaml': _missing_str("PyYAML"),
'dataclasses': _missing_str("dataclasses"),
diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py
index bd22101de..483a9a6f3 100644
--- a/qutebrowser/utils/utils.py
+++ b/qutebrowser/utils/utils.py
@@ -208,8 +208,8 @@ def read_file(filename: str, binary: bool = False) -> Any:
return _resource_cache[filename]
if hasattr(sys, 'frozen'):
- # PyInstaller doesn't support pkg_resources :(
- # https://github.com/pyinstaller/pyinstaller/wiki/FAQ#misc
+ # For PyInstaller, where we can't store resource files in a qutebrowser/ folder
+ # because the executable is already named "qutebrowser" (at least on macOS).
fn = os.path.join(os.path.dirname(sys.executable), filename)
if binary:
f: IO