You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/01/29 14:44:17 UTC

svn commit: r149039 - /httpd/mod_python/trunk/dist/win32_postinstall.py

Author: nlehuen
Date: Sat Jan 29 05:44:17 2005
New Revision: 149039

URL: http://svn.apache.org/viewcvs?view=rev&rev=149039
Log:
We log the path to mod_python.so, and remove it when uninstalling mod_python.
Modified:
   httpd/mod_python/trunk/dist/win32_postinstall.py

Modified: httpd/mod_python/trunk/dist/win32_postinstall.py
Url: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/dist/win32_postinstall.py?view=diff&rev=149039&p1=httpd/mod_python/trunk/dist/win32_postinstall.py&r1=149038&p2=httpd/mod_python/trunk/dist/win32_postinstall.py&r2=149039
==============================================================================
--- httpd/mod_python/trunk/dist/win32_postinstall.py	(original)
+++ httpd/mod_python/trunk/dist/win32_postinstall.py	Sat Jan 29 05:44:17 2005
@@ -110,7 +110,12 @@
     if apachedir:
 
         # put mod_python.so there
-        shutil.copy2(mp, os.path.join(apachedir, "modules", "mod_python.so"))
+        mod_python_so_path = os.path.join(apachedir, "modules", "mod_python.so")
+        mod_python_uninstall_log = os.path.join(os.path.dirname(__file__),'mod_python_uninstall.log')
+        shutil.copy2(mp, mod_python_so_path)
+        f = file(mod_python_uninstall_log,'wb')
+        f.write(mod_python_so_path)
+        f.close()
         os.remove(mp)
 
         print """Important Note for Windows users, PLEASE READ!!!
@@ -148,3 +153,10 @@
            http://www.modpython.org/live/current/doc-html/inst-testing.html
 
         """ % (mp, os.path.join(apachedir, "conf", "httpd.conf"))
+elif len(sys.argv) > 1 and sys.argv[1] == "-remove":
+    mod_python_uninstall_log = os.path.join(os.path.dirname(__file__),'mod_python_uninstall.log')
+    f = file(mod_python_uninstall_log,'rb')
+    mod_python_so_path = f.read()
+    f.close()
+    os.remove(mod_python_so_path)
+    os.remove(mod_python_uninstall_log)