how do i make a linux installer from setup.py. I made an .msi from my setup.py file and here is the code for it
import cx_Freeze
executables = [cx_Freeze.Executable("Slither.py")]
cx_Freeze.setup(
name="Slytherine",
options = {
"build_exe": {
"packages":["pygame"],
"include_files": ["apple.png", "snake_head.png", "Score.dll"]
}
},
description = "Snake game",
executables = executables
)
What changes should be done in order to make a linux installer for it or do i have to build it on a linux machine itself?
-
1Are you looking for just an executable or an installer?Bastien Léonard– Bastien Léonard2015年08月11日 07:42:11 +00:00Commented Aug 11, 2015 at 7:42
-
preferably an installer but in worst case a executable would also douser4644994– user46449942015年08月11日 07:45:19 +00:00Commented Aug 11, 2015 at 7:45
1 Answer 1
Linux distributions use packages, which are usually deployed in repositories.
So you have two ways of distributing a python app.
- Creating a python package, and uploading it to PyPI, so that users can install it with
pip install yourapplication. - Creating linux distribution packages (.deb for debian based, rpm for redhat, ...).
I recommend reading the excellent Python Packaging user guide for understanding how does python packages work.
For linux distribution packages, well that is going to be different for every distribution, but for debian based distributions, have a look at stdeb which converts python packages into debian packages.