Created attachment 179814 [details] Terminal capture showing passing and failing examples When the MANIFEST.in file contains a graft statement that refers to a directory that does not exist, the egg_info command will fail when run under python 3.4.6. Expected behavior: setuptools warns on the nonexistent directory Observed behavior: setuptools exits with an error on the nonexistent directory due to an unhandled `FileNotFoundError` exception How to reproduce: export DISTUTILS_DEBUG=yes echo "graft nope" > MANIFEST.in python3.4 \ -c "from setuptools import setup; setup(name='x', version='0.1.0')" \ sdist See the attached sample output comparing output between `distutils.core.setup` and `setuptools.setup` across all versions of python currently supported on FreeBSD. Only the combination of `setuptools` with python 3.4.6 exhibit this problem. N.B. I believe the underlying problem is where `setuptools.commands.egg_info` uses `distutils.filelist.findall`. I chose to demonstrate the problem with the sdist command because that is the only `distutils` command that uses `distutils.filelist.findall`. See some background on this bug on the freebsd-python list [0]. [0] https://lists.freebsd.org/pipermail/freebsd-python/2017-January/011524.html
I believe I have isolated this to versions of setuptools prior to v34.0.1. At and after that point, setuptools switches to using a glob [0] which avoids triggering the changed behavior in python 3.4.6. Therefore, upgrading the port to v34.0.1 or later would resolve this issue. [0] https://github.com/pypa/setuptools/commit/9cb83c3711d737fa3bff56f55e4def8267bae83c
(In reply to John W. O'Brien from comment #1) Would you file a PR to update py-setuptools to 34.1.1 ? wen
(In reply to Wen Heping from comment #2) I'll be glad to give it a shot. Given [0], and that a tarball is consequently no longer published to PyPI, do you have an initial sense of the best way to proceed? I'm thinking switch to GH, start using the bootstrap.py script, and figure out how to satisfy the pip dependency. [0] https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v3400
Remove dependency on bug #217044 The upgrade to 34.x will probably be hard, while this bug may only need to cherry-pick a commit.
Created attachment 179918 [details] devel/py-setuptools: Backport graft glob support from 34.0.1 QA == portlint: OK -- two pre-existing warnings poudriere testport: OK -- py2.7 (default), py3.4, py3.5, py3.6
(In reply to John W. O'Brien from comment #1) A correction to my earlier comment. Setuptools actually restored the glob function in [0], which is what avoids the underlying problem with python 3.4.6. [1] simply changes how the glob feature is implemented. In the patch I attached, I backport the earlier commit but not the later one. [0] https://github.com/pypa/setuptools/commit/56274b32724933cd2016488c4e667e86d30572ef [1] https://github.com/pypa/setuptools/commit/9cb83c3711d737fa3bff56f55e4def8267bae83c
Created attachment 181190 [details] devel/py27-setuptools: Backport graft glob support from 34.0.1 Refresh patch following ports r436290 and ports r436350.
Resolved by upgrade to setuptools 36.0.1 (bug #219876)