A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-July/102255.html below:

[Python-Dev] versioned .so files for Python 3.2

[Python-Dev] versioned .so files for Python 3.2Ronald Oussoren ronaldoussoren at mac.com
Thu Jul 22 16:58:06 CEST 2010
On 22 Jul, 2010, at 15:40, Barry Warsaw wrote:
> 
> 
> Abstract
> ========
> 
> PEP 3147 [1]_ described an extension to Python's import machinery that
> improved the sharing of Python source code, by allowing more than one
> byte compilation file (.pyc) to be co-located with each source file.
> 
> This PEP defines an adjunct feature which allows the co-location of
> extension module files (.so) in a similar manner.  This optional,
> build-time feature will enable downstream distributions of Python to
> more easily provide more than one Python major version at a time.

I guess this is not an explicit goal of this PEP, but the structure is very close to supporting multiple system architectures at the same time.  I regularly develop code that needs to run on Windows, Linux and OSX and it is very convenient to do so in a shared directory tree (locally on one machine and accessed using remote mounts on the other ones). This works fine for pure python code, but I currently have to resort to tricks for extension modules.
> 
> Proposal
> ========
> 
> The configure/compilation options chosen at Python interpreter
> build-time will be encoded in the shared library file name for
> extension modules.  This "tag" will appear between the module base
> name and the operation file system extension for shared libraries.
> 
> The following information *MUST* be included in the shared library
> file name:
> 
> * The Python implementation (e.g. cpython, pypy, jython, etc.)
> * The interpreter's major and minor version numbers
> 
> These two fields are separated by a hyphen and no dots are to appear
> between the major and minor version numbers.  E.g. ``cpython-32``.
> 
> Python implementations *MAY* include additional flags in the file name
> tag as appropriate.  For example, on POSIX systems these flags will
> also contribute to the file name:
> 
> * ``--with-pydebug`` (flag: ``d``)
> * ``--with-pymalloc`` (flag: ``m``)
> * ``--with-wide-unicode`` (flag: ``u``)
> 
> By default in Python 3.2, ``configure`` enables ``--with-pymalloc`` so
> shared library file names would appear as ``foo.cpython-32m.so``.
> When the other two flags are also enabled, the file names would be
> ``foo.cpython-32dmu.so``.

A way to generically solve my problem is to add the platform name as well, such as "foo.cpython-32m-darwin.so" or "foo.cpython-32mu-linux2.so".

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100722/a6467bc9/attachment.bin>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4