-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add console scripts #3074
Add console scripts #3074
Conversation
Okay, so for Travis/Linux, it seems I need to be more clever in how I run python. For Windows, I have no idea why it won't accept |
@ethanhs Do you still want to work on this? There's a couple of TODOs in previous comments, plus a merge conflict. |
I do want to do this. I haven't have time to work on it, and it is rather complicated, but my semester ends this week so I should have significantly more time to work on it soon. I think I will start with the smaller and easier change of just updating to use |
OK then we'll keep it open! I'll mark it blocked until you add a comment that you're ready for a review. |
edit: The checks worked. |
I originally was going to also do a wheel install test, but that got overly complicated, so I want to put more thought into it and I'll wait for another PR for that. |
I wonder if scripts/stubgen and scripts/mypy.bat should be preserved even if they're not installed any more? After all you're still keeping scripts/mypy. These all are super simple script files that perhaps aren't as robust as the setuptools entry points, but they also don't require as much machinery to exist. I sometimes like to run these scripts in an environment where I don't want to install mypy (not even using Other than that this seems to work fine for me (Mac), so I will merge this after you've restored those two scripts (or convinced me that they should really go). |
I deleted them as I thought they were entirely duplicates of the console scripts method. I left scripts/mypy as removing it caused the entire test suite to fail :^) If you use them for other purposes than I can restore them. I see no issue with that. |
OK, please restore those two files. |
🖒 will do when I get in front of a computer again. |
Okay, I restored those two scripts. Let me know if you have any other feedback. |
* master: (23 commits) Make return type of open() more precise (python#3477) Add test cases that delete a file during incremental checking (python#3461) Parse each format-string component separately (python#3390) Don't warn about returning Any if it is a proper subtype of the return type (python#3473) Add __setattr__ support (python#3451) Remove bundled lib-typing (python#3337) Move version of extensions to post-release (python#3348) Fix None slice bounds with strict-optional (python#3445) Allow NewType subclassing NewType. (python#3465) Add console scripts (python#3074) Fix 'variance' label. Change label for variance section to just 'variance' (python#3429) Better error message for invalid package names passed to mypy (python#3447) Fix last character cut in html-report if file does not end with newline (python#3466) Print pytest output as it happens (python#3463) Add mypy roadmap (python#3460) Add flag to avoid interpreting arguments with a default of None as Optional (python#3248) Add type checking plugin support for functions (python#3299) Mismatch of inferred type and return type note (python#3428) Sync typeshed (python#3449) ...
This replaces the current scripts installed with setuptool's console_script entry points (this is done for mypy and stubgen). I also wrote a test that checks installing the wheel works.
WIP