Opened 12 years ago

Closed 12 years ago

#34352 closed defect (fixed)

mercurial: reinplace didn't change anything in setup.py

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: deric@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: mercurial

Description

When installing mercurial with a MacPorts that has been patched as per #15514, I see:

Warning: reinplace s/-arch i386 -arch x86_64/-arch x86_64 -arch i386/ didn't change anything in /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_mercurial/mercurial/work/mercurial-2.2.1/setup.py

So that reinplace can be removed.

Examining setup.py, I see this code:

if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
    # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
    # distutils.sysconfig
    version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()
    if version:
        version = version[0]
        xcode4 = (version.startswith('Xcode') and
                  StrictVersion(version.split()[1]) >= StrictVersion('3.0'))
    else:
        # xcodebuild returns empty on OS X Lion with XCode 4.3 not
        # installed, but instead with only command-line tools. Assume
        # that only happens on >= Lion, thus no PPC support.
        xcode4 = True

    if xcode4:
        os.environ['ARCHFLAGS'] = ''

I'm not terribly familiar with how python builds, but if this is doing what it looks like—removing all -arch flags when the Xcode version is 4.0 or greater—then that's not something we want it to be doing, and we might want to patch setup.py to completely remove the above lines.

Change History (1)

comment:1 Changed 12 years ago by deric@…

Resolution: fixed
Status: newclosed

I verified that it did in fact clear the ARCH-flags, with patched setup.py I get "-arch x86_64". r92766+r92767, thanks.

Note: See TracTickets for help on using tickets.