[93505] trunk/dports/python/py-distribute/Portfile

jmr at macports.org jmr at macports.org
Thu May 24 10:58:09 PDT 2012


Revision: 93505
          https://trac.macports.org/changeset/93505
Author:   jmr at macports.org
Date:     2012-05-24 10:58:09 -0700 (Thu, 24 May 2012)
Log Message:
-----------
py32-distribute: delete previously autogenerated .pyc files before activating

Modified Paths:
--------------
    trunk/dports/python/py-distribute/Portfile

Modified: trunk/dports/python/py-distribute/Portfile
===================================================================
--- trunk/dports/python/py-distribute/Portfile	2012-05-24 17:39:58 UTC (rev 93504)
+++ trunk/dports/python/py-distribute/Portfile	2012-05-24 17:58:09 UTC (rev 93505)
@@ -46,3 +46,14 @@
     livecheck.url       ${homepage}
     livecheck.regex     distribute-(\\d+(\\.\\d+)+)
 }
+
+subport py32-distribute {
+    pre-activate {
+        foreach fname {easy_install site pkg_resources} {
+            set fpath "${python.pkgd}/__pycache__/${fname}.cpython-32.pyc"
+            if {[file exists $fpath] && [registry_file_registered $fpath] == "0"} {
+                file delete -force $fpath
+            }
+        }
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120524/cac6ec60/attachment.html>


More information about the macports-changes mailing list