|
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 | +# |
| 3 | +# This source code is licensed under the MIT license found in the |
| 4 | +# LICENSE file in the root directory of this source tree. |
| 5 | + |
| 6 | +[build-system] |
| 7 | +requires = ["scikit-build-core>=0.10", "numpy>=2.0"] |
| 8 | +build-backend = "scikit_build_core.build" |
| 9 | + |
| 10 | +[project] |
| 11 | +name = "faiss-cpu" |
| 12 | +version = "1.14.0" |
| 13 | +description = "A library for efficient similarity search and clustering of dense vectors." |
| 14 | +readme = "README.md" |
| 15 | +license = "MIT" |
| 16 | +requires-python = ">=3.10" |
| 17 | +authors = [ |
| 18 | + {name = "Meta AI Research"}, |
| 19 | +] |
| 20 | +keywords = ["search", "nearest-neighbors", "clustering", "vectors", "similarity"] |
| 21 | +classifiers = [ |
| 22 | + "Development Status :: 5 - Production/Stable", |
| 23 | + "Intended Audience :: Developers", |
| 24 | + "Intended Audience :: Science/Research", |
| 25 | + "License :: OSI Approved :: MIT License", |
| 26 | + "Operating System :: MacOS :: MacOS X", |
| 27 | + "Operating System :: Microsoft :: Windows", |
| 28 | + "Operating System :: POSIX :: Linux", |
| 29 | + "Programming Language :: C++", |
| 30 | + "Programming Language :: Python :: 3", |
| 31 | + "Programming Language :: Python :: 3.10", |
| 32 | + "Programming Language :: Python :: 3.11", |
| 33 | + "Programming Language :: Python :: 3.12", |
| 34 | + "Programming Language :: Python :: 3.13", |
| 35 | + "Topic :: Scientific/Engineering :: Artificial Intelligence", |
| 36 | +] |
| 37 | +dependencies = ["numpy>=1.25", "packaging"] |
| 38 | + |
| 39 | +[project.urls] |
| 40 | +Homepage = "https://github.com/facebookresearch/faiss" |
| 41 | +Documentation = "https://github.com/facebookresearch/faiss/wiki" |
| 42 | +Repository = "https://github.com/facebookresearch/faiss" |
| 43 | +Issues = "https://github.com/facebookresearch/faiss/issues" |
| 44 | + |
| 45 | +[tool.scikit-build] |
| 46 | +cmake.build-type = "Release" |
| 47 | + |
| 48 | +# Exclude C++ headers, cmake configs, and pkgconfig from the wheel. |
| 49 | +# Only the Python package (faiss/) and bundled shared libs remain. |
| 50 | +wheel.exclude = ["include/**", "share/**", "lib/cmake/**", "lib/pkgconfig/**"] |
| 51 | + |
| 52 | +[tool.scikit-build.cmake.define] |
| 53 | +FAISS_OPT_LEVEL = "dd" |
| 54 | +FAISS_ENABLE_GPU = "OFF" |
| 55 | +FAISS_ENABLE_PYTHON = "ON" |
| 56 | +FAISS_ENABLE_MKL = "OFF" |
| 57 | +FAISS_ENABLE_C_API = "OFF" |
| 58 | +FAISS_ENABLE_EXTRAS = "OFF" |
| 59 | +FAISS_ENABLE_SVS = "OFF" |
| 60 | +BUILD_TESTING = "OFF" |
| 61 | +BUILD_SHARED_LIBS = "ON" |
| 62 | + |
| 63 | +[tool.cibuildwheel] |
| 64 | +build = "cp310-* cp311-* cp312-* cp313-*" |
| 65 | +skip = "*-win32 *-manylinux_i686 *-musllinux_*" |
| 66 | +test-requires = ["numpy>=2.0,<3.0", "pytest"] |
| 67 | +test-command = "python -m pytest {project}/tests/test_wheel_smoke.py -v" |
| 68 | + |
| 69 | +[tool.cibuildwheel.linux] |
| 70 | +before-all = "yum install -y openblas-devel swig" |
| 71 | + |
| 72 | +[tool.cibuildwheel.macos] |
| 73 | +before-all = "brew install libomp openblas swig" |
| 74 | + |
| 75 | +[tool.cibuildwheel.macos.environment] |
| 76 | +# Help CMake find brew-installed OpenBLAS and libomp on macOS |
| 77 | +CMAKE_PREFIX_PATH = "/opt/homebrew/opt/openblas;/opt/homebrew/opt/libomp;/usr/local/opt/openblas;/usr/local/opt/libomp" |
| 78 | + |
| 79 | +[tool.cibuildwheel.windows] |
| 80 | +before-all = "choco install -y openblas swig" |
| 81 | + |
| 82 | +[tool.cibuildwheel.windows.environment] |
| 83 | +# Dynamic Dispatch is not yet supported on Windows (the DD cmake block is |
| 84 | +# gated behind if(NOT WIN32)). Fall back to generic baseline, matching the |
| 85 | +# conda recipe which also builds "vanilla (no avx)" on Windows. |
| 86 | +CMAKE_ARGS = "-DFAISS_OPT_LEVEL=generic" |
0 commit comments