Installing Python on Linux

I wrote a Python program. I would like to add to it a script installation that will configure everything you need - for example, a desktop icon, a menu entry, a home directory file, etc.

I am working on Linux (ubuntu). When the Python program is installed, what should happen in general? I know that this probably depends on the nature of the program.

Can you give me some general ideas? Or, call me in the right direction? I don’t know how to search this on Google.

thanks

+7
python linux
source share
4 answers

If this is the Python program you are trying to package, you should consider using its "standard" distutils distribution infrastructure. I cannot reproduce the entire document here, but I would recommend you read it. After you are done with this, check out the hitchhiking packaging guide that contains detailed information about the distribution — distutils extensions that allow you to pack and distribute more efficiently.

+3
source share

For Ubuntu, if you want it to be easy to distribute to other Ubuntu users, it must be properly packaged, which is no easy task. You can refer to their Packaging Guide for more information.

Otherwise, generally speaking, there are several standard packaging options for Python. Setuptools is popular, but has recently become offended. Check out James Bennett's blog post “About Packaging” for a decent, comprehensive overview of the ups and downs of the Python packaging world.

+1
source share

You can easily create rpm with checkinstall. Find checkinstall on google and download it. This will allow you to create rpm and set the parameters.

+1
source share

How the program starts and fits into the menu is determined by the .desktop file (you can read the specification or just see some examples from /usr/share/applications ). Proper installation of the program (placing all files in the correct directories, etc.) requires either creating a package, or deb or rpm, or you can use something like distutils or setuptools.

It will also help just to take a look at some (open source) examples of Python programs for Linux.

0
source share

All Articles