diff options
author | Steven Knight <knight@baldmt.com> | 2003-07-27 17:25:43 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-07-27 17:25:43 (GMT) |
commit | ed8786e2997389da9467e543b0be9173c486f235 (patch) | |
tree | dfbb8210638f4a42bdac55532958e505cb84cfb4 | |
parent | 60f78848e0e58a6002942ef73b8518023e2f8aa7 (diff) | |
download | SCons-ed8786e2997389da9467e543b0be9173c486f235.zip SCons-ed8786e2997389da9467e543b0be9173c486f235.tar.gz SCons-ed8786e2997389da9467e543b0be9173c486f235.tar.bz2 |
When installing from setup.py to a non-standard prefix, suppress the warning message about adding the (incorrect) directory to your search path.
-rw-r--r-- | src/CHANGES.txt | 4 | ||||
-rw-r--r-- | src/setup.py | 1 | ||||
-rw-r--r-- | src/setupTests.py | 16 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 6368d78..db99ddc 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -54,6 +54,10 @@ RELEASE 0.XX - XXX - Better error handling of things like raw TypeErrors in SConscripts. + - When installing using "setup.py install --prefix=", suppress the + distutils warning message about adding the (incorrect) library + directory to your search path. + From Gary Oberbrunner: - Report the target being built in error messages when building diff --git a/src/setup.py b/src/setup.py index a4cb17f..c59b240 100644 --- a/src/setup.py +++ b/src/setup.py @@ -100,6 +100,7 @@ class install(_install): self.standard_lib = 0 self.standalone_lib = 0 self.version_lib = 0 + self.warn_dir = 0 def finalize_options(self): _install.finalize_options(self) diff --git a/src/setupTests.py b/src/setupTests.py index f098cfc..e657f27 100644 --- a/src/setupTests.py +++ b/src/setupTests.py @@ -65,18 +65,16 @@ if not os.path.isfile(tar_gz): print "Cannot test package installation." test.no_result(1) -test.subdir('root') +test.subdir('root', 'prefix') root = test.workpath('root') +prefix = test.workpath('prefix') v = string.split(string.split(sys.version)[0], '.') standard_lib = '%s/usr/lib/python%s.%s/site-packages/' % (root, v[0], v[1]) standalone_lib = '%s/usr/lib/scons' % root version_lib = '%s/usr/lib/%s' % (root, scons_version) -def installed(lib): - return 'Installed SCons library modules into %s' % lib - os.system("gunzip -c %s | tar xf -" % tar_gz) # Verify that a virgin installation installs the standalone library. @@ -136,5 +134,15 @@ test.run(chdir = scons_version, stderr = None) test.fail_test(not test.installed(standard_lib)) +# Verify that we're not warning about the directory in which +# we've installed the modules when using a non-standard prefix. +test.run(chdir = scons_version, + program = python, + arguments = 'setup.py install --prefix=%s' % prefix, + stderr = None) +test.fail_test(string.find(test.stderr(), + "you'll have to change the search path yourself") + != -1) + # All done. test.pass_test() |