Skip to content

Commit

Permalink
Try fix tests in 3.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Dec 12, 2023
1 parent fcfa969 commit c73eb3c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import importlib.metadata
import os
import sys
import textwrap
import warnings

import pkg_resources

import rdata

Expand All @@ -44,16 +42,15 @@
language = "en"

try:
release = pkg_resources.get_distribution("rdata").version
except pkg_resources.DistributionNotFound:
release = importlib.metadata.version("rdata")
except importlib.metadata.PackageNotFoundError:
print(
f"To build the documentation, The distribution information of\n"
f"{project} has to be available. Either install the package\n"
f"into your development environment or run 'setup.py develop'\n"
f"to setup the metadata. A virtualenv is recommended!\n",
)
sys.exit(1)
del pkg_resources

version = ".".join(release.split(".")[:2])

Expand Down

0 comments on commit c73eb3c

Please sign in to comment.