From owner-svn-ports-head@freebsd.org Sat Sep 30 14:46:00 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DE10E28ECB; Sat, 30 Sep 2017 14:46:00 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A55371E0B; Sat, 30 Sep 2017 14:45:59 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8UEjx5P092586; Sat, 30 Sep 2017 14:45:59 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8UEjx4T092583; Sat, 30 Sep 2017 14:45:59 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201709301445.v8UEjx4T092583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Sat, 30 Sep 2017 14:45:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r450995 - in head/sysutils/py-scandir: . files X-SVN-Group: ports-head X-SVN-Commit-Author: rene X-SVN-Commit-Paths: in head/sysutils/py-scandir: . files X-SVN-Commit-Revision: 450995 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2017 14:46:00 -0000 Author: rene Date: Sat Sep 30 14:45:58 2017 New Revision: 450995 URL: https://svnweb.freebsd.org/changeset/ports/450995 Log: sysutils/py-scandir: update to 1.6 Add a patch to somewhat deal with Unicode tests, they still fail but this might be unrelated to the port itself. Sort USES before USE_* Submitted by: portscout Added: head/sysutils/py-scandir/files/ head/sysutils/py-scandir/files/patch-test_test__scandir.py (contents, props changed) Modified: head/sysutils/py-scandir/Makefile head/sysutils/py-scandir/distinfo Modified: head/sysutils/py-scandir/Makefile ============================================================================== --- head/sysutils/py-scandir/Makefile Sat Sep 30 13:23:29 2017 (r450994) +++ head/sysutils/py-scandir/Makefile Sat Sep 30 14:45:58 2017 (r450995) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= scandir -PORTVERSION= 1.5 +PORTVERSION= 1.6 DISTVERSIONPREFIX= v CATEGORIES= sysutils python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,11 +12,11 @@ COMMENT= Fast and featureful directory iterator LICENSE= BSD3CLAUSE -USE_GITHUB= yes -GH_ACCOUNT= benhoyt - USES= python USE_PYTHON= autoplist distutils + +USE_GITHUB= yes +GH_ACCOUNT= benhoyt do-test: ${PYTHON_CMD} ${WRKSRC}/test/run_tests.py Modified: head/sysutils/py-scandir/distinfo ============================================================================== --- head/sysutils/py-scandir/distinfo Sat Sep 30 13:23:29 2017 (r450994) +++ head/sysutils/py-scandir/distinfo Sat Sep 30 14:45:58 2017 (r450995) @@ -1,3 +1,3 @@ -TIMESTAMP = 1487840889 -SHA256 (benhoyt-scandir-v1.5_GH0.tar.gz) = 3b2be74e0be665d22adaf841d1cadab7ed4aa2001a9bb81452e0f498cd0780d8 -SIZE (benhoyt-scandir-v1.5_GH0.tar.gz) = 28100 +TIMESTAMP = 1506772140 +SHA256 (benhoyt-scandir-v1.6_GH0.tar.gz) = 4a84e86c1d1632a8960c3db8686296de048337263406d12e66145e753e078798 +SIZE (benhoyt-scandir-v1.6_GH0.tar.gz) = 29401 Added: head/sysutils/py-scandir/files/patch-test_test__scandir.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/py-scandir/files/patch-test_test__scandir.py Sat Sep 30 14:45:58 2017 (r450995) @@ -0,0 +1,69 @@ +--- test/test_scandir.py.orig 2017-09-29 12:38:51 UTC ++++ test/test_scandir.py +@@ -14,6 +14,9 @@ try: + except ImportError: + has_scandir = False + ++reload(sys) ++sys.setdefaultencoding('utf8') ++ + FILE_ATTRIBUTE_DIRECTORY = 16 + + TEST_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'testdir')) +@@ -48,24 +51,24 @@ def create_file(path, contents='1234'): + def setup_main(): + join = os.path.join + +- os.mkdir(TEST_PATH) +- os.mkdir(join(TEST_PATH, 'subdir')) ++ os.makedirs(TEST_PATH) ++ os.makedirs(join(TEST_PATH, 'subdir')) + create_file(join(TEST_PATH, 'file1.txt')) + create_file(join(TEST_PATH, 'file2.txt'), contents='12345678') + +- os.mkdir(join(TEST_PATH, 'subdir', 'unidir\u018F')) ++ os.makedirs(join(TEST_PATH, 'subdir', u'unidir\u018F')) + create_file(join(TEST_PATH, 'subdir', 'file1.txt')) +- create_file(join(TEST_PATH, 'subdir', 'unicod\u018F.txt')) ++ create_file(join(TEST_PATH, 'subdir', u'unicod\u018F.txt')) + +- create_file(join(TEST_PATH, 'subdir', 'unidir\u018F', 'file1.txt')) ++ create_file(join(TEST_PATH, 'subdir', u'unidir\u018F', 'file1.txt')) + +- os.mkdir(join(TEST_PATH, 'linkdir')) ++ os.makedirs(join(TEST_PATH, 'linkdir')) + + + def setup_symlinks(): + join = os.path.join + +- os.mkdir(join(TEST_PATH, 'linkdir', 'linksubdir')) ++ os.makedirs(join(TEST_PATH, 'linkdir', 'linksubdir')) + create_file(join(TEST_PATH, 'linkdir', 'file1.txt')) + + os.symlink(os.path.abspath(join(TEST_PATH, 'linkdir', 'file1.txt')), +@@ -217,7 +220,7 @@ class TestMixin(object): + self.assertTrue(isinstance(entry.path, bytes)) + + # b'unicod?.txt' on Windows, b'unicod\xc6\x8f.txt' (UTF-8) or similar on POSIX +- entry_name = 'unicod\u018f.txt'.encode(sys.getfilesystemencoding(), 'replace') ++ entry_name = u'unicod\u018f.txt'.encode(sys.getfilesystemencoding(), 'replace') + self.assertEqual(entry.name, entry_name) + self.assertEqual(entry.path, os.path.join(path, entry_name)) + +@@ -234,12 +237,12 @@ class TestMixin(object): + self.assertTrue(isinstance(entry.name, str)) + self.assertTrue(isinstance(entry.path, str)) + +- entry_name = 'unicod\u018f.txt' ++ entry_name = u'unicod\u018f.txt' + self.assertEqual(entry.name, entry_name) +- self.assertEqual(entry.path, os.path.join(path, 'unicod\u018f.txt')) ++ self.assertEqual(entry.path, os.path.join(path, u'unicod\u018f.txt')) + + # Check that it handles unicode input properly +- path = os.path.join(TEST_PATH, 'subdir', 'unidir\u018f') ++ path = os.path.join(TEST_PATH, 'subdir', u'unidir\u018f') + self.assertTrue(isinstance(path, str)) + entries = list(self.scandir_func(path)) + self.assertEqual(len(entries), 1)