Home | History | Annotate | Download | only in tests

Lines Matching refs:cmd

44         cmd = support.missing_compiler_executable()
45 if cmd is not None:
46 self.skipTest('The %r command is not found' % cmd)
53 cmd = self.build_ext(dist)
54 fixup_build_ext(cmd)
55 cmd.build_lib = self.tmp_dir
56 cmd.build_temp = self.tmp_dir
63 cmd.ensure_finalized()
64 cmd.run()
100 cmd = self.build_ext(dist)
108 cmd.ensure_finalized()
117 self.assertGreater(len(cmd.library_dirs), 0)
122 cmd = self.build_ext(dist)
126 cmd.user_options]
130 cmd.user = 1
139 cmd.ensure_finalized()
143 self.assertIn(lib, cmd.library_dirs)
144 self.assertIn(lib, cmd.rpath)
145 self.assertIn(incl, cmd.include_dirs)
153 cmd = self.build_ext(dist)
154 cmd.ensure_finalized()
156 cmd.run) # should raise an error
160 cmd = self.build_ext(dist)
161 cmd.ensure_finalized()
162 cmd.run() # should pass
169 cmd = self.build_ext(dist)
170 cmd.finalize_options()
173 self.assertIn(py_include, cmd.include_dirs)
176 self.assertIn(plat_py_include, cmd.include_dirs)
178 # make sure cmd.libraries is turned into a list
180 cmd = self.build_ext(dist)
181 cmd.libraries = 'my_lib, other_lib lastlib'
182 cmd.finalize_options()
183 self.assertEqual(cmd.libraries, ['my_lib', 'other_lib', 'lastlib'])
185 # make sure cmd.library_dirs is turned into a list
187 cmd = self.build_ext(dist)
188 cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep
189 cmd.finalize_options()
190 self.assertIn('my_lib_dir', cmd.library_dirs)
191 self.assertIn('other_lib_dir', cmd.library_dirs)
195 cmd = self.build_ext(dist)
196 cmd.rpath = 'one%stwo' % os.pathsep
197 cmd.finalize_options()
198 self.assertEqual(cmd.rpath, ['one', 'two'])
200 # make sure cmd.link_objects is turned into a list
202 cmd = build_ext(dist)
203 cmd.link_objects = 'one two,three'
204 cmd.finalize_options()
205 self.assertEqual(cmd.link_objects, ['one', 'two', 'three'])
211 cmd = self.build_ext(dist)
212 cmd.define = 'one,two'
213 cmd.finalize_options()
214 self.assertEqual(cmd.define, [('one', '1'), ('two', '1')])
218 cmd = self.build_ext(dist)
219 cmd.undef = 'one,two'
220 cmd.finalize_options()
221 self.assertEqual(cmd.undef, ['one', 'two'])
224 cmd = self.build_ext(dist)
225 cmd.swig_opts = None
226 cmd.finalize_options()
227 self.assertEqual(cmd.swig_opts, [])
229 cmd = self.build_ext(dist)
230 cmd.swig_opts = '1 2'
231 cmd.finalize_options()
232 self.assertEqual(cmd.swig_opts, ['1', '2'])
236 cmd = self.build_ext(dist)
237 cmd.finalize_options()
241 cmd.check_extensions_list, 'foo')
246 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
252 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
257 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
262 cmd.check_extensions_list(exts)
275 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
278 cmd.check_extensions_list(exts)
285 cmd = self.build_ext(dist)
286 cmd.ensure_finalized()
287 self.assertEqual(cmd.get_source_files(), ['xxx'])
290 # cmd.compiler is an option and
294 cmd = self.build_ext(dist)
295 cmd.compiler = 'unix'
296 cmd.ensure_finalized()
297 cmd.run()
298 self.assertEqual(cmd.compiler, 'unix')
301 cmd = support.missing_compiler_executable()
302 if cmd is not None:
303 self.skipTest('The %r command is not found' % cmd)
310 cmd = self.build_ext(dist)
311 fixup_build_ext(cmd)
312 cmd.ensure_finalized()
313 self.assertEqual(len(cmd.get_outputs()), 1)
315 cmd.build_lib = os.path.join(self.tmp_dir, 'build')
316 cmd.build_temp = os.path.join(self.tmp_dir, 'tempt')
324 cmd.inplace = 1
325 cmd.run()
326 so_file = cmd.get_outputs()[0]
335 cmd.inplace = 0
336 cmd.compiler = None
337 cmd.run()
338 so_file = cmd.get_outputs()[0]
342 self.assertEqual(so_dir, cmd.build_lib)
344 # inplace = 0, cmd.package = 'bar'
345 build_py = cmd.get_finalized_command('build_py')
347 path = cmd.get_ext_fullpath('foo')
350 self.assertEqual(path, cmd.build_lib)
352 # inplace = 1, cmd.package = 'bar'
353 cmd.inplace = 1
358 path = cmd.get_ext_fullpath('foo')
373 cmd = self.build_ext(dist)
374 cmd.inplace = 1
375 cmd.distribution.package_dir = {'': 'src'}
376 cmd.distribution.packages = ['lxml', 'lxml.html']
379 path = cmd.get_ext_fullpath('lxml.etree')
383 cmd.inplace = 0
384 cmd.build_lib = os.path.join(curdir, 'tmpdir')
386 path = cmd.get_ext_fullpath('lxml.etree')
390 build_py = cmd.get_finalized_command('build_py')
392 cmd.distribution.packages = ['twisted', 'twisted.runner.portmap']
393 path = cmd.get_ext_fullpath('twisted.runner.portmap')
399 cmd.inplace = 1
400 path = cmd.get_ext_fullpath('twisted.runner.portmap')
480 cmd = self.build_ext(dist)
481 cmd.build_lib = self.tmp_dir
482 cmd.build_temp = self.tmp_dir
490 cmd.ensure_finalized()
491 cmd.run()