Files
ports/www/py-webob/files/patch-docs_conf.py
T
Xin LI 778bf1a5b2 www/py-webob: upgrade to 1.8.9 and use PEP517.
PR:		ports/293851
Approved by:	maintainer (nivit@)
2026-04-12 09:57:33 -07:00

24 lines
736 B
Python

--- docs/conf.py.orig 2024-08-14 05:06:46 UTC
+++ docs/conf.py
@@ -1,8 +1,10 @@
-import pkg_resources
+import importlib.metadata as metadata
import sys
import os
import shlex
+sys.path.insert(0, os.path.abspath('../src'))
+
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
@@ -27,7 +29,7 @@ author = u'Ian Bicking, Pylons Project, and contributo
copyright = u'2018, Ian Bicking, Pylons Project and contributors'
author = u'Ian Bicking, Pylons Project, and contributors'
-version = release = pkg_resources.get_distribution('webob').version
+version = release = metadata.version("webob")
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.