Diff beautifulsoup-3.2.1-r1 with a beautifulsoup-4.5.1

/usr/portage/dev-python/beautifulsoup/beautifulsoup-4.5.1.ebuild 2019-10-11 18:40:00.000000000 +0300
1
# Copyright 1999-2018 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=5
5
PYTHON_COMPAT=( python2_7 pypy )
4
EAPI=6
5

  
6
PYTHON_COMPAT=( python2_7 python3_{5,6} pypy pypy3 )
6 7

  
7 8
inherit distutils-r1
8 9

  
9
MY_PN="BeautifulSoup"
10
MY_P="${MY_PN}-${PV}"
10
MY_PN=${PN}4
11
MY_P=${MY_PN}-${PV}
11 12

  
12
DESCRIPTION="HTML/XML parser for quick-turnaround applications like screen-scraping"
13
HOMEPAGE="https://www.crummy.com/software/BeautifulSoup/ https://pypi.org/project/BeautifulSoup/"
14
SRC_URI="https://www.crummy.com/software/${MY_PN}/download/3.x/${MY_P}.tar.gz"
15

  
16
LICENSE="BSD"
17
SLOT="python-2"
18
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
19
IUSE=""
13
DESCRIPTION="Provides pythonic idioms for iterating, searching, and modifying an HTML/XML parse tree"
14
HOMEPAGE="https://bugs.launchpad.net/beautifulsoup/
15
	https://pypi.org/project/beautifulsoup4/"
16
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
17

  
18
LICENSE="MIT"
19
SLOT="4"
20
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
21

  
22
IUSE="doc test"
23

  
24
# html5lib is optional however hard coding since its use is actively discouraged in the devmanual
25
RDEPEND="
26
	$(python_gen_cond_dep 'dev-python/html5lib[${PYTHON_USEDEP}]' python2_7 pypy)
27
	$(python_gen_cond_dep 'dev-python/lxml[${PYTHON_USEDEP}]' python2_7 'python3*')"
28
DEPEND="
29
	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
30
	test? ( dev-python/nose[${PYTHON_USEDEP}] )
31
	"
20 32

  
21
DEPEND=""
22
RDEPEND="!dev-python/beautifulsoup:0"
33
S=${WORKDIR}/${MY_P}
23 34

  
24
S="${WORKDIR}/${MY_P}"
35
python_compile_all() {
36
	use doc && emake -C doc html
37
}
25 38

  
26 39
python_test() {
27
	"${PYTHON}" BeautifulSoupTests.py || die "Testing failed with ${EPYTHON}"
40
	nosetests --verbose -w "${BUILD_DIR}"/lib || die "Tests fail with ${EPYTHON}"
41
}
42

  
43
python_install_all() {
44
	use doc && local HTML_DOCS=( doc/build/html/. )
45
	distutils-r1_python_install_all
28 46
}
Thank you!