From f6c43b3f8c4410f1ebd32af4d986538c89cbacfd Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Wed, 21 Apr 2021 18:12:45 +0200 Subject: [PATCH] Use importlib in setup.py instead of imp Change-Id: Ic35de1260d31ce0abd83ce79ffd33909be15e7ea --- setup.py | 6 +++--- tox.ini | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 31a3dde..3de8bad 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ +"""Setup""" #!/usr/bin/env python3 - -import imp +import importlib import sys from setuptools import setup, find_packages @@ -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", diff --git a/tox.ini b/tox.ini index 110b422..738a366 100644 --- a/tox.ini +++ b/tox.ini @@ -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