Skip to content

Commit

Permalink
Do not require importlib_metadata on python 3.8. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeggyCal committed Apr 21, 2020
1 parent ffda035 commit c40c83f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def read_file(path_segments):
"pynacl>=0.3.0",
"typing_extensions>=3.5",
'typing>=3.5;python_version<"3.5"',
"importlib_metadata",
'importlib_metadata;python_version<"3.8"',
],
long_description=read_file(("README.rst",)),
keywords="json",
Expand Down
5 changes: 4 additions & 1 deletion signedjson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from importlib_metadata import version, PackageNotFoundError
try:
from importlib.metadata import version, PackageNotFoundError
except ImportError: # pragma: nocover
from importlib_metadata import version, PackageNotFoundError

try:
__version__ = version(__name__)
Expand Down

0 comments on commit c40c83f

Please sign in to comment.