auditwheel


Nameauditwheel JSON
Version 6.1.0 PyPI version JSON
download
home_pagehttps://github.com/pypa/auditwheel
SummaryCross-distribution Linux wheels
upload_time2024-08-11 11:13:26
maintainerNone
docs_urlNone
authorRobert T. McGibbon
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            auditwheel
==========

.. image:: https://travis-ci.org/pypa/auditwheel.svg?branch=main
    :target: https://travis-ci.org/pypa/auditwheel
.. image:: https://badge.fury.io/py/auditwheel.svg
    :target: https://pypi.org/project/auditwheel
.. image:: https://pepy.tech/badge/auditwheel/month
    :target: https://pepy.tech/project/auditwheel/month

Auditing and relabeling of `PEP 600 manylinux_x_y
<https://www.python.org/dev/peps/pep-0600/>`_, `PEP 513 manylinux1
<https://www.python.org/dev/peps/pep-0513/>`_, `PEP 571 manylinux2010
<https://www.python.org/dev/peps/pep-0571/>`_ and `PEP 599 manylinux2014
<https://www.python.org/dev/peps/pep-0599/>`_ Linux wheels.

Overview
--------

``auditwheel`` is a command line tool to facilitate the creation of Python
`wheel packages <http://pythonwheels.com/>`_ for Linux (containing pre-compiled
binary extensions) that are compatible with a wide variety of Linux distributions,
consistent with the `PEP 600 manylinux_x_y
<https://www.python.org/dev/peps/pep-0600/>`_, `PEP 513 manylinux1
<https://www.python.org/dev/peps/pep-0513/>`_, `PEP 571 manylinux2010
<https://www.python.org/dev/peps/pep-0571/>`_ and `PEP 599 manylinux2014
<https://www.python.org/dev/peps/pep-0599/>`_ platform tags.

``auditwheel show``: shows external shared libraries that the wheel depends on
(beyond the libraries included in the ``manylinux`` policies), and
checks the extension modules for the use of versioned symbols that exceed
the ``manylinux`` ABI.

``auditwheel repair``: copies these external shared libraries into the wheel itself,
and automatically modifies the appropriate ``RPATH`` entries such that these libraries
will be picked up at runtime. This accomplishes a similar result as if the libraries had
been statically linked without requiring changes to the build system. Packagers are
advised that bundling, like static linking, may implicate copyright concerns.

Requirements
------------
- OS: Linux
- Python: 3.8+
- `patchelf <https://github.com/NixOS/patchelf>`_: 0.14+

Only systems that use `ELF
<https://en.wikipedia.org/wiki/Executable_and_Linkable_Format>`_-based linkage
are supported (this should be essentially every Linux).

In general, building ``manylinux1`` wheels requires running on a CentOS5
machine, building ``manylinux2010`` wheels requires running on a CentOS6
machine, and building ``manylinux2014`` wheels requires running on a CentOS7
machine, so we recommend using the pre-built manylinux `Docker images
<https://quay.io/repository/pypa/manylinux1_x86_64>`_, e.g. ::

  $ docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /bin/bash

Installation
------------

``auditwheel`` can be installed using pip:

.. code:: bash

  $ pip3 install auditwheel

Examples
--------

Inspecting a wheel: ::

    $ auditwheel show cffi-1.5.0-cp35-cp35m-linux_x86_64.whl

    cffi-1.5.0-cp35-cp35m-linux_x86_64.whl is consistent with the
    following platform tag: "linux_x86_64".

    The wheel references the following external versioned symbols in
    system-provided shared libraries: GLIBC_2.3.

    The following external shared libraries are required by the wheel:
    {
        "libc.so.6": "/lib64/libc-2.5.so",
        "libffi.so.5": "/usr/lib64/libffi.so.5.0.6",
        "libpthread.so.0": "/lib64/libpthread-2.5.so"
    }

    In order to achieve the tag platform tag "manylinux1_x86_64" the
    following shared library dependencies will need to be eliminated:

    libffi.so.5

Repairing a wheel. ::

    $ auditwheel repair cffi-1.5.2-cp35-cp35m-linux_x86_64.whl
    Repairing cffi-1.5.2-cp35-cp35m-linux_x86_64.whl
    Grafting: /usr/lib64/libffi.so.5.0.6
    Setting RPATH: _cffi_backend.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/.libs_cffi_backend"
    Previous filename tags: linux_x86_64
    New filename tags: manylinux1_x86_64
    Previous WHEEL info tags: cp35-cp35m-linux_x86_64
    New WHEEL info tags: cp35-cp35m-manylinux1_x86_64

    Fixed-up wheel written to /wheelhouse/cffi-1.5.2-cp35-cp35m-manylinux1_x86_64.whl


Limitations
-----------

1. ``auditwheel`` uses the `DT_NEEDED <https://en.wikipedia.org/wiki/Direct_binding>`_
   information (like ``ldd``) from the Python extension modules to determine
   which system libraries they depend on. Code that dynamically
   loads libraries at runtime using ``ctypes`` / ``cffi`` (from Python) or
   ``dlopen`` (from C/C++) doesn't contain this information in a way that can
   be statically determined, so dependencies that are loaded via those
   mechanisms will be missed.
2. There's nothing we can do about "fixing" binaries if they were compiled and
   linked against a too-recent version of ``libc`` or ``libstdc++``. These
   libraries (and some others) use symbol versioning for backward
   compatibility. In general, this means that code that was compiled against an
   old version of ``glibc`` will run fine on systems with a newer version of
   ``glibc``, but code what was compiled on a new system won't / might not run
   on older system.

   So, to compile widely-compatible binaries, you're best off doing the build
   on an old Linux distribution, such as a manylinux Docker image.

Testing
-------

The tests can be run with ``nox``, which will automatically install
test dependencies.

Some of the integration tests also require a running and accessible Docker
daemon. These tests will pull a number of docker images if they are not already
available on your system, but it won't update existing images.
To update these images manually, run::

    docker pull python:3.8-slim
    docker pull quay.io/pypa/manylinux1_x86_64
    docker pull quay.io/pypa/manylinux2010_x86_64
    docker pull quay.io/pypa/manylinux2014_x86_64
    docker pull quay.io/pypa/manylinux_2_28_x86_64

You may also remove these images using ``docker rmi``.

Code of Conduct
---------------

Everyone interacting in the ``auditwheel`` project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the
`PSF Code of Conduct`_.

.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pypa/auditwheel",
    "name": "auditwheel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Robert T. McGibbon",
    "author_email": "rmcgibbo@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/12/af339761d80296e76033669e4179883108d8a7d79bb032bd58427a2b4485/auditwheel-6.1.0.tar.gz",
    "platform": null,
    "description": "auditwheel\n==========\n\n.. image:: https://travis-ci.org/pypa/auditwheel.svg?branch=main\n    :target: https://travis-ci.org/pypa/auditwheel\n.. image:: https://badge.fury.io/py/auditwheel.svg\n    :target: https://pypi.org/project/auditwheel\n.. image:: https://pepy.tech/badge/auditwheel/month\n    :target: https://pepy.tech/project/auditwheel/month\n\nAuditing and relabeling of `PEP 600 manylinux_x_y\n<https://www.python.org/dev/peps/pep-0600/>`_, `PEP 513 manylinux1\n<https://www.python.org/dev/peps/pep-0513/>`_, `PEP 571 manylinux2010\n<https://www.python.org/dev/peps/pep-0571/>`_ and `PEP 599 manylinux2014\n<https://www.python.org/dev/peps/pep-0599/>`_ Linux wheels.\n\nOverview\n--------\n\n``auditwheel`` is a command line tool to facilitate the creation of Python\n`wheel packages <http://pythonwheels.com/>`_ for Linux (containing pre-compiled\nbinary extensions) that are compatible with a wide variety of Linux distributions,\nconsistent with the `PEP 600 manylinux_x_y\n<https://www.python.org/dev/peps/pep-0600/>`_, `PEP 513 manylinux1\n<https://www.python.org/dev/peps/pep-0513/>`_, `PEP 571 manylinux2010\n<https://www.python.org/dev/peps/pep-0571/>`_ and `PEP 599 manylinux2014\n<https://www.python.org/dev/peps/pep-0599/>`_ platform tags.\n\n``auditwheel show``: shows external shared libraries that the wheel depends on\n(beyond the libraries included in the ``manylinux`` policies), and\nchecks the extension modules for the use of versioned symbols that exceed\nthe ``manylinux`` ABI.\n\n``auditwheel repair``: copies these external shared libraries into the wheel itself,\nand automatically modifies the appropriate ``RPATH`` entries such that these libraries\nwill be picked up at runtime. This accomplishes a similar result as if the libraries had\nbeen statically linked without requiring changes to the build system. Packagers are\nadvised that bundling, like static linking, may implicate copyright concerns.\n\nRequirements\n------------\n- OS: Linux\n- Python: 3.8+\n- `patchelf <https://github.com/NixOS/patchelf>`_: 0.14+\n\nOnly systems that use `ELF\n<https://en.wikipedia.org/wiki/Executable_and_Linkable_Format>`_-based linkage\nare supported (this should be essentially every Linux).\n\nIn general, building ``manylinux1`` wheels requires running on a CentOS5\nmachine, building ``manylinux2010`` wheels requires running on a CentOS6\nmachine, and building ``manylinux2014`` wheels requires running on a CentOS7\nmachine, so we recommend using the pre-built manylinux `Docker images\n<https://quay.io/repository/pypa/manylinux1_x86_64>`_, e.g. ::\n\n  $ docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /bin/bash\n\nInstallation\n------------\n\n``auditwheel`` can be installed using pip:\n\n.. code:: bash\n\n  $ pip3 install auditwheel\n\nExamples\n--------\n\nInspecting a wheel: ::\n\n    $ auditwheel show cffi-1.5.0-cp35-cp35m-linux_x86_64.whl\n\n    cffi-1.5.0-cp35-cp35m-linux_x86_64.whl is consistent with the\n    following platform tag: \"linux_x86_64\".\n\n    The wheel references the following external versioned symbols in\n    system-provided shared libraries: GLIBC_2.3.\n\n    The following external shared libraries are required by the wheel:\n    {\n        \"libc.so.6\": \"/lib64/libc-2.5.so\",\n        \"libffi.so.5\": \"/usr/lib64/libffi.so.5.0.6\",\n        \"libpthread.so.0\": \"/lib64/libpthread-2.5.so\"\n    }\n\n    In order to achieve the tag platform tag \"manylinux1_x86_64\" the\n    following shared library dependencies will need to be eliminated:\n\n    libffi.so.5\n\nRepairing a wheel. ::\n\n    $ auditwheel repair cffi-1.5.2-cp35-cp35m-linux_x86_64.whl\n    Repairing cffi-1.5.2-cp35-cp35m-linux_x86_64.whl\n    Grafting: /usr/lib64/libffi.so.5.0.6\n    Setting RPATH: _cffi_backend.cpython-35m-x86_64-linux-gnu.so to \"$ORIGIN/.libs_cffi_backend\"\n    Previous filename tags: linux_x86_64\n    New filename tags: manylinux1_x86_64\n    Previous WHEEL info tags: cp35-cp35m-linux_x86_64\n    New WHEEL info tags: cp35-cp35m-manylinux1_x86_64\n\n    Fixed-up wheel written to /wheelhouse/cffi-1.5.2-cp35-cp35m-manylinux1_x86_64.whl\n\n\nLimitations\n-----------\n\n1. ``auditwheel`` uses the `DT_NEEDED <https://en.wikipedia.org/wiki/Direct_binding>`_\n   information (like ``ldd``) from the Python extension modules to determine\n   which system libraries they depend on. Code that dynamically\n   loads libraries at runtime using ``ctypes`` / ``cffi`` (from Python) or\n   ``dlopen`` (from C/C++) doesn't contain this information in a way that can\n   be statically determined, so dependencies that are loaded via those\n   mechanisms will be missed.\n2. There's nothing we can do about \"fixing\" binaries if they were compiled and\n   linked against a too-recent version of ``libc`` or ``libstdc++``. These\n   libraries (and some others) use symbol versioning for backward\n   compatibility. In general, this means that code that was compiled against an\n   old version of ``glibc`` will run fine on systems with a newer version of\n   ``glibc``, but code what was compiled on a new system won't / might not run\n   on older system.\n\n   So, to compile widely-compatible binaries, you're best off doing the build\n   on an old Linux distribution, such as a manylinux Docker image.\n\nTesting\n-------\n\nThe tests can be run with ``nox``, which will automatically install\ntest dependencies.\n\nSome of the integration tests also require a running and accessible Docker\ndaemon. These tests will pull a number of docker images if they are not already\navailable on your system, but it won't update existing images.\nTo update these images manually, run::\n\n    docker pull python:3.8-slim\n    docker pull quay.io/pypa/manylinux1_x86_64\n    docker pull quay.io/pypa/manylinux2010_x86_64\n    docker pull quay.io/pypa/manylinux2014_x86_64\n    docker pull quay.io/pypa/manylinux_2_28_x86_64\n\nYou may also remove these images using ``docker rmi``.\n\nCode of Conduct\n---------------\n\nEveryone interacting in the ``auditwheel`` project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PSF Code of Conduct`_.\n\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cross-distribution Linux wheels",
    "version": "6.1.0",
    "project_urls": {
        "Homepage": "https://github.com/pypa/auditwheel"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "218714ef114af3495dd4d367c811b37c13b33bd1dfca410d14b0dfbcdef60c9b",
                "md5": "e28b7c0fce7b19c3ab96b3d0272901e0",
                "sha256": "e52f734861859e3743eb29fcac7da9c4921a1e4bea58f954b52f2926f8e9e364"
            },
            "downloads": -1,
            "filename": "auditwheel-6.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e28b7c0fce7b19c3ab96b3d0272901e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 44057,
            "upload_time": "2024-08-11T11:13:19",
            "upload_time_iso_8601": "2024-08-11T11:13:19.168945Z",
            "url": "https://files.pythonhosted.org/packages/21/87/14ef114af3495dd4d367c811b37c13b33bd1dfca410d14b0dfbcdef60c9b/auditwheel-6.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce12af339761d80296e76033669e4179883108d8a7d79bb032bd58427a2b4485",
                "md5": "a0bac8c38a99c4354d6ce6b7283513c6",
                "sha256": "3bdc686e774cf9e355e924b0fe5a562d55caa385d72234ffe7b81b378dba360f"
            },
            "downloads": -1,
            "filename": "auditwheel-6.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a0bac8c38a99c4354d6ce6b7283513c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 556250,
            "upload_time": "2024-08-11T11:13:26",
            "upload_time_iso_8601": "2024-08-11T11:13:26.422891Z",
            "url": "https://files.pythonhosted.org/packages/ce/12/af339761d80296e76033669e4179883108d8a7d79bb032bd58427a2b4485/auditwheel-6.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-11 11:13:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pypa",
    "github_project": "auditwheel",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "lcname": "auditwheel"
}
        
Elapsed time: 0.33100s