/[gentoo-x86]/dev-python/pyopenssl/pyopenssl-0.13.ebuild
Gentoo

Contents of /dev-python/pyopenssl/pyopenssl-0.13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Oct 10 11:38:38 2013 UTC (11 months, 1 week ago) by djc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Remove old versions.

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/pyopenssl-0.13.ebuild,v 1.4 2012/05/08 23:47:18 aballier Exp $
4
5 EAPI="3"
6 SUPPORT_PYTHON_ABIS="1"
7 RESTRICT_PYTHON_ABIS="*-jython"
8 PYTHON_TESTS_FAILURES_TOLERANT_ABIS="3.1"
9
10 inherit distutils
11
12 MY_PN="pyOpenSSL"
13 MY_P="${MY_PN}-${PV}"
14
15 DESCRIPTION="Python interface to the OpenSSL library"
16 HOMEPAGE="http://pyopenssl.sourceforge.net/ https://launchpad.net/pyopenssl http://pypi.python.org/pypi/pyOpenSSL"
17 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
18
19 LICENSE="Apache-2.0"
20 SLOT="0"
21 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
22 IUSE="doc"
23
24 RDEPEND=">=dev-libs/openssl-0.9.6g"
25 DEPEND="${RDEPEND}
26 doc? (
27 =dev-lang/python-2*
28 >=dev-tex/latex2html-2002.2
29 )"
30
31 S="${WORKDIR}/${MY_P}"
32
33 PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
34
35 PYTHON_MODNAME="OpenSSL"
36
37 src_prepare() {
38 distutils_src_prepare
39 sed \
40 -e "s/test_set_tlsext_host_name_wrong_args/_&/" \
41 -i OpenSSL/test/test_ssl.py
42 sed -e "s/python/&2/" -i doc/Makefile
43 }
44
45 src_compile() {
46 distutils_src_compile
47
48 if use doc; then
49 addwrite /var/cache/fonts
50
51 pushd doc > /dev/null
52 emake -j1 html ps dvi || die "Generation of documentation failed"
53 popd > /dev/null
54 fi
55 }
56
57 src_test() {
58 test_package() {
59 pushd OpenSSL/test > /dev/null
60
61 local exit_status="0" test
62 for test in test_*.py; do
63 einfo "Running ${test}..."
64 if ! PYTHONPATH="$(ls -d ../../build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" "${test}"; then
65 eerror "${test} failed with $(python_get_implementation_and_version)"
66 exit_status="1"
67 fi
68 done
69
70 popd > /dev/null
71
72 return "${exit_status}"
73 }
74 python_execute_function test_package
75 }
76
77 src_install() {
78 distutils_src_install
79
80 delete_tests() {
81 rm -fr "${ED}$(python_get_sitedir)/OpenSSL/test"
82 }
83 python_execute_function -q delete_tests
84
85 if use doc; then
86 dohtml doc/html/* || die "dohtml failed"
87 dodoc doc/pyOpenSSL.* || die "dodoc failed"
88 fi
89
90 insinto /usr/share/doc/${PF}/examples
91 doins -r examples/* || die "doins failed"
92 }

  ViewVC Help
Powered by ViewVC 1.1.20