Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit dcab223

Browse files
committed
Use setuptools' entry_points to create the console script.
1 parent f3f90a4 commit dcab223

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@
2828
keywords='PEP 257, pep257, PEP 8, pep8, docstrings',
2929
package_dir={'': 'src'},
3030
py_modules=['pep257'],
31-
scripts=['src/pep257'],
31+
entry_points={
32+
'console_scripts': [
33+
'pep257 = pep257:main',
34+
],
35+
},
3236
)

src/pep257

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

src/tests/test_pep257.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def open(self, path, *args, **kwargs):
5454
def invoke_pep257(self, args=""):
5555
"""Run pep257.py on the environment base folder with the given args."""
5656
pep257_location = os.path.join(os.path.dirname(__file__),
57-
'..', 'pep257')
57+
'..', 'pep257.py')
5858
cmd = shlex.split("python {0} {1} {2}"
5959
.format(pep257_location, self.tempdir, args),
6060
posix=False)

0 commit comments

Comments
 (0)