Skip to content
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

Merged
merged 3 commits into from
May 27, 2017
Merged

Add console scripts #3074

merged 3 commits into from
May 27, 2017

Conversation

emmatyping
Copy link
Collaborator

@emmatyping emmatyping commented Mar 28, 2017

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

@emmatyping
Copy link
Collaborator Author

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 bdist_wheel, as wheel is installed... I will continue to investigate.

@gvanrossum
Copy link
Member

@ethanhs Do you still want to work on this? There's a couple of TODOs in previous comments, plus a merge conflict.

@emmatyping
Copy link
Collaborator Author

emmatyping commented May 10, 2017

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 console_scripts, then work on the slightly more complicated install test.

@gvanrossum
Copy link
Member

OK then we'll keep it open! I'll mark it blocked until you add a comment that you're ready for a review.

@emmatyping emmatyping reopened this May 18, 2017
@emmatyping
Copy link
Collaborator Author

emmatyping commented May 18, 2017

Well, I think I might have inadvertently broke the CI, so that might need to be re-run. However, I believe this is ready for review.

edit: The checks worked.

@emmatyping emmatyping changed the title WIP: add console scripts and install test Add console scripts May 18, 2017
@emmatyping
Copy link
Collaborator Author

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.

@gvanrossum
Copy link
Member

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 pip install -e).

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).

@emmatyping
Copy link
Collaborator Author

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.

@gvanrossum
Copy link
Member

OK, please restore those two files.

@emmatyping
Copy link
Collaborator Author

🖒 will do when I get in front of a computer again.

@emmatyping
Copy link
Collaborator Author

emmatyping commented May 27, 2017

Okay, I restored those two scripts. Let me know if you have any other feedback.

@gvanrossum gvanrossum merged commit 166d54d into python:master May 27, 2017
carljm added a commit to carljm/mypy that referenced this pull request May 30, 2017
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants