Skip to content

Commit a817654

Browse files
authored
Eliminate use of dead and deprecated imports and options in setup.py (#2070)
* - Delete deprecated imports and unsupported distribution options - Delete test cmdclass so that we don't break tox -e installers * Delete setup_requires * Update CHANGELOG
1 parent c403143 commit a817654

File tree

12 files changed

+1
-176
lines changed

12 files changed

+1
-176
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ All notable changes to this project will be documented in this file.
3939
* ### ALL
4040
* #### Added
4141
* #### Changed
42+
* Fix [#2069](https://github.com/ni/nimi-python/issues/2069)
4243
* #### Removed
4344
* ### `nidcpower` (NI-DCPower)
4445
* #### Added

build/templates/setup.py.mako

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,9 @@ grpc_supported = template_parameters['include_grpc_support']
88
module_version = config['module_version']
99
%>
1010

11-
from setuptools.command.test import test as test_command
1211
from setuptools import setup
1312

1413

15-
class PyTest(test_command):
16-
def finalize_options(self):
17-
test_command.finalize_options(self)
18-
self.test_args = []
19-
self.test_suite = True
20-
21-
def run_tests(self):
22-
import pytest
23-
pytest.main(self.test_args)
24-
25-
2614
pypi_name = '${config['module_name']}'
2715

2816

@@ -61,9 +49,6 @@ setup(
6149
],
6250
},
6351
% endif
64-
setup_requires=['pytest-runner', ],
65-
tests_require=['pytest'],
66-
test_suite='tests',
6752
classifiers=[
6853
"Development Status :: ${helper.get_development_status(config)}",
6954
"Intended Audience :: Developers",
@@ -81,6 +66,5 @@ setup(
8166
"Programming Language :: Python :: Implementation :: CPython",
8267
"Topic :: System :: Hardware :: Hardware Drivers"
8368
],
84-
cmdclass={'test': PyTest},
8569
package_data={pypi_name: ['VERSION']},
8670
)

generated/nidcpower/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nidcpower'
219

2210

@@ -50,9 +38,6 @@ def read_contents(file_to_read):
5038
'protobuf>=4.21.6,<5.0'
5139
],
5240
},
53-
setup_requires=['pytest-runner', ],
54-
tests_require=['pytest'],
55-
test_suite='tests',
5641
classifiers=[
5742
"Development Status :: 3 - Alpha",
5843
"Intended Audience :: Developers",
@@ -70,6 +55,5 @@ def read_contents(file_to_read):
7055
"Programming Language :: Python :: Implementation :: CPython",
7156
"Topic :: System :: Hardware :: Hardware Drivers"
7257
],
73-
cmdclass={'test': PyTest},
7458
package_data={pypi_name: ['VERSION']},
7559
)

generated/nidigital/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nidigital'
219

2210

@@ -51,9 +39,6 @@ def read_contents(file_to_read):
5139
'protobuf>=4.21.6,<5.0'
5240
],
5341
},
54-
setup_requires=['pytest-runner', ],
55-
tests_require=['pytest'],
56-
test_suite='tests',
5742
classifiers=[
5843
"Development Status :: 3 - Alpha",
5944
"Intended Audience :: Developers",
@@ -71,6 +56,5 @@ def read_contents(file_to_read):
7156
"Programming Language :: Python :: Implementation :: CPython",
7257
"Topic :: System :: Hardware :: Hardware Drivers"
7358
],
74-
cmdclass={'test': PyTest},
7559
package_data={pypi_name: ['VERSION']},
7660
)

generated/nidmm/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nidmm'
219

2210

@@ -50,9 +38,6 @@ def read_contents(file_to_read):
5038
'protobuf>=4.21.6,<5.0'
5139
],
5240
},
53-
setup_requires=['pytest-runner', ],
54-
tests_require=['pytest'],
55-
test_suite='tests',
5641
classifiers=[
5742
"Development Status :: 3 - Alpha",
5843
"Intended Audience :: Developers",
@@ -70,6 +55,5 @@ def read_contents(file_to_read):
7055
"Programming Language :: Python :: Implementation :: CPython",
7156
"Topic :: System :: Hardware :: Hardware Drivers"
7257
],
73-
cmdclass={'test': PyTest},
7458
package_data={pypi_name: ['VERSION']},
7559
)

generated/nifake/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nifake'
219

2210

@@ -51,9 +39,6 @@ def read_contents(file_to_read):
5139
'protobuf>=4.21.6,<5.0'
5240
],
5341
},
54-
setup_requires=['pytest-runner', ],
55-
tests_require=['pytest'],
56-
test_suite='tests',
5742
classifiers=[
5843
"Development Status :: 3 - Alpha",
5944
"Intended Audience :: Developers",
@@ -71,6 +56,5 @@ def read_contents(file_to_read):
7156
"Programming Language :: Python :: Implementation :: CPython",
7257
"Topic :: System :: Hardware :: Hardware Drivers"
7358
],
74-
cmdclass={'test': PyTest},
7559
package_data={pypi_name: ['VERSION']},
7660
)

generated/nifgen/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nifgen'
219

2210

@@ -51,9 +39,6 @@ def read_contents(file_to_read):
5139
'protobuf>=4.21.6,<5.0'
5240
],
5341
},
54-
setup_requires=['pytest-runner', ],
55-
tests_require=['pytest'],
56-
test_suite='tests',
5742
classifiers=[
5843
"Development Status :: 3 - Alpha",
5944
"Intended Audience :: Developers",
@@ -71,6 +56,5 @@ def read_contents(file_to_read):
7156
"Programming Language :: Python :: Implementation :: CPython",
7257
"Topic :: System :: Hardware :: Hardware Drivers"
7358
],
74-
cmdclass={'test': PyTest},
7559
package_data={pypi_name: ['VERSION']},
7660
)

generated/nimodinst/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nimodinst'
219

2210

@@ -44,9 +32,6 @@ def read_contents(file_to_read):
4432
install_requires=[
4533
'hightime>=0.2.0',
4634
],
47-
setup_requires=['pytest-runner', ],
48-
tests_require=['pytest'],
49-
test_suite='tests',
5035
classifiers=[
5136
"Development Status :: 3 - Alpha",
5237
"Intended Audience :: Developers",
@@ -64,6 +49,5 @@ def read_contents(file_to_read):
6449
"Programming Language :: Python :: Implementation :: CPython",
6550
"Topic :: System :: Hardware :: Hardware Drivers"
6651
],
67-
cmdclass={'test': PyTest},
6852
package_data={pypi_name: ['VERSION']},
6953
)

generated/niscope/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'niscope'
219

2210

@@ -51,9 +39,6 @@ def read_contents(file_to_read):
5139
'protobuf>=4.21.6,<5.0'
5240
],
5341
},
54-
setup_requires=['pytest-runner', ],
55-
tests_require=['pytest'],
56-
test_suite='tests',
5742
classifiers=[
5843
"Development Status :: 3 - Alpha",
5944
"Intended Audience :: Developers",
@@ -71,6 +56,5 @@ def read_contents(file_to_read):
7156
"Programming Language :: Python :: Implementation :: CPython",
7257
"Topic :: System :: Hardware :: Hardware Drivers"
7358
],
74-
cmdclass={'test': PyTest},
7559
package_data={pypi_name: ['VERSION']},
7660
)

generated/nise/setup.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
# This file was generated
33

44

5-
from setuptools.command.test import test as test_command
65
from setuptools import setup
76

87

9-
class PyTest(test_command):
10-
def finalize_options(self):
11-
test_command.finalize_options(self)
12-
self.test_args = []
13-
self.test_suite = True
14-
15-
def run_tests(self):
16-
import pytest
17-
pytest.main(self.test_args)
18-
19-
208
pypi_name = 'nise'
219

2210

@@ -44,9 +32,6 @@ def read_contents(file_to_read):
4432
install_requires=[
4533
'hightime>=0.2.0',
4634
],
47-
setup_requires=['pytest-runner', ],
48-
tests_require=['pytest'],
49-
test_suite='tests',
5035
classifiers=[
5136
"Development Status :: 3 - Alpha",
5237
"Intended Audience :: Developers",
@@ -64,6 +49,5 @@ def read_contents(file_to_read):
6449
"Programming Language :: Python :: Implementation :: CPython",
6550
"Topic :: System :: Hardware :: Hardware Drivers"
6651
],
67-
cmdclass={'test': PyTest},
6852
package_data={pypi_name: ['VERSION']},
6953
)

0 commit comments

Comments
 (0)