Changes between Version 4 and Version 5 of PythonFrameworkTransition


Ignore:
Timestamp:
May 25, 2008, 2:20:52 AM (17 years ago)
Author:
raimue (Rainer Müller)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PythonFrameworkTransition

    v4 v5  
    66(into ${prefix}/Library/Frameworks/Python.framework/Versions/{2.4,2.5,3.0}/)
    77
    8     * Keep it as much similar to the default Python.framework for easier maintenance
    9     * Add the following symlinks:
     8 * Move the files from the framework into the "usual" location and add the following symlinks:
    109{{{
    11 ${prefix}/lib/pythonXX -> ${prefix}/Library/Frameworks/Python.framework/Versions/XX/lib/pythonXX
    12 ${prefix}/lib/libpythonXX.dylib -> ${prefix}/Library/Frameworks/Python.framework/Versions/XX/lib/libpythonXX.dylib
    13 ${prefix}/include/pythonXX -> ${prefix}/Library/Frameworks/Python.framework/Versions/XX/include/pythonXX
    14 ${prefix}/share/doc/pythonXX -> ${prefix}/Library/Frameworks/Python.framework/Versions/XX/share/doc/pythonXX
     10${framewdir}/Python.framework/Versions/2.5/lib/python2.5 -> ${prefix}/lib/python2.5
     11
     12${framewdir}/Python.framework/Versions/2.5/lib/libpython*.dylib -> ${prefix}/lib/libpython*.dylib
     13
     14${framewdir}/Python.framework/Versions/2.5/include/python2.5 -> ${prefix}/include/python2.5
     15
     16${framewdir}/Python.framework/Versions/2.5/bin/$foo -> ${prefix}/bin/$foo
    1517}}}
     18
     19  Also see the post-destroot in the proposed [browser:branches/python-frameworks/dports/lang/python25/Portfile new python25] port for details.
     20
     21 * Make python_select aware of the new paths
     22   * Python.framework/{Headers,Resources,Python,Versions/Current}
     23   * libpython*.dylib
    1624
    1725== Further transition work ==
     
    2129the scheme from above.
    2230
    23 The py-* ports require the same transition as described for py25-* ports below.
    24 
    2531=== python25 ===
    2632In order to safely upgrade especially python25 to a framework, we need:
    2733
    28     * A new python25 port group, which has to be released with one of the next
    29       MacPorts version. Efforts on this branch have to be coordinated with a
    30       release (targeting 1.6.1 or 1.6.2).
    31 
    32     * All py25-* ports have to be removed *before* upgrading python25 itself,
    33       because we change lib/python2.5 from a directory into a symlink.
    34       Otherwise you will see errors with file_map.db.
    35 
    36     * Therefore we need some hook inside python25 to fire up on upgrading
    37       non-framework to framework. E.g. it would have to do, save a list of all
    38       installed py25-* ports before and uninstall them. After successful
    39       installation of python25, install these ports again. Because of the
    40       directory-to-symlink change, deactivate/activate does not work.
    41       This will be the main challenge.
    42 
    43     * There are two mutually exclusive ways to do the transitions.
    44       They get described here by pseudo-code. Feel free to replace by
    45       real commandos.
    46 
    47 ==== Way 1 ====
    48 
    49 {{{
    50 pre-fetch {
    51  if ( $prefix does not end with
    52       /Library/Frameworks/Python.framework/Versions/2.5)
    53  {
    54   echo "Run port selfupdate and retry"
    55   exit
    56  }
    57 
    58  if ( python25 is installed &&
    59       $prefix/Library/Frameworks/Python.framework/Versions/2.5 does not exist)
    60  {
    61   1. Save the names of all installed py25- ports
    62   2. Uninstall the list of all installed py25- ports
    63  }
    64 }
    65 post-activate {
    66  if ( previously saved list exists )
    67  {
    68   1. Install the ports from the previously saved list.
    69   2. Delete the list
    70  }
    71 }
    72 
    73 
    74 }}}
    75 
    76 ==== Way 2 ====
    77 
    78 {{{
    79 pre-fetch {
    80  mv prefix/lib/python25/site-packages
    81   $prefix/Library/Frameworks/Python.framework/Versions/2.5/lib/python25
    82  adjust paths for installed py25-* ports in file
    83   prefix/var/macports/receipts/file_map.db
    84 }
    85 }}}
    86 
     34    * No changes to the python port groups needed
    8735
    8836=== python30 ===