Welcome. Get your technical questions answered and offer your help too!!!

Use EcoCash to buy NetOne & Telecel airtime online. Tap here
in Software Development by Regular (1.5k points)
Please could someone explain to me how to create a debian file for linux distros. The file has to contain a tar.gz archive with python files, a bash script that decompresses the tar.gz archive and runs the setup.py file inside the archive. I also need the debian file to run the bash script thats inside when it is clicked.
Please try to explain and maybe give links to where i can find further information.

Use EcoCash to buy NetOne & Telecel airtime online. Tap here

3 Answers

+1 vote
by Guru (57.6k points)
selected by
Best answer
Take a read of https://wiki.debian.org/Packaging - it has all the resources you need, you need a debian machine to start with though!

in a nutshell a .deb file is a compressed archive file that does some cool stuff when extracted (a but like an MSI file on windows)

when you build a deb file you create a set of rules that define whats to happen to the files inside the .deb archive, this can be anything from just copying the files to destination or running more complex setup commands that takes user input

for python modules/eggs - theres a specific debian wiki page that recommends how to handle this specifically: https://wiki.debian.org/Python/Packaging

obviously this only applies to debian based systems (debian, ubuntu, mint etc)

for redhat (RPM) based systems (Fedora, RedHat, CentOS) then look here: http://fedoraproject.org/wiki/How_to_create_an_RPM_package or here: http://docs.python.org/2.0/dist/creating-rpms.html
by Regular (1.5k points)
Thanks man. Exactly what i was looking for. I owe you one.
+1 vote
by Guru (88.1k points)
You ar thinking like a Windows person, which can not be directly translated to Linux.

Im not a programmer which is the most important aspect to achieve what you are asking.

But l kno that scripting directly replace the point and click you are used to in windows. You initiate scripts through command prompt.
For example tar.gz is just a container which will keep files in compressed format. It cannt self uncompress unless you hav or run a command to do that.

Once uncompressed, the python script will then need to be run using a program or if python is already installed, can run the python script
by Regular (1.5k points)
Yes. So i thought so too. But then i found one .deb file i downloaded self installed on ubuntu.( Ofcourse after password verification). And i thought thats what i want my modules to do too.
I completely aware of the command line way of installing but i truly think it isnt user friendly. The double click method also seems to be more modern... i think...
by Guru (88.1k points)
Packaging a file is sort on managing compilation of file to be installed to a specifically targeted OS. In Linux .deb is a  package management for all debian related distros like Ubuntu, Mint etc. Redhat have .rpm, if these file are clicked on a relevant OS, they can self install. But on a different OS you will need to recompile them and install.

Whereas compressing a file is different. Given that is the way you want to take, you will need to know how to program and use compiler engines to make your apps.
by Regular (1.5k points)
I already know how to program in python and bash and already have a way of packaging python scripts using distutils for python but that only works on the shell. I just want to take the process off the shell. Right now i managed to do that with two files. I make an executable bash script that unpacks and installs distutils-packaged program. But i want to reduce these two files to one executable file. So you see im already on the way but cant figure out how to merge the two files (the bash script and the distutils package).
by Guru (88.1k points)
Unfortunately thus where my little brains can take me as far as possible. Im no programmer in any way bt l hear Qt can make yo life easier on that front.
by Regular (1.5k points)
Thanks anyway for your time. Will look into Qt.
by Guru (31.2k points)
–1 vote
Welcome to Techzim Answers,

You can ask questions and receive answers from the Zimbabwean internet community.

If you're not sure how to proceed from here just click here and ask