Skip to content

Commit

Permalink
Fix readthedocs build by not importing setuptools_scm if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz committed Apr 11, 2021
1 parent 01b4b3f commit abf927e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
# serve to show the default.

import os
import subprocess
import sys

import setuptools_scm

try:
from importlib import metadata
Expand Down Expand Up @@ -73,6 +69,7 @@
if os.environ.get("READTHEDOCS") == "True":
version = metadata.version("pymediainfo")
else:
import setuptools_scm
# fallback_root must be specified for this to work with PyPI tarballs
version = setuptools_scm.get_version(root="..", fallback_root="..", relative_to=__file__)
# The full version, including alpha/beta/rc tags.
Expand Down

0 comments on commit abf927e

Please sign in to comment.