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

Conversation

Projects
None yet
2 participants
@ethanhs
Collaborator

ethanhs 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

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs Mar 28, 2017

Collaborator

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.

Collaborator

ethanhs commented Mar 28, 2017

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

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum May 10, 2017

Member

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

Member

gvanrossum commented May 10, 2017

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

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 10, 2017

Collaborator

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.

Collaborator

ethanhs 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

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum May 11, 2017

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.

Member

gvanrossum commented May 11, 2017

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

@gvanrossum gvanrossum added the blocked label May 11, 2017

@ethanhs ethanhs closed this May 18, 2017

@ethanhs ethanhs reopened this May 18, 2017

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 18, 2017

Collaborator

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.

Collaborator

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

@ethanhs ethanhs changed the title from WIP: add console scripts and install test to Add console scripts May 18, 2017

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 18, 2017

Collaborator

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.

Collaborator

ethanhs commented May 18, 2017

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

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum May 26, 2017

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

Member

gvanrossum commented May 26, 2017

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

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 26, 2017

Collaborator

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.

Collaborator

ethanhs commented May 26, 2017

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

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum May 26, 2017

Member

OK, please restore those two files.

Member

gvanrossum commented May 26, 2017

OK, please restore those two files.

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 26, 2017

Collaborator

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

Collaborator

ethanhs commented May 26, 2017

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

@ethanhs

This comment has been minimized.

Show comment
Hide comment
@ethanhs

ethanhs May 27, 2017

Collaborator

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

Collaborator

ethanhs 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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

carljm added a commit to carljm/mypy that referenced this pull request May 30, 2017

Merge branch 'master' into module-alias
* 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