Summary: | dev-python/nltk-3.0.0 - /usr/bin/python2.7 setup.py build: AttributeError: 'module' object has no attribute 'finders' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | [OLD] Development | Assignee: | LABBE Corentin <clabbe.montjoie> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | proxy-maint, zerochaos |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Toralf Förster
2015-01-28 15:03:36 UTC
File "setup.py", line 37, in <module> del sdist.finders[:] AttributeError: 'module' object has no attribute 'finders' setuptools really isn't having a good year so far. However, this sdist.finders is a ghost ~/cvsPortage/gentoo-x86/dev-python/nltk $ python -c "from setuptools.command import sdist" success ~/cvsPortage/gentoo-x86/dev-python/nltk $ python -c "from setuptools.command.sdist import finders"Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name finders Which begs 3 questions. 1. How did this pass addition to the tree *nltk-3.0.0 (22 Dec 2014) 2. What are upstream doing importing a ghost module. It looks like their intention relates to # Prevent setuptools from trying to add extra files to the source code # manifest by scanning the version control system for its contents. 3. What next? I can't recall seeing lines like these from setuptools.command import sdist del sdist.finders[:] before Comment them out by sed and the package builds and installs. Also PYTHON_COMPAT can do with updating to PYTHON_COMPAT=( python{2_7,3_3,3_4} ) They look totally spurious I strongly suspect this module existed in setuptools latest in 22 Dec 2014. My current is the most recent. Needs d;grade to an older setuptools and re-run and see if this module existed then. Downgrade to setuptools-9.1 made nltk to build and install. This issue was probably introduced here. https://bitbucket.org/pypa/setuptools/commits/f191c8a1225b#chg-setuptools/command/sdist.py nltk should not be messing with setuptools internals, so I blame them. https://github.com/nltk/nltk/commit/efe85968bb23e3afdcd331293f2c2588b1590091 upstream fixed it by no longer messing with setuptools internals. Thanks floppym patch stolen and added to 2.0.4. I bumped nltk-3.0.0 to 3.0.2, mostly to show that the fix was applied in 3.0.1 and no longer needed after that. The ancient stable ebuild appears unaffected. thanks for the report. |