1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
diff --unified --recursive --text --new-file cmake-lint-1.4.2.orig/setup.py cmake-lint-1.4.2/setup.py
--- cmake-lint-1.4.2.orig/setup.py 2024-04-22 15:48:16.433625415 +0200
+++ cmake-lint-1.4.2/setup.py 2024-04-22 15:59:27.546256097 +0200
@@ -1,22 +1,13 @@
#! /usr/bin/env python
-import imp
+from importlib.machinery import SourceFileLoader
from setuptools import setup
def get_version():
- ver_file = None
- try:
- ver_file, pathname, description = imp.find_module(
- '__version__', ['cmakelint'])
- vermod = imp.load_module(
- '__version__', ver_file, pathname, description)
- version = vermod.VERSION
- return version
- finally:
- if ver_file is not None:
- ver_file.close()
+ version_module = SourceFileLoader('__version__', 'cmakelint/__version__.py').load_module()
+ return version_module.VERSION
def read_without_comments(filename):
@@ -30,7 +21,6 @@
setup(name='cmakelint',
version=get_version(),
packages=['cmakelint'],
- scripts=['bin/cmakelint'],
entry_points={
'console_scripts': [
'cmakelint = cmakelint.main:main'
diff --unified --recursive --text --new-file cmake-lint-1.4.2.orig/test/cmakelint_test.py cmake-lint-1.4.2/test/cmakelint_test.py
--- cmake-lint-1.4.2.orig/test/cmakelint_test.py 2024-04-22 15:48:16.433625415 +0200
+++ cmake-lint-1.4.2/test/cmakelint_test.py 2024-04-22 15:59:27.539589434 +0200
@@ -19,7 +19,7 @@
import cmakelint.__version__
import cmakelint.main
-import mock
+from unittest import mock
# stderr suppression from https://stackoverflow.com/a/1810086
|