Version specific or not?

S

Steven W. Orr

We have an app and I'm trying to decide where the app should be
installed. The question is whether it should be site-specific or not, as
in

/usr/lib/python2.3/site-packages
or
/usr/lib/site-python

The latter would solve a lot of problems for me.

In the case of emacs, most stuff seems to go into $EMACS/site-lisp and far
less into $EMACS/$current_version/site-lisp. The python site dirs seem to
be the opposite. We have lots of stuff in the 2.3/site-packages and very
little in the site-python directory.

If there are multiple versions of python installed on the same machine,
having a shebang that just looked for /usr/bin/python would make my life a
lot easier.

* Since we distribute .pyo files, is there an issue if the .pyo was built
with 2.3.5 and then executed by 2.4 or 2.5?

* Are there any caveats?

TIA

--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
 
S

Scott David Daniels

Steven said:
We have an app and I'm trying to decide where the app ... .
/usr/lib/python2.3/site-packages
or
/usr/lib/site-python

The latter would solve a lot of problems for me.
Fewer than you suspect
If there are multiple versions of python installed on the same machine,
having a shebang that just looked for /usr/bin/python would make my life
a lot easier.
* Since we distribute .pyo files, is there an issue if the .pyo was
built with 2.3.5 and then executed by 2.4 or 2.5?

Each python M.N.X has its own byte code for distinct values of M and/or N.
So, if you had a shared directory, not only would your users have to
be able to write to the shared directory (when they import mumble, and
mumble.pyc or mumble.pyo has been generated by a different version of
Python, they will recompile mumble.py and rewrite mumble.pyc (or .pyo).

-Scott David Daniels
(e-mail address removed)
 
S

Steve Holden

Scott said:
Fewer than you suspect



Each python M.N.X has its own byte code for distinct values of M and/or N.
So, if you had a shared directory, not only would your users have to
be able to write to the shared directory (when they import mumble, and
mumble.pyc or mumble.pyo has been generated by a different version of
Python, they will recompile mumble.py and rewrite mumble.pyc (or .pyo).
If the users *don't* have write access to the directory then no
byte-code is stored, and everything has to compile the libraries each
time. So it isn't necessary to have write, but either way sharing
libraries between versions is a pain for the reason you state.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline so I couldn't cat it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top