Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532608 - dev-python/nltk should not depend on dev-python/numpy dev-python/pyyaml dev-lang/python[tk]
Summary: dev-python/nltk should not depend on dev-python/numpy dev-python/pyyaml dev-l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LABBE Corentin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 02:37 UTC by gentoo-user
Modified: 2014-12-22 14:13 UTC (History)
2 users (show)

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


Attachments
Updated nltk ebuild. (nltk-3.0.0.ebuild,732 bytes, text/plain)
2014-12-15 02:42 UTC, gentoo-user
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo-user 2014-12-15 02:37:52 UTC
The current nltk ebuilds (=dev-python/nltk-2.0.4 especially) have unneeded hard depends on numpy and pyyaml (and in the case of 2.0.4) on python built with the tk use flag.
nltk works just fine without any of these depends as they are only optional depends required for some, but not all, features.
Below is an ebuild excerpt that I use locally for nltk-3.0.0 which should only need an adjustement of PYTHON_COMPAT for it to be used with nltk-2.0.4.
```
EAPI="5"

PYTHON_COMPAT=( python2_{6,7} )
PYTHON_REQ_USE="tk(+),xml(+)"

inherit distutils-r1

DESCRIPTION="Natural Language Toolkit"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
HOMEPAGE="http://nltk.org/"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"

RDEPEND="${RDEPEND}
	dev-python/numpy[${PYTHON_USEDEP}]
	dev-python/pyyaml[${PYTHON_USEDEP}]"

DEPEND="${RDEPEND}
	app-arch/unzip"
```


Reproducible: Always

Steps to Reproduce:
1. Install nltk.
2. See that numpy, pyyaml, and tk are optional.
Actual Results:  
nltk has hard depends on numpy, python with tk, and pyyaml

Expected Results:  
nltk does not hard depend on numpy, python with tk, or pyyaml but instead allows the user to disable or enable these dependencies with use flags

The ebuilds also restrict PYTHON_COMPAT to python2, whereas nltk 3.0.0 (which isn't in the tree yet) works with both python2 and python3. As python3 currently isn't in tree, this isn't really a bug. Just wanted to mention it because I added it to PYTHON_COMPAT in the ebuild I attached.
Comment 1 gentoo-user 2014-12-15 02:42:45 UTC
Created attachment 391750 [details]
Updated nltk ebuild.

I accidentally pasted the wrong ebuild. This is the correct one.
Comment 2 LABBE Corentin 2014-12-19 07:26:33 UTC
I confirm the optionality of numpy and tk. But the setup.py is clear, pyyaml is mandatory.