Home | History | Annotate | Download | only in tests

Lines Matching refs:cmd

53     def _fixup_command(self, cmd):

67 cmd.library_dirs = ['.']
70 cmd.library_dirs = value.split(os.pathsep)
80 cmd = build_ext(dist)
81 self._fixup_command(cmd)
85 cmd.debug = sys.executable.endswith("_d.exe")
86 cmd.build_lib = self.tmp_dir
87 cmd.build_temp = self.tmp_dir
94 cmd.ensure_finalized()
95 cmd.run()
119 cmd = build_ext(dist)
127 cmd.ensure_finalized()
136 self.assertTrue(len(cmd.library_dirs) > 0)
143 cmd = build_ext(dist)
144 cmd.finalize_options()
148 self.assertTrue(py_include in cmd.include_dirs)
151 self.assertTrue(plat_py_include in cmd.include_dirs)
153 # make sure cmd.libraries is turned into a list
155 cmd = build_ext(dist)
156 cmd.libraries = 'my_lib'
157 cmd.finalize_options()
158 self.assertEqual(cmd.libraries, ['my_lib'])
160 # make sure cmd.library_dirs is turned into a list
162 cmd = build_ext(dist)
163 cmd.library_dirs = 'my_lib_dir'
164 cmd.finalize_options()
165 self.assertTrue('my_lib_dir' in cmd.library_dirs)
169 cmd = build_ext(dist)
170 cmd.rpath = os.pathsep.join(['one', 'two'])
171 cmd.finalize_options()
172 self.assertEqual(cmd.rpath, ['one', 'two'])
178 cmd = build_ext(dist)
179 cmd.define = 'one,two'
180 cmd.finalize_options()
181 self.assertEqual(cmd.define, [('one', '1'), ('two', '1')])
185 cmd = build_ext(dist)
186 cmd.undef = 'one,two'
187 cmd.finalize_options()
188 self.assertEqual(cmd.undef, ['one', 'two'])
191 cmd = build_ext(dist)
192 cmd.swig_opts = None
193 cmd.finalize_options()
194 self.assertEqual(cmd.swig_opts, [])
196 cmd = build_ext(dist)
197 cmd.swig_opts = '1 2'
198 cmd.finalize_options()
199 self.assertEqual(cmd.swig_opts, ['1', '2'])
203 cmd = build_ext(dist)
204 cmd.finalize_options()
207 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, 'foo')
212 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
218 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
223 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
228 cmd.check_extensions_list(exts)
241 self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts)
244 cmd.check_extensions_list(exts)
251 cmd = build_ext(dist)
252 cmd.ensure_finalized()
253 self.assertEqual(cmd.get_source_files(), ['xxx'])
256 # cmd.compiler is an option and
260 cmd = build_ext(dist)
261 cmd.compiler = 'unix'
262 cmd.ensure_finalized()
263 cmd.run()
264 self.assertEqual(cmd.compiler, 'unix')
273 cmd = build_ext(dist)
274 self._fixup_command(cmd)
275 cmd.ensure_finalized()
276 self.assertEqual(len(cmd.get_outputs()), 1)
279 cmd.debug = sys.executable.endswith("_d.exe")
281 cmd.build_lib = os.path.join(self.tmp_dir, 'build')
282 cmd.build_temp = os.path.join(self.tmp_dir, 'tempt')
290 cmd.inplace = 1
291 cmd.run()
292 so_file = cmd.get_outputs()[0]
300 cmd.compiler = None
301 cmd.inplace = 0
302 cmd.run()
303 so_file = cmd.get_outputs()[0]
308 self.assertEqual(so_dir, cmd.build_lib)
310 # inplace = 0, cmd.package = 'bar'
311 build_py = cmd.get_finalized_command('build_py')
313 path = cmd.get_ext_fullpath('foo')
316 self.assertEqual(path, cmd.build_lib)
318 # inplace = 1, cmd.package = 'bar'
319 cmd.inplace = 1
324 path = cmd.get_ext_fullpath('foo')
335 cmd = build_ext(dist)
336 cmd.inplace = 1
337 cmd.distribution.package_dir = {'': 'src'}
338 cmd.distribution.packages = ['lxml', 'lxml.html']
341 path = cmd.get_ext_fullpath('lxml.etree')
345 cmd.inplace = 0
346 cmd.build_lib = os.path.join(curdir, 'tmpdir')
348 path = cmd.get_ext_fullpath('lxml.etree')
352 build_py = cmd.get_finalized_command('build_py')
354 cmd.distribution.packages = ['twisted', 'twisted.runner.portmap']
355 path = cmd.get_ext_fullpath('twisted.runner.portmap')
361 cmd.inplace = 1
362 path = cmd.get_ext_fullpath('twisted.runner.portmap')
370 cmd = build_ext(dist)
371 cmd.ensure_finalized()
372 cmd.inplace = 1
373 cmd.distribution.package_dir = {'': 'src'}
374 cmd.distribution.packages = ['lxml', 'lxml.html']
378 path = cmd.get_ext_fullpath('lxml.etree')
395 cmd = setuptools_build_ext(dist)
396 cmd.ensure_finalized()
397 cmd.inplace = 1
398 cmd.distribution.package_dir = {'': 'src'}
399 cmd.distribution.packages = ['lxml', 'lxml.html']
403 path = cmd.get_ext_fullpath('lxml.etree')
413 cmd = build_ext(dist)
414 cmd.ensure_finalized()
417 ext_path = cmd.get_ext_fullpath(ext_name)
418 wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext)
425 cmd = build_ext(dist)
426 cmd.ensure_finalized()
430 ext_path = cmd.get_ext_fullpath(ext_name)
431 wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext)
475 cmd = build_ext(dist)
476 cmd.build_lib = self.tmp_dir
477 cmd.build_temp = self.tmp_dir
481 cmd.ensure_finalized()
482 cmd.run()