Skip to content

Commit

Permalink
Use importlib in setup.py instead of imp
Browse files Browse the repository at this point in the history
Change-Id: Ic35de1260d31ce0abd83ce79ffd33909be15e7ea
  • Loading branch information
adrien-berchet committed Apr 21, 2021
1 parent c8d3fee commit f6c43b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Setup"""
#!/usr/bin/env python3

import imp
import importlib
import sys

from setuptools import setup, find_packages
Expand All @@ -24,7 +24,7 @@
with open("requirements/test.pip") as f:
test_reqs = f.read().splitlines()

VERSION = imp.load_source("", "src/version.py").VERSION
VERSION = importlib.import_module("src.version").VERSION

setup(
name="synthesis-workflow",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ commands =
black --check --line-length {[base]max_line_length} tests
black --check --line-length {[base]max_line_length} setup.py
black --check --line-length {[base]max_line_length} doc/source/conf.py
pylint src/{[base]name} src/{[base]morphval} doc/source/conf.py
pylint src/{[base]name} src/{[base]morphval} doc/source/conf.py setup.py

[testenv:format]
skip_install = true
Expand Down

0 comments on commit f6c43b3

Please sign in to comment.