Commit Graph

36 Commits

Author SHA1 Message Date
Serhiy Storchaka ccd047ea4b Removed unused imports. 2016-04-25 00:12:32 +03:00
Serhiy Storchaka 521e5860a5 Issue #22032: __qualname__ instead of __name__ is now always used to format
fully qualified class names of Python implemented classes.
2014-07-22 15:00:37 +03:00
Giampaolo Rodola' 4a692ce5ec Minor cosmetic enhancement to provide a more readable repr()esentation of Extension instances:
- <distutils.extension.Extension at 0x2b2088b79b00>
+ <distutils.extension.Extension('_struct') at 0x2b2088b79b00>
2014-03-27 14:14:16 +01:00
Senthil Kumaran 7c9719cf74 Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 22:32:49 +08:00
Éric Araujo bee5cef7db Always close files in distutils code and tests (#10252). 2010-11-05 23:51:56 +00:00
Tarek Ziadé 3679727939 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen. 2010-07-22 12:50:05 +00:00
Tarek Ziadé edacea30e4 Merged revisions 77704,77752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line

  taking sysconfig out of distutils
........
  r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line

  switched the call order so this call works without suffering from issue #7774
........
2010-01-29 11:41:03 +00:00
Tarek Ziadé 88e2c5d35a Merged revisions 76956 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76956 | tarek.ziade | 2009-12-21 02:22:46 +0100 (Mon, 21 Dec 2009) | 1 line

  massive import cleaning in Distutils
........
2009-12-21 01:49:00 +00:00
Tarek Ziadé 2f19bb1447 Merged revisions 74163 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line

  Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O
........
2009-07-22 08:57:28 +00:00
Tarek Ziadé 68407219b7 Merged revisions 73170 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73170 | tarek.ziade | 2009-06-03 13:12:08 +0200 (Wed, 03 Jun 2009) | 1 line

  more cleanup and test coverage for distutils.extension
........
2009-06-03 11:17:15 +00:00
Tarek Ziadé e6ed2f9ea0 Merged revisions 73166 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73166 | tarek.ziade | 2009-06-03 12:26:26 +0200 (Wed, 03 Jun 2009) | 1 line

  added some tests for distutils.extension + code cleanup
........
2009-06-03 10:31:15 +00:00
Tarek Ziadé b2e36f1df7 Merged revisions 70910 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70910 | tarek.ziade | 2009-03-31 17:27:23 -0500 (Tue, 31 Mar 2009) | 1 line

  #5583 Added optional Extensions in Distutils
........
2009-03-31 22:37:55 +00:00
Guido van Rossum 3172c5d263 Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
2007-10-16 18:12:55 +00:00
Collin Winter 5b7e9d76f3 General cleanup, raise normalization in Lib/distutils. 2007-08-30 03:52:21 +00:00
Guido van Rossum 1325790b93 Merged revisions 55795-55816 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55797 | neal.norwitz | 2007-06-07 00:00:57 -0700 (Thu, 07 Jun 2007) | 3 lines

  Get rid of some remnants of classic classes.  types.ClassType == type.
  Also get rid of almost all uses of the types module and use the builtin name.
........
  r55798 | neal.norwitz | 2007-06-07 00:12:36 -0700 (Thu, 07 Jun 2007) | 1 line

  Remove a use of types, verify commit hook works
........
  r55809 | guido.van.rossum | 2007-06-07 11:11:29 -0700 (Thu, 07 Jun 2007) | 2 lines

  Fix syntax error introduced by Neal in last checkin.
........
2007-06-07 23:15:56 +00:00
Guido van Rossum 572dbf8f13 Checkpoint. Manipulated things so that string literals are always
unicode, and a few other compensating changes, e.g. str <- unicode,
chr <- unichr, and repr() of a unicode string no longer starts
with 'u'.  Lots of unit tests are broken, but some basic things
work, in particular distutils works so the extensions can be built,
and test_builtin.py works.
2007-04-27 23:53:51 +00:00
Neal Norwitz 9d72bb452b Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans)
 * everything from stropmodule except for maketrans() which is still used
2007-04-17 08:48:32 +00:00
Anthony Baxter a024034b94 Patch 1046644 - improved distutils support for SWIG. 2004-10-14 10:02:08 +00:00
Andrew M. Kuchling 6ffdaab808 Remove the recently-added get_distutil_options(), and just
have two tuples listing the legal keywords for setup() and Extension()
2003-01-27 16:30:36 +00:00
Andrew M. Kuchling 31ddfb6942 [Part of patch #641685] Add .dylib as an extension for shared libraries 2002-11-27 13:45:26 +00:00
Andrew M. Kuchling 2db92a6ee1 Add missing import 2002-11-20 16:10:29 +00:00
Andrew M. Kuchling a6483d2e9a Remove 'created by' lines; people can use CVS for this, and the information is often out of date 2002-11-14 02:25:42 +00:00
Andrew M. Kuchling 3f1c9a916f Allow unknown keyword arguments to the Extension class, and warn about them. 2002-11-13 20:54:21 +00:00
Gustavo Niemeyer 6b016852f8 This patch fixes the following bugs:
[#413582] g++ must be called for c++ extensions
[#454030] distutils cannot link C++ code with GCC

topdir = "Lib/distutils"

* bcppcompiler.py
  (BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs
  and extra_postargs parameters. Included target_lang parameter.
  (BCPPCompiler.link): Included target_lang parameter.

* msvccompiler.py
  (MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs
  and extra_postargs parameters. Included target_lang parameter.
  (MSVCCompiler.link): Included target_lang parameter.

* ccompiler.py
  (CCompiler): New language_map and language_order attributes, used by
  CCompiler.detect_language().

  (CCompiler.detect_language): New method, will return the language of
  a given source, or list of sources. Individual source language is
  detected using the language_map dict. When mixed sources are used,
  language_order will stablish the language precedence.

  (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable,
   CCompiler.link_shared_object, CCompiler.link_shared_lib):
  Inlcuded target_lang parameter.

* cygwinccompiler.py
  (CygwinCCompiler.link): Included target_lang parameter.

* emxccompiler.py
  (EMXCCompiler.link): Included target_lang parameter.

* mwerkscompiler.py
  (MWerksCompiler.link): Included target_lang parameter.

* extension.py
  (Extension.__init__): New 'language' parameter/attribute, initialized
  to None by default. If provided will overlap the automatic detection
  made by CCompiler.detect_language(), in build_ext command.

* sysconfig.py
  (customize_compiler): Check Makefile for CXX option, and also the
  environment variable CXX. Use the resulting value in the 'compiler_cxx'
  parameter of compiler.set_executables().

* unixccompiler.py
  (UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting
  to 'cc'.
  (UnixCCompiler.create_static_lib): Included target_lang parameter.
  (UnixCCompiler.link): Included target_lang parameter, and made
  linker command use compiler_cxx, if target_lang is 'c++'.

* command/build_ext.py
  (build_ext.build_extension): Pass new ext.language attribute
  to compiler.link_shared_object()'s target_lang parameter. If
  ext.language is not provided, detect language using
  compiler.detect_language(sources) instead.

* command/config.py
  (config._link): Pass already available lang parameter as target_lang
  parameter of compiler.link_executable().
2002-11-05 16:12:02 +00:00
Jeremy Hylton 09e532bcec Add a new definition to Extension objects: depends.
depends is a list of files that the target depends, but aren't direct
sources of the target.  think .h files.
2002-06-12 20:08:56 +00:00
Andrew M. Kuchling f4a4fb9a11 [Patch #536769] Add -Xcompiler flag for adding arguments and switches for
the compiler
2002-03-29 18:00:19 +00:00
Andrew M. Kuchling 3d2d980f50 Suggested by Pete Shinners: treat .m and .mm files as source code.
Question for Jack Jansen: is this reasonable?

Candidate for 2.2 release branch (if Jack thinks it's OK).
2001-12-21 15:34:17 +00:00
Fred Drake b94b849d65 Whitespace normalization. 2001-12-06 20:51:35 +00:00
Andrew M. Kuchling ac20f773f3 Back out conversion to string methods; the Distutils is intended to work
with 1.5.2
2001-03-22 03:48:31 +00:00
Eric S. Raymond b3acd3e4d3 String method conversion. 2001-02-09 12:20:51 +00:00
Greg Ward 41ed12ffe9 Added 'read_setup_file()' to read old-style Setup files. Could make life
easier for people porting Makefile.pre.in-based extensions to Distutils.
Also loosened argument-checking in Extension constructor to make life
  easier for 'read_setup_file()'.
2000-09-17 00:45:18 +00:00
Greg Ward 1f6a0d4568 Rene Liebscher: ext.export_symbols is now always a list (added 'or []'). 2000-08-13 00:41:40 +00:00
Greg Ward 45b87bc96d Typo fix in docstring. 2000-08-13 00:38:58 +00:00
Greg Ward c6a18a5d65 Removed 'export_symbol_file'.
'export_symbols' can be None (not sure this is a good idea: it's inconsistent
  with every other instance attribute of Extension).
2000-08-02 00:04:13 +00:00
Greg Ward cb18557de2 Revised docstring so 'sources' isn't necessarily all C/C++ files (to
accomodate SWIG interface files, resource files, etc.).
2000-06-24 00:18:24 +00:00
Greg Ward 3ca54bc846 Provides the Extension class, a nicer way to describe C/C++ extensions than
the old (ext_name, build_info) tuple.
2000-05-31 01:05:35 +00:00