@@ -293,67 +293,6 @@ def cache_error(msg, errnum):
293293 return errors
294294
295295
296- def maybe_create_svn_symlinks (settings ):
297- site_packages_dir = None
298- errors = []
299- for p in sys .path :
300- if ('/env/' in p or '/venv/' in p ) and '/site-packages' in p :
301- site_packages_dir = p
302- break
303- if site_packages_dir :
304- for path in settings .SVN_PACKAGES :
305- if os .path .exists (path ):
306- dir , name = os .path .split (path )
307- package_link = os .path .join (site_packages_dir , name )
308- if not os .path .lexists (package_link ):
309- os .symlink (path , package_link )
310- else :
311- errors .append (checks .Critical (
312- "The setting SVN_PACKAGES specify a library path which\n "
313- "does not exist:\n "
314- " %s\n " % path ,
315- hint = "Please provide the correct python system site-package paths for\n "
316- "\t svn and libsvn in SVN_PACKAGES.\n " ,
317- id = "datatracker.E0018" ,))
318- return errors
319-
320- @checks .register ('cache' )
321- def check_svn_import (app_configs , ** kwargs ):
322- #
323- if already_ran ():
324- return []
325- #
326- errors = []
327- #
328- errors += maybe_create_svn_symlinks (settings )
329- #
330- if settings .SERVER_MODE == 'production' :
331- try :
332- import svn # pyflakes:ignore
333- except ImportError as e :
334- errors .append (checks .Critical (
335- "Could not import the python svn module:\n %s\n " % e ,
336- hint = dedent ("""
337- You are running in production mode, and the subversion bindings for python
338- are necessary in order to run the Trac wiki glue scripts.
339-
340- However, the subversion bindings seem to be unavailable. The subversion
341- bindings are not available for install using pip, but must be supplied by
342- the system package manager. In order to be available within the python
343- virtualenv, ietf.checks.check_svn_import() tries to create a symlink from
344- the configured location of the system-provided svn package to the
345- site-packages directory of the virtualenv. If you get this message, that has
346- failed to provide the svn package.
347-
348- Please install 'python-subversion' (Debian), 'subversion-python' (RedHat,
349- CentOS, Fedora), 'subversion-python27bindings' (BSD); and provide the
350- correct path to the svn package in settings.SVN_PACKAGE. Further tips are
351- available at https://trac.edgewall.org/wiki/TracSubversion.
352-
353- """ ).replace ('\n ' , '\n ' ).rstrip (),
354- id = "datatracker.E0019" ,
355- ))
356- return errors
357296
358297@checks .register ('files' )
359298def maybe_patch_library (app_configs , ** kwargs ):
0 commit comments