From 76423012b5b51691dd059b1276351099e52c787e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Mon, 11 Nov 2013 17:07:52 -0600 Subject: For .svn legacy fallback, look for the files in the .svn not the directory. (Fixed unexpected deprecation warning from prombredanne) Also removed the warning from fallback, only a deprecation warning is issued. Environment.py whitespacing Created a specialized command executor for tests in Environment.py Legacy Test in test_egg_info now supresses the deprecation warning. PythonPath is now explicitly controlled to allow setup.py test on clean python installations. *Fixes Issue #101* Moved some dummy svn tests from test_sdist to test_egg_info since they are egg_info tests. Downgraded a with statement in a test since we haven't offically dropped 2.4 support, however, maybe it is time. Added a test case to ensure no extranuous output on sdist with a simple dummy package without rev ctrl. --- setuptools/svn_utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'setuptools/svn_utils.py') diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 6ac31a24..224d11ea 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -219,7 +219,13 @@ class SvnInfo(object): def load(cls, dirname=''): normdir = os.path.normpath(dirname) code, data = _run_command(['svn', 'info', normdir]) - has_svn = os.path.isdir(os.path.join(normdir, '.svn')) + # Must check for some contents, as some use empty directories + # in testcases + svn_dir = os.path.join(normdir, '.svn') + has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or + os.path.isfile(os.path.join(svn_dir, 'dir-props')) or + os.path.isfile(os.path.join(svn_dir, 'dir-prop-base'))) + svn_version = tuple(cls.get_svn_version().split('.')) try: @@ -229,7 +235,6 @@ class SvnInfo(object): if has_svn and (code or not base_svn_version or base_svn_version < (1, 3)): - log.warn('Fallback onto .svn parsing') warnings.warn(("No SVN 1.3+ command found: falling back " "on pre 1.7 .svn parsing"), DeprecationWarning) return SvnFileInfo(dirname) -- cgit v1.2.3