In article 
<calzqqjaqnpkcufqbzuudsttcjcubxv2py7peiafuruj5ejh...@mail.gmail.com>,
 Nat Echols <nathaniel.ech...@gmail.com> wrote:

> Hi--
> 
> We are building the Python framework and packaging it for distribution
> along with a large volume of other scripts and shared libraries.  One
> step involves running shutil.copy to move the common 'bin' directory
> to a temporary directory.  This fails when it gets to the symlinks
> generated by the 'installunixtools' option in the Mac-specific
> makefile:
> 
> "/net/clover/scratch1/builder/build_cctbx_plus/base/Python.framework/Versions/
> 2.7/lib/python2.7/shutil.py",
> line 82, in copyfile
>     with open(src, 'rb') as fsrc:
> IOError: [Errno 2] No such file or directory: 'bin/2to3-2'
> 
> Indeed, the 'bin' directory contains a number of such broken symlinks
> to non-existent files in Python.framework/Versions/2.7/bin, basically
> all of them the versioned commands.  I looked at the Makefile code and
> it is clearly linking each of these explicitly, but the framework
> build never creates them in the first place.  Are we missing a step in
> our building and installation, or is this just a bug?

Framework builds can be confusing.  Without seeing exactly what 
"configure" options and "make" commands you are using, I can only 
speculate.  But, normally, the versioned symlinks in the framework bin 
directory for things like 2to3-2 are created by the 
"install_versionedtools" target of the Mac/Makefile and that should be 
part of the dependency chain for the main Makefile "install" target when 
configured with --enable-framework.  The "-2" symlinks are new in 2.7.3 
(Issue #12627: PEP 394 support).

FWIW, here's an example of a framework build and install that uses 
non-standard locations.  You likely wouldn't need all of the options.

export INSTALL_ROOT=/path/to/root

./configure \
  --enable-universalsdk=$(xcodebuild -version -sdk macosx Path) \
  --with-universal-archs=intel 
  --enable-framework="${INSTALL_ROOT}"/Library/Frameworks \
  --with-framework-name=Pytest  \
  CC=clang \
  MACOSX_DEPLOYMENT_TARGET=10.8

make && make install

That should build and install into Applications, Library/Frameworks, and 
bin directories under ${INSTALL_ROOT}.

-- 
 Ned Deily,
 n...@acm.org

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to