Skip to content

Add console scripts #3074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion mypy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

from mypy.main import main

main(None)

def console_entry() -> None:
main(None)


if __name__ == '__main__':
main(None)
Empty file modified scripts/stubgen
100755 → 100644
Empty file.
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def run(self):

package_dir = {'mypy': 'mypy'}

scripts = ['scripts/mypy', 'scripts/stubgen']
if os.name == 'nt':
scripts.append('scripts/mypy.bat')

# These requirements are used when installing by other means than bdist_wheel.
# E.g. "pip3 install ." or
Expand All @@ -119,7 +116,8 @@ def run(self):
package_dir=package_dir,
py_modules=[],
packages=['mypy'],
scripts=scripts,
entry_points={'console_scripts': ['mypy=mypy.__main__:console_entry',
'stubgen=mypy.stubgen:main']},
data_files=data_files,
classifiers=classifiers,
cmdclass={'build_py': CustomPythonBuild},
Expand Down