473,626 Members | 3,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1163
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='app name',
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
2964
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 post method and either logs the user in our out given the information from the form. but every pages use sessions and cookies, if the user is successfully logged in then the cookies and session values are updated, (as well as MySQL).
2
1801
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. new installs. We have an install that does something like...
5
4940
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 Install From Script. In this method I create the database and its objects in scripts that are run via osql utility on the SQL server machine. For loading any initial data that I need in the database I also run bcp commands.
1
2850
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 best way to store the date the product was installed, and then to retrieve this.
3
56967
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 want to test this service on a Windows Server 2003 box that doesn't have the Visual Studio Command prompt. How do I go about installing the service on the Windows Server 2003 box? Thanks!
2
7980
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: System.IO.FileNotFoundException: File or assembly name windowsservice1, or one of its dependencies, was not found.. " I am new to C# environment. Any idea any clue will be appreciated. Thanks using System;
3
3206
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
1809
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
20368
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 (C#); public class MyServiceInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller;
0
8196
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
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8504
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
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
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
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
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.