-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
can't run win_post_install from pip #2188
Comments
I'm afraid you're going to need to create a pull request, because this snippet is too big and some things seem to be repeated with our code. |
This snippet checks if spyder is being installed from a bdist_wininst .exe archive on a Windows machine or something from else, eg pip. It checks for several attributes that are available when using bdist_wininst ie |
I understand now, but please do a pull request for this. |
Could you also comment what's the exact problem that your snippet solves? Is it that you can't install Spyder on Windows using pip because of the lack of it? |
On Windows, if user installs spyder using pip, then tries to run the win_post_install script, to add the start menu shortcuts which are quite nice, especially for less savvy, terminal-phobic users which spyder is a good choice for (ie: MATLAB converts), the user will get a nasty traceback because some of the module level attributes are only available when this script is part of a bdist_wininst |
Would it be okay to make pywin32 a depndency on Windows systems? maybe something else already depends on pywin32? |
* add missing bdist_wininst functions from pywin32_postinstall.py: file_created(), directory_created(), get_root_key(), create_shortcut() and get_special_folder_path() * test for pythoncom and return message "pywin32 required" on ImportError * replace CSIDL_COMMON_PROGRAMS with CSIDL_PROGRAMS to be consistent with desktop shortcut which is in user profile, and so that user doesn't have to elevate rights in order to install spyder * add TODO to remove error message "try running installer as administrator" since it's unnecessary if admin rights not required. * if running spyder_win_post_install.py -install manually after installing with pip, then spyder.ico and spyder_light.ico are in the Python27\Scripts\ folder not in the distribution folder, so check if ico_dir exists and use absolute path to spyder_win_post_install.__file__ * clean up desktop and start menu shortcuts on removal * provide feedback on successful removal of context, desktop and start menu shortcuts Signed-off-by: Mark Mikofski <mark.mikofski@sunpowercorp.com>
@mikofski, unfortunately nothing else depends on |
Does this mean that it can't be pulled? We can do it without pywin32, by using ctypes on ole32.dll and shell32.dll, which are both part of standard library, but it's a lot more work and I think most Windows users will already have Mark Hammond's pywin32 package. |
Your pull request can be merged without problems because you added a message about So if it's not found, the script will fail but people will know why :-) |
Great, let me know if there's anything else you need. |
please add this snippet to spyder_win_post_install.py to mimic bdist_wininst. I cribbed it from pywin32_post_install.py. Thanks!
The text was updated successfully, but these errors were encountered: