473,696 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issues with Installer written in Python for Linux

c.l.p-

I am undertaking writing an installer for a software package using
Python. It is exclusively for Linux. Because this is an installer and
has to run on numerous Linux distros, it is presenting some unique
challenges.

First off, I have begun this project by writing a text mode only
interface. I would like to provide a GUI as an alternative, but I ran
into problems in my early tests. Thinking that Tkinter would be the
most universal GUI framework on Linux in Python, I wrote some test
screens. Well, after trying the code on several distros (Mandriva,
Ubuntu, Fedora, SUSE, etc), I discovered that Tkinter is not as
universal as I had thought. On about 50% of the distros, it is not
installed with the system copy of Python. So much for the "standard"
library! :-) So, this leaves me with the problem that I don't know
what else might work. I am assuming that PyQt and PyGTK are both not
preinstalled on all Linux distros. I could ship and install a package
of my own if it were very small and an "easy" installation. I can't use
package managers because I need to work on systems that use apt, rpm,
portage, etc. Does anyone have any suggestions?

My next issue is a usability issue, that really isn't strictly a Python
issue, but since the members of c.l.p are some of the most intelligent
and knowledgable people around, I thought I'd give it a try. My
installer is part of a tarball that is subsequently wrapped up into a
self extracting archive (SFX) using 'makeself'. This all works great.
The user can download the SFX (which is in the form of a .run file) in
a _terminal_ and the package will self extract and then run my
installer. The problem is that I would like the user to be able to
download the file to their desktop or whereever, and then simply
doubleclick on it to make the installer execute. When I do this now,
the installer refuses to run, I guess because it has no terminal to
output to.

So, the question is, from a Python program, can I detect that I am not
running in a terminal/console and somehow get one going? (I tried
playing with things like 'xterm' to force the install into a console,
but, of course, xterm is missing on some distros too).

Thanks,

Don

Aug 29 '06 #1
1 2002
dw******@gmail. com wrote:
I am undertaking writing an installer for a software package using
Python. It is exclusively for Linux. Because this is an installer and
has to run on numerous Linux distros, it is presenting some unique
challenges.
I had the same problem to solve as you, and I hope, my answer is not too
offtopic to you, since I wrote the solution in Tcl/Tk. I needed the
installer to work in text-mode, if no X is available and with a GUI, if X
can be used. The Installer works in both modes. It is not very fancy, but
allows to run additional scripts after installation, shows some info and
License-Agreement, Logo and so on. The "trick" was to pack all in a single
script, that first runs as a shell script, checks if Tcl is available at
all (for you python), the starting up Tcl, feeding it the same file as a
Tcl-Script, then checking inside of Tcl, if Tk can be loaded (for you
TkInter, which is the same thing) and if so, run the GUI, otherwise run in
a text-mode, which I implemented using only basic shell-commands (cat,
md5sum for validity-check, bzip2, but gzip would also work, and sed, the
other commands are bash-builtins) so they should be on every distro. But
that part possibly can better also be implemented in python or Tcl. - If
you are interested, how it works and think, it would help you, tell me. You
can look at the installer at www.mevislab.de -Downloads, take one of the
Linux-Installers. If you want, I can also give you the scripts, that create
such a installer. They are a little bit confused written, since they had to
be finished yesterday, as ever (and laying around since, annoying me, when
I look at the code). But may be they help or at least inspire you, doing
the same thing but better.

Regards
Stephan
Aug 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1368
by: Alexander Eisenhuth | last post by:
Hallo, somehow Installer won't work, even on the simplest python file: test.py: --------- import time print 'time is', time.time()
1
1306
by: mark | last post by:
Since distutils is a recent topic (of sorts), I figured it was time to post my quandary. I have a utility I've written, and I wanted to create a standalone executable from it. I tried using Installer (which I've used in the past), with no success. Now I'm trying py2exe. I use the bdist_wininst method (?) and it seems to create all the files. However, nothing happens when I double-click the .exe file. I saw similar behavior from...
1
3152
by: Harald Schneider | last post by:
Hi, I ran in some problems with Gordon's Installer, after upgrading to Python 2.3.2: After starting the executable it brings up a ImportError: No module named wxPython.wx Before upgrading, everything went well. I can also run the .py file without any complaints in my system's current
0
1331
by: Anthony Baxter | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Due to a goof in the packaging scripts, the Windows installer that was released on Friday for 2.4a3 broke file associations for .py files. There's a fixed installer (python-2.4a3.2.msi) available from the Python 2.4 web page. There's also a patch for the breakage for random.py on systems that don't have support for the new os.urandom() call. This is
0
1059
by: zyqnews | last post by:
hello: I am using Install to create a standalone program for linux. What I has done is : $cd source/linux $python Make.py $make $cd ../../ $python Configure.py $python Makespec.py hello.py
4
2102
by: mrmakent | last post by:
3 quick questions for the newsgroup: 1. Does anyone know why McMillan Installer 5b5 does not work with Python 2.4 under Linux (works with Python 2.3 just fine), and how to fix it? 2. Will anyone be picking up the maintenance and development ball for McMillan Installer? 3. Is there another, better-supported solution for distributing a
6
2103
by: diffuser78 | last post by:
Hi, I have known python for about 3-4 months now. My knowledge is still very limited. I wrote a small app using wxPython. Now, I want to create an installer for it (on Linux platform.) for the people I developed this small utility. These people use some customized variant of Red Hat Linux. I found on
7
3575
by: DanielJohnson | last post by:
I have a small project which has around 10 .py files and I run this project using command line arguments. I have to distribute this project to somebody. I was wondering how can I make an executable or some kind of installer, so that end user doesn't need to compile and worry if he/ she has Python installed or not ? Every help is greatly appreciated.
11
1769
by: MartinRinehart | last post by:
I went to Python.org, DL'd Python 2.5 source code per the usual inadequate instructions and ran the make files successfully (sort of). Python 2.5 works fine. But "from Tkinter import *" gets a "What's Tkinter?" message. IDLE's no where to be found. What's not in the instructions is what directory should I be in when I download? Where should I put the ".bz2" file? What dir for running the make files? At present I'm working on a Windows...
0
8597
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9010
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8853
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2319
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1992
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.