Python earlier than 3.5 is unable to use pathlib2 due to a missing dependency. I'm getting the following error when I try to import it. % python2 Python 2.7.13 (default, Jan 5 2017, 01:52:49) [GCC 4.2.1 Compatible FreeBSD Clang 3.9.1 (tags/RELEASE_391/final 289601)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/pathlib2.py", line 46, in <module> from scandir import scandir as os_scandir ImportError: No module named scandir >>> It seems pathlib2 2.2.1 added a dependency in https://github.com/mcmtroffaes/pathlib2/commit/ebc97b37d4f3441624eaef0a17b97470c7264d06#diff-26e76055fe3b754cfe171b269e04d00c. It tries to use the new python 3.5 os.scandir, then if that fails uses scandir.scandir.
So if I understand correctly the problem is in py-pathlib2, not in py-scandir?
Correct, it seems bugzilla added you as sysutils/py-scandir is in the summary.
Created attachment 180176 [details] proposed patch
A commit references this bug: Author: rm Date: Fri Feb 24 20:54:40 UTC 2017 New revision: 434748 URL: https://svnweb.freebsd.org/changeset/ports/434748 Log: devel/py-pathlib2: add missing dependency Add dependency upon sysutils/py-scandir, because it required for python < 3.5. Bump PORTREVISION. PR: 217238 Submitted by: antoine Reported by: Andrew Approved by: portmgr (blanket approval) MFH: 2017Q1 Changes: head/devel/py-pathlib2/Makefile
Fix committed, thank you!