[MacPorts] Python added

MacPorts noreply at macports.org
Mon Mar 23 13:33:33 PDT 2009


Added page "Python" by mcalhoun at macports.org from 74.67.246.24*
Page URL: <http://trac.macports.org/wiki/Python>
Content:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
[[PageOutline]]
= Python =
Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.
== Python in MacPorts ==
MacPorts allows the installation of several different versions of python.[[BR]]
Versions 2.5 and later, however, are the primary focus of work.

== Frameworks ==
Python is installed as [http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Frameworks.html Framework].[[BR]]
To maintain compatibility, however, python24 and python25 install as a hybrid Framework/Library installation (see #16334).

== Avoiding Conflicts ==
Since MacPorts supports several different version of Python, conventions are adopted to ensure that there are no conflicts.[[BR]]
Ports which use the python PortGroups (
[http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/python24-1.0.tcl python24],
[http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/python25-1.0.tcl python25],
[http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/python26-1.0.tcl python26],
and
[http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/python30-1.0.tcl python30])
are automatically installed so as to avoid conflicts.[[BR]]
Other python packages must self-enforce conventions to avoid conflicts.

=== Versions 2.4 and 2.5 ===
   * Header files are installed into ${prefix}/include/python${python.branch}.
   * Library files are installed into ${prefix}/lib/python${python.branch}.
   * Site-packages are installed into ${prefix}/lib/python${python.branch}/site-packages.

=== Versions 2.6 and Later === 
   * Header files are installed into ${frameworks_dir}/Python.framework/Versions/${python.branch}/include/python${python.branch}.
   * Library files are installed into ${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}.
   * Site-packages are installed into ${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages.

=== pkg-config Files ===
Some python packages (such as [http://cairographics.org/pycairo/ Pycairo]) install .pc files for [http://pkg-config.freedesktop.org/wiki/ pkg-config].[[BR]]
Since these files do not have the python version in their names, they can not be installed in the standard locations for pkg-config.[[BR]]
Instead they are installed into ${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/lib/pkgconfig.

In order for pkg-config to find the .pc files, the environment variable PKG_CONFIG_PATH must be set.[[BR]]
For MacPorts Portfiles, the variable configure.pkg_config_path can be used for this purpose.

== no-user-cfg Option ==
The existence of ~/pydistutils.cfg can cause problems during installation of python packages (see #9831).[[BR]]
For Python version 2.5 and later, the option --no-user-cfg has been added to allow this file to be ignored.

== 64-bit support ==
Python 2.6 and 3.0 support 64-bit universal builds (see #16349)


-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on Python. If it was not you, please
report to .


More information about the macports-changes mailing list