473,399 Members | 3,832 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,399 software developers and data experts.

Unix applications in python: production install questions

Hello,

What is the best way to install a python application under Unix. Since python
modules are platform independent I would guess these should be placed under an
application specific directory under either /usr/share or /usr/local/share with
a corresponding link to the main module(s) under /usr/bin or /usr/local/bin for
user applications and /usr/sbin or /usr/local/sbin for system applications.
Assuming this is done, should .pyc and .pyo files also be placed under
/usr/share or /usr/local/share? These are platform independent byte
code so they definitely go there if anywhere. The question is
whether the installer should install these files or not.
Provided the installer is to install these files, then
how can they be generated. Usually these are created
automatically each time the user runs python on a
given module, but is there another way to generate
them and should they really be installed separately
in a production scenario or not?

Thanks,

Neil
Jul 18 '05 #1
1 1705
Neil Zanella wrote:
What is the best way to install a python application under Unix. Since python
modules are platform independent I would guess these should be placed under an
application specific directory under either /usr/share or /usr/local/share with
a corresponding link to the main module(s) under /usr/bin or /usr/local/bin for
user applications and /usr/sbin or /usr/local/sbin for system applications.
Assuming this is done, should .pyc and .pyo files also be placed under
/usr/share or /usr/local/share?
That doesn't really work. You should install Python modules and byte
code into Python's site-packages.
The question is
whether the installer should install these files or not.
Provided the installer is to install these files, then
how can they be generated.


That depends on the installer technology, no? If it has
the notion of a postinstall action, then you should run
compileall.py on all directories where you have placed
Python source.

Doing so is a good idea, as it reduces the size of the
package, and possibly allows to support multiple Python
versions (which all have different byte code format) in
a single package.

Regards,
Martin
Jul 18 '05 #2

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

Similar topics

1
by: Benjamin Sher | last post by:
Dear friends: I would appreciate your help in installing SIP with QT support so that I can then install PyQT. My reason is that I would like to install a number of KDE applications that...
4
by: RosalieM | last post by:
I would like to understand what python needs to work on unix. And to understand how i can make it smalest possible? I dont understand at all setup. I searched in python.org and in sources but it...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
3
by: francisl | last post by:
We have to build some script were I work to make a dynamic server inventory. But, the project team, a windows crew, start it all in vbscript and on mssql. Note, due to political reason, we can...
1
by: Bobby Owens | last post by:
Hi, Please excuse what is probably a completely newbie question, but my situation is as follows. I'm a windows/.NET developer but have now been asked to take over part of the project which is...
5
by: abhi | last post by:
Hello, My name is Abhilash and I am recruiting for an experienced Bioinformatics Programmer. This opportunity is permanent, full-time, and on site in Bethesda/Rockville, MD. The opportunity is...
4
by: Simon | last post by:
I installed the source code on unix for python 2.5.1. The install went mainly okay, except for some failures regarding: _ssl, _hashlib, _curses, _curses_panel. No errors regarding sqlite3....
1
by: Marcin Wiszowaty | last post by:
Hello, I work at a company that has 2 development enviroments. One Unix which i dont know anything about and the othe vs.net 03 with MSSQL server 2000 for db. How can i cause applications...
4
by: stuntgoat | last post by:
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.