setuptools: Installation of packages fails after 28.7.0 upgrade: Documentation object is not iterable
Getting a weird error: TypeError: 'Documentation' object is not iterable
trying to install rjsmin in a brand new virtualenv with the latest setup tools. This is on Ubuntu 16.0.4 and my OS X machine does the same thing.
ubuntu@staging:~$ virtualenv env
New python executable in /home/ubuntu/env/bin/python
Installing setuptools, pip, wheel...done.
ubuntu@staging:~$ source env/bin/activate
(env) ubuntu@staging:~$ pip install rjsmin
Collecting rjsmin
Using cached rjsmin-1.0.12.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/rjsmin.egg-info
writing pip-egg-info/rjsmin.egg-info/PKG-INFO
writing top-level names to pip-egg-info/rjsmin.egg-info/top_level.txt
writing dependency_links to pip-egg-info/rjsmin.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/rjsmin.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-EeZDjY/rjsmin/setup.py", line 42, in <module>
setup()
File "/tmp/pip-build-EeZDjY/rjsmin/setup.py", line 33, in setup
return run(script_args=args, ext=ext, manifest_only=_manifest)
File "_setup/py2/setup.py", line 421, in run
return _core.setup(**kwargs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 279, in run
self.find_sources()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 306, in find_sources
mm.run()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 533, in run
self.add_defaults()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults
sdist.add_defaults(self)
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 35, in add_defaults
self._add_defaults_data_files()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 111, in _add_defaults_data_files
dirname, filenames = item
TypeError: 'Documentation' object is not iterable
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EeZDjY/rjsmin/
(env) ubuntu@staging:~$ pip show setuptools
---
Metadata-Version: 2.0
Name: setuptools
Version: 28.7.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
Installer: pip
License: UNKNOWN
Location: /home/ubuntu/env/lib/python2.7/site-packages
Requires:
Classifiers:
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Topic :: Software Development :: Libraries :: Python Modules
Topic :: System :: Archiving :: Packaging
Topic :: System :: Systems Administration
Topic :: Utilities
Entry-points:
[console_scripts]
easy_install = setuptools.command.easy_install:main
easy_install-3.5 = setuptools.command.easy_install:main
[distutils.commands]
alias = setuptools.command.alias:alias
bdist_egg = setuptools.command.bdist_egg:bdist_egg
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst
build_ext = setuptools.command.build_ext:build_ext
build_py = setuptools.command.build_py:build_py
develop = setuptools.command.develop:develop
easy_install = setuptools.command.easy_install:easy_install
egg_info = setuptools.command.egg_info:egg_info
install = setuptools.command.install:install
install_egg_info = setuptools.command.install_egg_info:install_egg_info
install_lib = setuptools.command.install_lib:install_lib
install_scripts = setuptools.command.install_scripts:install_scripts
register = setuptools.command.register:register
rotate = setuptools.command.rotate:rotate
saveopts = setuptools.command.saveopts:saveopts
sdist = setuptools.command.sdist:sdist
setopt = setuptools.command.setopt:setopt
test = setuptools.command.test:test
upload = setuptools.command.upload:upload
upload_docs = setuptools.command.upload_docs:upload_docs
[distutils.setup_keywords]
convert_2to3_doctests = setuptools.dist:assert_string_list
dependency_links = setuptools.dist:assert_string_list
eager_resources = setuptools.dist:assert_string_list
entry_points = setuptools.dist:check_entry_points
exclude_package_data = setuptools.dist:check_package_data
extras_require = setuptools.dist:check_extras
include_package_data = setuptools.dist:assert_bool
install_requires = setuptools.dist:check_requirements
namespace_packages = setuptools.dist:check_nsp
package_data = setuptools.dist:check_package_data
packages = setuptools.dist:check_packages
python_requires = setuptools.dist:check_specifier
setup_requires = setuptools.dist:check_requirements
test_loader = setuptools.dist:check_importable
test_runner = setuptools.dist:check_importable
test_suite = setuptools.dist:check_test_suite
tests_require = setuptools.dist:check_requirements
use_2to3 = setuptools.dist:assert_bool
use_2to3_exclude_fixers = setuptools.dist:assert_string_list
use_2to3_fixers = setuptools.dist:assert_string_list
zip_safe = setuptools.dist:assert_bool
[egg_info.writers]
PKG-INFO = setuptools.command.egg_info:write_pkg_info
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
entry_points.txt = setuptools.command.egg_info:write_entries
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
requires.txt = setuptools.command.egg_info:write_requirements
top_level.txt = setuptools.command.egg_info:write_toplevel_names
[setuptools.installation]
eggsecutable = setuptools.command.easy_install:bootstrap
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Revert to setuptools 28.6 on CI due to https://github.com/pypa/setuptools/issues/833 — committed to pretix/pretix by raphaelm 8 years ago
- Fixes and updates - Change document storage location back to default (Issue #34) - Update DEMO data (Issue #37) - Workaround for Issue #38 - setuptools v28.7 issue (https://github.com/... — committed to DocCyblade/tkl-mayan-edms by deleted user 8 years ago
I’ve added further technical details on that issue on the rcssmin bug tracker (https://github.com/ndparker/rcssmin/issues/6). The extra setup code in that project is hooking onto the install_data command and translating the options later on. This is where the Documentation objects are ‘flatten’ to a list of pair of strings. That translation does not happen when running the egg_info subcommand.
From a setuptools perspective, I’ll create a new pull request with unit test to make sure that particular behaviour is tested. Additionally and since setuptools is a corner stone software of the Python community, we might want to setup larger integration tests where we install each of the top 100 Pypi packages (http://pypi-ranking.info/?) using the test version of setuptools. This will make sure this type of commit and rollback does not happen again. It will also give quantitative details on the impact of such change.