summaryrefslogtreecommitdiff
blob: 38a48fd485fe6f3155c0b4bcefd4799ae8694ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="3"

SUPPORT_PYTHON_ABIS="1"

inherit eutils python

DESCRIPTION="eMovie is a plug-in tool for the molecular visualization program PyMOL"
SRC_URI="http://www.weizmann.ac.il/ISPC/eMovie_package.zip"
HOMEPAGE="http://www.weizmann.ac.il/ISPC/eMovie.html"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64 ~x86-linux ~amd64-linux"
IUSE=""

RDEPEND=">sci-chemistry/pymol-0.99"
DEPEND="app-arch/unzip"
#RESTRICT_PYTHON_ABIS="3.*"

src_prepare() {
	epatch "${FILESDIR}"/${PV}-indent.patch

	mkdir ${P}
	mv e* ${P}/

	python_copy_sources

	conversion() {
		[[ "${PYTHON_ABI}" == 2.* ]] && return

		2to3-${PYTHON_ABI} -w eMovie.py > /dev/null
	}
	python_execute_function --action-message 'Applying patches for Python ${PYTHON_ABI}' --failure-message 'Applying patches for Python ${PYTHON_ABI} failed' -s conversion
}

src_install(){
	installation() {
		insinto $(python_get_sitedir)/pmg_tk/startup/
		doins eMovie.py || die
	}
	python_execute_function -s installation
}

pkg_postinst(){
	python_mod_optimize pmg_tk/startup
}

pkg_postrm() {
	python_mod_cleanup pmg_tk/startup
}