[Opensrf-commits] r1183 - in trunk/src: . python python/osrf

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Dec 22 21:53:44 EST 2007


Author: dbs
Date: 2007-12-22 21:31:38 -0500 (Sat, 22 Dec 2007)
New Revision: 1183

Added:
   trunk/src/python/Makefile
   trunk/src/python/setup.py
Modified:
   trunk/src/Makefile
   trunk/src/python/osrf/http_translator.py
Log:
Use distutils to install Python into the standard location
Correct a syntax error in http_translator.py


Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2007-12-21 13:34:51 UTC (rev 1182)
+++ trunk/src/Makefile	2007-12-23 02:31:38 UTC (rev 1183)
@@ -1,12 +1,10 @@
 # TOP level 'src' makefile for OpenSRF
 
-
 export TMPDIR	= $(TMP)/opensrf
 export OPENSRF	= opensrf
 export BINDIR	= $(PREFIX)/bin
 export LIBDIR	= $(PREFIX)/lib
 export PERLDIR	= $(LIBDIR)/perl5
-export PYTHON25DIR	= $(LIBDIR)/python25
 export JSDIR	= $(LIBDIR)/javascript
 export INCLUDEDIR= $(PREFIX)/include
 
@@ -34,7 +32,7 @@
 		jserver-install \
 		javascript-install \
 		perl-install \
-		python25-install \
+		python-install \
 		java-install
 
 
@@ -81,7 +79,6 @@
 	mkdir -p $(BINDIR)
 	mkdir -p $(JSDIR)
 	mkdir -p $(PERLDIR)
-	mkdir -p $(PYTHON25DIR)
 	mkdir -p $(INCLUDEDIR)
 	mkdir -p $(ETCDIR)
 
@@ -125,9 +122,8 @@
 	@echo $@
 	cp -r perlmods/* $(PERLDIR)/
 
-python25-install:	install-prep
-	@echo $@
-	cp -r python/* $(PYTHON25DIR)/
+python-install:
+	make -C python install
 
 java-install:
 	if [ -n "$(OSRF_INSTALL_JAVA)" ]; then echo $@; cd java && . deps.inc && make install; fi;
@@ -143,6 +139,7 @@
 	make -C srfsh clean
 	make -C c-apps clean
 	make -C java clean
+	make -C python clean
 	/bin/rm -rf $(TMPDIR) *.o
 
 

Added: trunk/src/python/Makefile
===================================================================
--- trunk/src/python/Makefile	                        (rev 0)
+++ trunk/src/python/Makefile	2007-12-23 02:31:38 UTC (rev 1183)
@@ -0,0 +1,21 @@
+# makefile for OpenSRF Python modules and scripts
+
+install: 	python-install
+
+# --------------------------------------------------------------------------------
+# INSTALL
+# --------------------------------------------------------------------------------
+python-build:
+	@echo $@
+	python setup.py build
+
+python-install:	python-build
+	@echo $@
+	python setup.py install
+
+# --------------------------------------------------------------------------------
+# CLEAN	
+# --------------------------------------------------------------------------------
+clean:
+	/bin/rm -rf build 
+

Modified: trunk/src/python/osrf/http_translator.py
===================================================================
--- trunk/src/python/osrf/http_translator.py	2007-12-21 13:34:51 UTC (rev 1182)
+++ trunk/src/python/osrf/http_translator.py	2007-12-23 02:31:38 UTC (rev 1183)
@@ -8,7 +8,7 @@
 import osrf.set
 import sys
 from osrf.const import OSRF_MESSAGE_TYPE_DISCONNECT, OSRF_STATUS_CONTINUE, \
-    OSRF_STATUS_TIMEOUT, OSRF_MESSAGE_TYPE_STATUS,
+    OSRF_STATUS_TIMEOUT, OSRF_MESSAGE_TYPE_STATUS
 import osrf.net
 import osrf.log
 

Added: trunk/src/python/setup.py
===================================================================
--- trunk/src/python/setup.py	                        (rev 0)
+++ trunk/src/python/setup.py	2007-12-23 02:31:38 UTC (rev 1183)
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+from distutils.core import setup
+import os, os.path
+
+dir = os.path.dirname(__file__)
+
+setup(name='OpenSRF',
+    version='1.2',
+# requires is not actually implemented in distutils
+#    requires=['memcache', 'pyxmpp', 'simplejson'],
+    description='OpenSRF Python Modules',
+    author='Bill Erickson',
+    author_email='open-ils-dev at list.georgialibraries.org',
+    url='http://www.open-ils.org/',
+    packages=['osrf'],
+    package_dir={'': dir},
+    scripts=[os.path.join(dir, 'srfsh.py')]
+)



More information about the opensrf-commits mailing list