Revision: 139889 https://trac.macports.org/changeset/139889 Author: stromnov@macports.org Date: 2015-08-31 09:51:32 -0700 (Mon, 31 Aug 2015) Log Message: ----------- py-path: backport deprecated feature from 8.1 Modified Paths: -------------- trunk/dports/python/py-path/Portfile Added Paths: ----------- trunk/dports/python/py-path/files/ trunk/dports/python/py-path/files/patch-path.py.diff Modified: trunk/dports/python/py-path/Portfile =================================================================== --- trunk/dports/python/py-path/Portfile 2015-08-31 16:46:25 UTC (rev 139888) +++ trunk/dports/python/py-path/Portfile 2015-08-31 16:51:32 UTC (rev 139889) @@ -6,7 +6,7 @@ name py-path version 8.0 -revision 0 +revision 1 categories-append devel platforms darwin license MIT @@ -28,11 +28,13 @@ sha256 ac78a7f9c65c6c0abd9a8586e5c5a06b3a2f99e7812c928101d048d18037a1b6 if {${name} ne ${subport}} { - livecheck.type none - depends_build-append \ port:py${python.version}-setuptools \ port:py${python.version}-setuptools_scm + + patchfiles-append patch-path.py.diff + + livecheck.type none } else { livecheck.type pypi livecheck.name ${python.rootname}.py Added: trunk/dports/python/py-path/files/patch-path.py.diff =================================================================== --- trunk/dports/python/py-path/files/patch-path.py.diff (rev 0) +++ trunk/dports/python/py-path/files/patch-path.py.diff 2015-08-31 16:51:32 UTC (rev 139889) @@ -0,0 +1,13 @@ +--- path.py.orig 2015-08-31 19:47:35.000000000 +0300 ++++ path.py 2015-08-31 19:47:58.000000000 +0300 +@@ -1706,3 +1706,10 @@ + @property + def normcase(self): + return __import__('ntpath').normcase ++ ++ ++class path(Path): ++ def __new__(cls, *args, **kwargs): ++ msg = "path is deprecated. Use Path instead." ++ warnings.warn(msg, DeprecationWarning) ++ return Path.__new__(cls, *args, **kwargs)