Skip to content

Commit d478a8d

Browse files
committed
setup.py: using setuptools "entry_points" instead of distutils "scripts"
1 parent 766fb8d commit d478a8d

File tree

6 files changed

+4
-21
lines changed

6 files changed

+4
-21
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
recursive-include qwt *.png *.svg *.pot *.po *.mo *.dcm *.ui
2-
recursive-include scripts *.*
32
recursive-include src *.hpp *.cpp *.pyx
43
recursive-include doc *.py *.rst *.png *.ico
54
include MANIFEST.in

scripts/PythonQwt-tests-py2

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/PythonQwt-tests-py2.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/PythonQwt-tests-py3

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/PythonQwt-tests-py3.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from __future__ import print_function
1515

1616
import os
17+
import sys
1718
import os.path as osp
1819

1920
import setuptools # analysis:ignore
@@ -51,15 +52,6 @@
5152
CLASSIFIERS += ['Development Status :: 5 - Production/Stable']
5253

5354

54-
def _create_script_list(basename):
55-
scripts = ['%s-py%d' % (basename, sys.version_info.major)]
56-
if os.name == 'nt':
57-
scripts.append('%s.bat' % scripts[0])
58-
return [osp.join('scripts', name) for name in scripts]
59-
60-
SCRIPTS = _create_script_list('PythonQwt-tests')
61-
62-
6355
def get_package_data(name, extlist):
6456
"""Return data files for package *name* with extensions in *extlist*"""
6557
flist = []
@@ -91,7 +83,9 @@ def get_subpackages(name):
9183
'Doc': ["Sphinx>=1.1"],
9284
'Tests': ["guidata>=1.7.0"],
9385
},
94-
scripts=SCRIPTS,
86+
entry_points={'gui_scripts':
87+
['PythonQwt-tests-py%d = qwt.tests:run [Tests]'\
88+
% sys.version_info.major,]},
9589
author = "Pierre Raybaut",
9690
author_email = 'pierre.raybaut@gmail.com',
9791
url = 'https://github.com/PierreRaybaut/%s' % LIBNAME,

0 commit comments

Comments
 (0)