Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
include LICENSE
include README.md
include setup.py
include pyproject.toml
include CMakeLists.txt

recursive-include cmake *
recursive-include licensing *
recursive-include src *
recursive-include tools/ovc *
recursive-include tools/benchmark_tool *
recursive-include thirdparty *
recursive-include docs/dev/pypi_publish *.md

prune .git
prune .github
prune build
prune build_*
prune build_python*
prune build_ut
prune temp
prune __pycache__

global-exclude *.pyc
global-exclude *.pyo
global-exclude *.so
global-exclude *.pyd
global-exclude *.dll
global-exclude *.dylib
global-exclude *.a
global-exclude *.lib
global-exclude *.o
global-exclude *.obj
global-exclude .git
global-exclude .gitattributes
global-exclude .gitignore
global-exclude .gitmodules
global-exclude .github
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,29 @@ Troubleshooting Guide for OpenVINO™ Installation & Configuration

The ``openvino-dev`` metapackage has been discontinued. Use the ``openvino`` package and enable optional framework integrations with extras such as ``openvino[tensorflow2]`` or ``openvino[onnx]``.

.. dropdown:: ``pip install --no-binary openvino openvino`` fails

.. note::

Source distribution (sdist) installation is experimental. For most users, the
recommended path is ``pip install openvino`` (prebuilt wheel).

Installation from source distribution requires local build tools and Python build dependencies.
Before retrying installation, update your packaging tools:

.. code-block:: sh

python -m pip install --upgrade pip setuptools wheel cmake

Then run:

.. code-block:: sh

python -m pip install --no-binary openvino openvino

If the issue persists, verify your compiler toolchain and system dependencies using
:doc:`System Requirements <../../../about-openvino/release-notes-openvino/system-requirements>`.

.. dropdown:: ImportError: cannot import name 'Core' from 'openvino'

This error may appear on systems lacking C++ components. Since it is almost exclusively a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ Use the following command to install either the base or GenAI OpenVINO package:

python -m pip install openvino

If you want to install from source distribution (sdist), use the following command:

.. code-block:: sh

python -m pip install --no-binary openvino openvino

.. note::

Installing from source distribution is experimental (PoC) and requires a full
native build toolchain (C/C++ compiler, CMake, Python headers). It may take
significantly more time than wheel-based installation. For most users, the
prebuilt wheel installation shown above is the recommended option.

Step 5. Verify that the Package Is Installed
++++++++++++++++++++++++++++++++++++++++++++

Expand Down
11 changes: 11 additions & 0 deletions docs/dev/pypi_publish/pypi-openvino-rt.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ python -c "from openvino import Core; print(Core().available_devices)"

If installation was successful, you will see the list of available devices.

### Source distribution (sdist) PoC

For packaging validation purposes, the project may publish an sdist artifact alongside wheels.
This is a proof-of-concept path to enable source-based installation workflows:

```sh
pip install --no-binary openvino openvino
```

Wheel packages remain the primary and fully validated distribution format.

## What's in the Package

<table>
Expand Down
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -50,6 +49,9 @@
OPENVINO_SOURCE_DIR = os.getenv("OPENVINO_SOURCE_DIR", SCRIPT_DIR)
OPENVINO_BINARY_DIR = os.getenv("OPENVINO_BINARY_DIR", f'{OPENVINO_SOURCE_DIR}/build_wheel')
OPENVINO_PYTHON_BINARY_DIR = os.getenv("OPENVINO_PYTHON_BINARY_DIR", "python_build")
# Detect sdist context: either we are running `setup.py sdist` to create the archive,
# or we are building from an unpacked sdist (PKG-INFO is generated by sdist)
SDIST_BUILD = "sdist" in sys.argv or (SCRIPT_DIR / "PKG-INFO").is_file()
CONFIG = os.getenv("BUILD_TYPE", "Release")
OV_RUNTIME_LIBS_DIR = os.getenv("OV_RUNTIME_LIBS_DIR", f"runtime/{LIBS_DIR}/{ARCH}")
TBB_LIBS_DIR = os.getenv("TBB_LIBS_DIR", f"runtime/3rdparty/tbb/{LIBS_DIR}")
Expand Down Expand Up @@ -762,6 +764,12 @@ def get_package_dir(install_cfg):
return py_package_path


def get_sdist_package_dir():
# Use SCRIPT_DIR (not OPENVINO_SOURCE_DIR) to ensure sdist builds are
# self-contained and not affected by env var overrides.
return str(SCRIPT_DIR / "src" / "bindings" / "python" / "src")


def find_entry_points(install_cfg):
"""Creates a list of entry points for OpenVINO runtime package."""
entry_points = {
Expand All @@ -786,10 +794,11 @@ def concat_files(input_files, output_file):


OPENVINO_VERSION = WHEEL_VERSION = os.getenv("WHEEL_VERSION", "0.0.0")
PACKAGE_DIR = get_package_dir(PY_INSTALL_CFG)
# need to create package dir, because since https://github.com/pypa/wheel/commit/e43f2fcb296c2ac63e8bac2549ab596ab79accd0
# egg_info command works in this folder, because it's being created automatically
os.makedirs(PACKAGE_DIR, exist_ok=True)
PACKAGE_DIR = get_sdist_package_dir() if SDIST_BUILD else get_package_dir(PY_INSTALL_CFG)
if not SDIST_BUILD:
# need to create package dir, because since https://github.com/pypa/wheel/commit/e43f2fcb296c2ac63e8bac2549ab596ab79accd0
# egg_info command works in this folder, because it's being created automatically
os.makedirs(PACKAGE_DIR, exist_ok=True)

packages = find_namespace_packages(PACKAGE_DIR)
package_data: dict[str, list] = {}
Expand Down
Loading