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

Windows installer should use setup.py (setuptools) #48

Closed
benjaoming opened this issue May 22, 2015 · 5 comments
Closed

Windows installer should use setup.py (setuptools) #48

benjaoming opened this issue May 22, 2015 · 5 comments
Assignees
Milestone

Comments

@benjaoming
Copy link
Contributor

Hi @ruimalheiro

Hopefully this will be helpful for you and in the future will help to reduce the responsibility of the Windows installer.

After installing Python + setuptools, which I guess is bundled with the installer, you can install the ka-lite-static zip package which can be found on pypi:

https://pypi.python.org/pypi/ka-lite-static

In the zip, which you can bundle with the installer, you find the typical setup.py script. It's installed by running setup.py install as all distributed Python packages are.

After installing it, if you can make C:\Python27\Scripts and C:\Python27\ appear in the Windows path, we can have kalite in the command line. ( more info here: http://docs.python-guide.org/en/latest/starting/install/win/ )

@MCGallaspy
Copy link
Contributor

I'm debating whether we need to change the windows installer to use setuptools, given that it works ok for now. That said, if we do revisit the InnoSetup script for any reason, it's probably worthwhile to refactor it to use setup.py in order to consolidate the responsibility in one place and avoid code with duplicate functionality and language proliferation in the project. (I'm looking at you, PascalScript.)

@aronasorman
Copy link
Collaborator

I think it's better to have all the installers install using the same mechanism, as that leads to less special-casing between platforms.

@MCGallaspy
Copy link
Contributor

I think it's better to have all the installers install using the same mechanism, as that leads to less special-casing between platforms.

I agree, we need to figure out where this lies in our ordinal priority list.

@benjaoming
Copy link
Contributor Author

I don't know if this is useful, but this is how debian packaging works:

setup.py is invoked to install in a relative directory at build time. So setup.py is actually not run while installing the .deb, but while building it!

This is perfectly fine, as the .deb format is intended to contain files to be placed on the target system which are then managed by dpkg.

Would a similar install builder for Windows exist?

Otherwise, would it be possible to put all of the Windows installation logic in a separate setup_windows.py that invokes/imports setup.py and thus contain everything for Windows in the original source tree without a separate software project? Recall that a setup.py can be made into a setup.exe with distutils...

@MCGallaspy
Copy link
Contributor

Could be useful, seems like we could do essentially the same thing on Windows -- it's just a matter of rewriting the scripts and debugging them. We also manage some upgrade scenarios through InnoSetup, so we'd have to figure out how we wish to handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants