473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Prefered install method?

Another noob question:
I have written my first linux application that might actually be of
interest to others. Just for fun I also wrote an install script that put
the files in the common directories for my distro (Debian). That is in
/usr/local/. (This particular program can be run directly from the
user's /home but as a learning experience I want to do it the 'coorect' way)

Now, I don't know if that is the way to do it with python applications.
I also don't know if a custom install script is the norm. I have seen
some use of makefiles and tried to find something about it but the
manual for GNUMake really assume you are familiar with/ using C which
I'm not. I have googled a lot for this but can't really find anything
aimed for someone just learning programming with Python.

So my question is; What is the preferred/ common way to install a python
application so it's not really distro specific? And are there any good
resources on this on the web?

Thanks
Tina
Jan 26 '07 #1
3 1153
At Friday 26/1/2007 04:27, Tina I wrote:
>So my question is; What is the preferred/ common way to install a python
application so it's not really distro specific? And are there any good
resources on this on the web?
distutils, included in the standard Python library. You surely have
the docs installed, anyway you can read it online at
http://docs.python.org/dist/dist.html

For the simplest case (your app only contains python modules) just
write a setup.py file on the top directory of you application:

from distutils.core import setup
setup(name='appname',
version='1.0',
py_modules=['foo', 'bar'],
)

and execute: python setup.py sdist
--
Gabriel Genellina
Softlab SRL


__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 26 '07 #2
Tina I schrieb:
Another noob question:
I have written my first linux application that might actually be of
interest to others. Just for fun I also wrote an install script that put
the files in the common directories for my distro (Debian). That is in
/usr/local/. (This particular program can be run directly from the
user's /home but as a learning experience I want to do it the 'coorect'
way)

Now, I don't know if that is the way to do it with python applications.
I also don't know if a custom install script is the norm. I have seen
some use of makefiles and tried to find something about it but the
manual for GNUMake really assume you are familiar with/ using C which
I'm not. I have googled a lot for this but can't really find anything
aimed for someone just learning programming with Python.

So my question is; What is the preferred/ common way to install a python
application so it's not really distro specific? And are there any good
resources on this on the web?
These days, it's setuptools. Google for it. It will let you distribute
your application in a convenient way as so-called EGG (basically a
ZIP-file), additionally you will get support for installing scripts in
/usr/bin or wherever you like, and you have versioning support.

If you plan to release the app publically, it will also handle the
upload to the PyPI, the python package index - also known(?) as cheeseshop.

Diez
Jan 26 '07 #3
Diez B. Roggisch wrote:
These days, it's setuptools. Google for it. It will let you distribute
your application in a convenient way as so-called EGG (basically a
ZIP-file), additionally you will get support for installing scripts in
/usr/bin or wherever you like, and you have versioning support.

If you plan to release the app publically, it will also handle the
upload to the PyPI, the python package index - also known(?) as cheeseshop.

Diez
Great! Obviously exactly what I'm looking for. I already had it
installed even, and it seem to be quite well documented and noob friendly.

Thanks :)
Tina
Jan 26 '07 #4

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

Similar topics

5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
2
by: Simon | last post by:
Hi, We have a small utility that uses a database. We are happy with the structure of the database but we cannot predict any updates. What we are particularly concerned about are updates vs....
5
by: great_googley_moogley | last post by:
Greetings, I am in the process of installing a SQL database at a customer location. I have determined that there are 3 ways to do this, and I wanted to know which is the best of the 3. 1...
1
by: Brian | last post by:
I have a C# application that has an install and registration process. I need to create a robust 30day trial that can be register later. I have most of the work done, but I want to know the...
3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
2
by: Fan Wang | last post by:
Hi All, I wrote a windows service with C# as below. But I can't install it with installutil.exe. I got an error message " Exception occurred while initializing the installation:...
3
by: Blake Versiga | last post by:
In ASP you use <% =HtmlString %> but in ASP.NET this can cause some problems if you are using page inheritance. What is the prefered way to insert HTML in a page? Thanks
33
by: Simon | last post by:
Hi, I am going to use quite a few vectors and I want to make sure I am using it properly. // struct MYSTRUCT { .... }
1
by: =?Utf-8?B?Qi5BaGxzdGVkdA==?= | last post by:
Hi all, This is something that I have been toying with for about a week now. What I want to achieve is Install a Service with Customised parameters (using InstallUtil.exe) for User Name. Example...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.