summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorxi <xi@18f92427-320e-0410-9341-c67f048884a3>2008-12-28 20:16:50 +0000
committerxi <xi@18f92427-320e-0410-9341-c67f048884a3>2008-12-28 20:16:50 +0000
commit4691639907112004c7242215370d8b42ffec3e5b (patch)
treecf3e23519728f94b6e04d2132a61577ef9deb0a0 /setup.py
parent398bababf57286f4366649052c75075083d2060e (diff)
downloadpyyaml-4691639907112004c7242215370d8b42ffec3e5b.tar.gz
Refactored the test suite; updated include and library paths in setup.cfg.
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@322 18f92427-320e-0410-9341-c67f048884a3
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index d963517..13fc574 100644
--- a/setup.py
+++ b/setup.py
@@ -269,6 +269,25 @@ class bdist_rpm(_bdist_rpm):
return spec_file
+class test(Command):
+
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ build_cmd = self.get_finalized_command('build')
+ build_cmd.run()
+ sys.path.insert(0, build_cmd.build_lib)
+ sys.path.insert(0, 'tests')
+ import test_all
+ test_all.main([])
+
+
if __name__ == '__main__':
setup(
@@ -296,6 +315,7 @@ if __name__ == '__main__':
cmdclass={
'build_ext': build_ext,
'bdist_rpm': bdist_rpm,
+ 'test': test,
},
)