Rev 1521: Allow overriding the Subversion prefix by setting the SVN_PREFIX environment variable. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Sat Aug 2 16:12:54 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1521
revision-id: jelmer at samba.org-20080802151253-4buzqnjgfm55bpmf
parent: jelmer at samba.org-20080802150504-djy29xzukeu0pxnd
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sat 2008-08-02 17:12:53 +0200
message:
Allow overriding the Subversion prefix by setting the SVN_PREFIX environment variable.
modified:
setup.py setup.py-20060502115218-86950492da22353f
=== modified file 'setup.py'
--- a/setup.py 2008-07-30 10:42:53 +0000
+++ b/setup.py 2008-08-02 15:12:53 +0000
@@ -86,12 +86,19 @@
def svn_build_data():
"""Determine the Subversion header file location."""
- basedirs = ["/usr/local", "/usr"]
- for basedir in basedirs:
- includedir = os.path.join(basedir, "include/subversion-1")
- if os.path.isdir(includedir):
- return ([includedir], [os.path.join(basedir, "lib")], [])
- raise Exception("Subversion development files not found")
+ svn_prefix = os.getenv("SVN_PREFIX")
+ if svn_prefix is None:
+ basedirs = ["/usr/local", "/usr"]
+ for basedir in basedirs:
+ includedir = os.path.join(basedir, "include/subversion-1")
+ if os.path.isdir(includedir):
+ svn_prefix = basedir
+ break
+ if svn_prefix is not None:
+ return ([os.path.join(basedir, "include/subversion-1")],
+ [os.path.join(basedir, "lib")], [])
+ raise Exception("Subversion development files not found. "
+ "Please set SVN_PREFIX environment variable. ")
# Windows versions - we use environment variables to locate the directories
# and hard-code a list of libraries.
More information about the bazaar-commits
mailing list