/
lyapdy
/
skillbox_controllers
Обзор
Документация
Войти
/
lyapdy
/
skillbox_controllers
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
vectorAlgebra/setup.py
35 строк
874 B
lyapdy
task10
15 дек 2025, 16:32
15 дек 2025, 16:32
780f797
Код
Авторство
О чём код?
from setuptools import setup from pybind11.setup_helpers import Pybind11Extension, build_ext import os # Проверяем наличие pybind11 try: import pybind11 except ImportError: print("pybind11 not found. Installing...") import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "pybind11"]) import pybind11 ext_modules = [ Pybind11Extension( "vector_algebra", ["src/main.cpp"], include_dirs=[ pybind11.get_include(), pybind11.get_include(user=True) ], language='c++', ), ] setup( name="vector_algebra", version="0.1.0", author="Your Name", description="Vector algebra module implemented in C++ with Pybind11", ext_modules=ext_modules, cmdclass={"build_ext": build_ext}, zip_safe=False, python_requires=">=3.7", )