-
-
Notifications
You must be signed in to change notification settings - Fork 3k
No console entry point for Windows #1226
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
Comments
Is there a way to do this without depending on setuptools? In my experience setuptools adds as many problems as it solves (different one though :-). |
Why not add a |
@gvanrossum I haven't run into issues using |
I can't elaborate on issues with setuptools, I just remember having been
really frustrated at various points in the past by things that broke due to
some setuptools cleverness. Isn't there some pip goodness that replaces
setuptools entry points?
|
@gvanrossum Not one that I am aware of. All of the places I've found have stated that
|
So, why can't we install scripts/mypy in the right place on Windows? That's what it's meant for. |
I may be mistaken, but I think a fundamental issue on Windows is that there is no concept of a shebang line, so you need an executable
Even if |
Again, simple fix: use a batch file! |
I would like to have this fixed but I have no access to Windows. Can someone just contribute a .bat file as a PR, including the setup.py mods to install it? |
Because I've decided to make life hard for myself: I don't think a somewhat simple bat file is enough, unless its generated on install (which then becomes a console entry point pretty much), or has extra logic added (which I don't think anyone wants to do, but would be a solution) I have python 3.5 installed in
(since the bat file tries to access of course |
@Socialery Hmm... Maybe Either that, or Windows can burn in a violent fire. I kind of like that option better. |
I don't like Windows either, but something like 70% of Python users are
actually on Windows... So I think we should come up with something. I like
the idea of processing the .bat file on install.
|
Just want to throw out that Is there really a solid reason not to use the solution that has been used many times over by other Python packages? |
Have you seen #1875? That was an attempt at adding a console entry point, but the author never got it to work. Feel free to submit a PR that works! |
Edit: Not sure if I'll have time to work on this, so opening it up for others to work on. |
Maybe it's time to reconsider this? At least we're now using setuptools! |
@johnthagen could you test this proof of concept, please? https://github.com/alexandrul-ci/mypy/ |
I tried this on a Windows 10 x64 host running Python 3.6.0. > py -3.6 -m venv venv
> Scripts\activate.bat
# Checked out https://github.com/alexandrul-ci/mypy/
> pip install "C:\Users\User\PycharmProjects\mypy"
Processing c:\users\user\pycharmprojects\mypy
Collecting typed-ast>=0.6.3 (from mypy==0.480.dev0)
Using cached typed_ast-0.6.3-cp36-cp36m-win_amd64.whl
Installing collected packages: typed-ast, mypy
Running setup.py install for mypy ... done
Successfully installed mypy-0.480.dev0 typed-ast-0.6.3
> mypy -V
mypy 0.480-dev
> mypy --help
usage: mypy [-h] [-v] [-V] [--python-version x.y] [--platform PLATFORM] [-2]
[--ignore-missing-imports] Appears to be working. |
@johnthagen thank you On my PC I have tested it with an altered sample from mypy, I have the same issues reported with my version as with the original 0.470. |
I believe this can be closed as we are using the newer entry point method. |
just checked for my edge-case of a python install, seems to work great now (well, the entry point does at least!) |
On Windows 10 x64 using Python 3.5.1:
I think what would be helpful for Windows users would be a
console_scripts
entry_point
:This will work on Linux and Windows.
The text was updated successfully, but these errors were encountered: