summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2016-02-28 22:12:11 -0800
committerIan Lee <IanLee1521@gmail.com>2016-05-26 00:43:47 -0700
commit21783518e7fe4ed7d41a777fee83c962c26dd3d3 (patch)
treea01c9e343ca8ed522cce1c7ecfbb5f7a28b80ce7
parentc98b72f4eb6e640200eadecb9d09acdd15772799 (diff)
downloadpep8-21783518e7fe4ed7d41a777fee83c962c26dd3d3.tar.gz
Added pycodestyle entry_point
Converted pep8 entry point to emit a deprecation warning for users
-rwxr-xr-xpep8.py15
-rw-r--r--setup.py3
2 files changed, 17 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 207af15..4af3c3e 100755
--- a/pep8.py
+++ b/pep8.py
@@ -2181,5 +2181,20 @@ def _main():
sys.stderr.write(str(report.total_errors) + '\n')
sys.exit(1)
+
+def _main_pep8():
+ """Entrypoint for pep8 commandline tool.
+
+ Warn of deprecation and advise users to switch to pycodestyle.
+ """
+ print(
+ 'Deprecation Warning:\n'
+ 'pep8 has been renamed to pycodestyle and the use of the pep8 '
+ 'executable will be removed in a future release. Please use '
+ '`pycodestyle` instead.\n'
+ )
+ _main()
+
+
if __name__ == '__main__':
_main()
diff --git a/setup.py b/setup.py
index 29182c6..b767119 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,8 @@ setup(
],
entry_points={
'console_scripts': [
- 'pep8 = pep8:_main',
+ 'pycodestyle = pep8:_main',
+ 'pep8 = pep8:_main_pep8',
],
},
classifiers=[