python / cpython

The Python programming language
https://www.python.org/
Other
59.73k stars 28.95k forks source link

distutils patch to find MacOSX dylibs #34962

Closed 50eff062-408a-4098-b1b2-8222303b9d0c closed 22 years ago

50eff062-408a-4098-b1b2-8222303b9d0c commented 22 years ago
BPO 450862
Nosy @loewis, @akuchling, @jackjansen
Files
  • distutils.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = 'https://github.com/jackjansen' closed_at = created_at = labels = ['library'] title = 'distutils patch to find MacOSX dylibs' updated_at = user = 'https://bugs.python.org/anonymous' ``` bugs.python.org fields: ```python activity = actor = 'jackjansen' assignee = 'jackjansen' closed = True closed_date = None closer = None components = ['Distutils'] creation = creator = 'anonymous' dependencies = [] files = ['3530'] hgrepos = [] issue_num = 450862 keywords = ['patch'] message_count = 7.0 messages = ['37328', '37329', '37330', '37331', '37332', '37333', '37334'] nosy_count = 4.0 nosy_names = ['loewis', 'akuchling', 'jackjansen', 'bnoon'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue450862' versions = [] ```

    3772858d-27d8-44b0-a664-d68674859f36 commented 22 years ago

    Distutils doesn't look for MacOSX's dylib archive files. This makes the default build of 2.1.1 and 2.2 (cvs) fail to make the zlib module.

    This patch adds dylib to the library file list.

    --Bill Noon

    61337411-43fc-4a9c-b8d5-4060aede66d0 commented 22 years ago

    Logged In: YES user_id=21627

    Where is the patch?

    ce92f6bc-6fbb-45e0-8132-6181c93708d7 commented 22 years ago

    Logged In: YES user_id=298547

    Index: Lib/distutils/ccompiler.py \============================================================= \====== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ ccompiler.py,v retrieving revision 1.39 diff -r1.39 ccompiler.py 795,796c795,796 \< if lib_type not in ("static","shared"): \< raise ValueError, "'lib_type' must be \"static\ " or \"shared\"" ---

        if lib_type not in ("static","shared","dylib"):
            raise ValueError, "'lib_type' must be \\"static\\", \\"shared\\" or \\"dylib\\""

    Index: Lib/distutils/unixccompiler.py \============================================================= \====== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ unixccompiler.py,v retrieving revision 1.35 diff -r1.35 unixccompiler.py 74c74,75 \< static_lib_format = shared_lib_format = "lib%s%s" --- dylib_lib_extension = ".dylib" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" 261a263,264 dylib = os.path.join( dir, self.library_filename(lib, lib_type='dylib')) 269c272,274 \< if os.path.exists(shared): --- if os.path.exists(dylib): return dylib elif os.path.exists(shared):

    61337411-43fc-4a9c-b8d5-4060aede66d0 commented 22 years ago

    Logged In: YES user_id=21627

    Reformatted as unified diff, attached, and assigned to Jack since I feel there may be some interaction with the recent framework patch.

    ce92f6bc-6fbb-45e0-8132-6181c93708d7 commented 22 years ago

    Logged In: YES user_id=298547

    I updated with Jack's framework changes and found no problem with these distutils changes. --B

    akuchling commented 22 years ago

    Logged In: YES user_id=11375

    From a Distutils point of view, the patch looks fine.
    (

    jackjansen commented 22 years ago

    Logged In: YES user_id=45365

    Commited the patches to the CVS repository.