Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124611 - pymol 0.99 version bump, approximate ebuild enclosed
Summary: pymol 0.99 version bump, approximate ebuild enclosed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-02 01:15 UTC by hodak
Modified: 2006-03-03 09:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pymol 0.99 ebuild (pymol-0.99.ebuild,1.63 KB, text/plain)
2006-03-02 01:50 UTC, hodak
Details
Updated pymol 0.99 ebuild (pymol-0.99.ebuild,1.71 KB, text/plain)
2006-03-02 15:15 UTC, hodak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hodak 2006-03-02 01:15:39 UTC
PyMOL v0.99 is released, portage version bump should be in order. In a moment I will attach almost working ebuild for new pymol version.
Comment 1 hodak 2006-03-02 01:50:28 UTC
Created attachment 81095 [details]
pymol 0.99 ebuild

I am submitting almost working ebuild, I need some help to make it fully functional.

Changes from 0.98:
Tarball name is pymol-0_99rc1-src.tgz (note rc1, even though this is the actual release, not just release candidate)
Added dependencies:
dev-lang/tcl
media-libs/freetype

Now the problems I am having:
In 0.98 there was pymol.com thatp was filtered through sed and became the pymol binary. In 0.99 there is no pymol.com there are several files pymol.com.* in setup subdirectory. pymol.com.basic seems to be working but it needs to be changed. Original pymol.com.basic looks like this:

#!/bin/sh
PYMOL_PATH=${HOME}/pymol
export PYMOL_PATH

if [ "$PYTHONPATH" == "" ]; then
PYTHONPATH=${PYMOL_PATH}/modules
else
PYTHONPATH=${PYMOL_PATH}/modules:${PYTHONPATH}
fi
export PYTHONPATH
#
python $PYMOL_PATH/modules/pymol/__init__.py "$@"


The PYMOL_PATH is obviously wrong ($HOME ?)
This file needs to be chnaging to this:

#!/bin/sh
PYMOL_PATH=/usr/share/doc/pymol-0.99/
export PYMOL_PATH
/usr/bin/python /usr/lib/python2.4/site-packages/pymol/__init__.py "$@"

Unfortunately, I do not know enough sed/ebuild to accomplish this, I really do not know how to find python version and setup path /usr/lib/python2.4.


There is one more important change in 0.99: In 0.98 during installation the following directory is created: /usr/lib/python2.4/site-packages/pymol/pymol_path/
This containts 4 subdirectories and a file:
data  examples  LICENSE  scripts  test
I am not sure if examples, scripts or test are good for something, but data is important since it contains demo files.
In 0.99 the pymol_path dir is not created during installation and thus demo files are missing. Looking into 0.98 ebuild, it turns out that there is special handling for examples subdirectories, it is copied into /usr/share/doc/pymol-0.99/examples/. Therefore I moved content of the other subdirectories into /usr/share/doc/pymol-0.99/ as well. Once PYMOL_PATH is setup 
to /usr/share/doc/pymol-0.99/ everything works as expected.

To sum up, what is required is write couple of lines that will convert pymol.com.basic to the form I specified above, or just create pymol script with the three lines from scratch. The only tricky part (for me) is to figure out python2.4. 
In my case, I changed pymol script by hand and everything seems to be working fine.
Comment 2 Jeffrey Gardner (RETIRED) gentoo-dev 2006-03-02 06:16:12 UTC
I did about the same thing as you, only after I "ebuild pymol-0.99.ebuild unpack" I edited /var/tmp/portage/pymol-0.99/work/pymol-0.99/setup/pymol.com.basic
to the following:

#!/bin/sh
#
# PyMOL startup script for "ext"-based installs
#
# ==============================================================
# Set PYMOL_PATH to point at the correct location on your system
#
PYMOL_PATH=/usr/lib64/python2.4/site-packages/pymol
export PYMOL_PATH
#
# ==============================================================
# (no changes usually required below here)
#
# python modules
#
if [ "$PYTHONPATH" == "" ]; then
PYTHONPATH=${PYMOL_PATH}/modules
else
PYTHONPATH=${PYMOL_PATH}/modules:${PYTHONPATH}
fi
export PYTHONPATH
#
python $PYMOL_PATH/__init__.py "$@"


So far everything is working okay...I have some scripts from the pymol wiki that are running fine, (in /usr/lib64/python2.4/site-packages) and /usr/share/doc/pymol-0.99 was created (with CHANGES.gz  DEVELOPERS.gz  README.gz).
Looks good....
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-03-02 06:33:10 UTC
You get the python version from python.eclass. First run python_version(), then $PYVER is set to the major.minor (e.g., 2.3, 2.4).
Comment 4 hodak 2006-03-02 15:02:51 UTC
je_fro: I think that for your configuration demos do not work. Can you test it?
Comment 5 hodak 2006-03-02 15:15:42 UTC
Created attachment 81151 [details]
Updated pymol 0.99 ebuild

Here is updated ebuild, it does everything I wanted and works for me without problems. 

The only thing is that I would prefer that examples, data, tests and scripts would go to /usr/lib/python2.4/site-packages/pymol/ instead of /usr/share/doc/, but when I try this I get "permission denied":

mv: cannot move `data' to `/usr/lib/python2.4/site-packages/pymol/data': Permission denied

Is there something that can be done about this?
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2006-03-03 09:33:08 UTC
Added 0.99 to portage. If you'd like, take a look at how I've done things differently.