cmake

How can I create a python3 venv in cmake install?

How can I create a python3 venv in cmake install? Question: I have a medium sized project composed by many parts, mostly in C++, but testing and configuration relies on Python3 scripts. The project buildsystem is generated using CMake and installed (by CMake rules) in a "deploy" directory. I would like to create a Python …

Total answers: 1

Why don't you need to do target_link_libraries when using Eigen with pybind11

Why don't you need to do target_link_libraries when using Eigen with pybind11 Question: I was trying to compile this example.cpp from a pybind11 tutorial called pybind11_examples on GitHub #include <pybind11/pybind11.h> #include <pybind11/eigen.h> #include <Eigen/LU> #include <iostream> // —————- // regular C++ code // —————- Eigen::MatrixXd mul(const Eigen::MatrixXd &xs, double fac) { std::cout << "Double" << …

Total answers: 2

How do I make a Conan test package require the package that it is testing? Specifically if the package version is dynamic?

How do I make a Conan test package require the package that it is testing? Specifically if the package version is dynamic? Question: let’s say I have a package: from conans import ConanFile class MainLibraryPackage(ConanFile): name = ‘main’ description = ‘stub’ def set_version(self): self.version = customFunctionToGetVersion() … And I have a test package for it: …

Total answers: 1

How to link my project library to my pybind module?

How to link my project library to my pybind module? Question: I have a cpp program called my_exec. I want to create a python-binding for it. (with pybind11) In my exec I have 1 simple function : int add(int i, int j) { return i+j; } And this is my pybind .cpp file : #include …

Total answers: 1

How to fix 'UserWarning: Distutils was imported before Setuptools'?

How to fix 'UserWarning: Distutils was imported before Setuptools'? Question: When I cloned some packages including python tools, an error occured: Errors << unique_id:cmake /home/scpark/cps_ws/logs/unique_id/build.cmake.001.log CMake Warning (dev) at CMakeLists.txt:2 (project): Policy CMP0048 is not set: project() command manages VERSION variables. Run "cmake –help-policy CMP0048" for policy details. Use the cmake_policy command to set the …

Total answers: 2

CMake boost_python not found

CMake boost_python not found Question: Hi I’m having some problems with using cmake to build this example. This is what I have: ├── _build │   ├── CMakeCache.txt │   ├── CMakeFiles │   ├── cmake_install.cmake │   └── Makefile ├── CMakeLists.txt ├── hello_ext.cpp └── README.md CMakeLists.txt: cmake_minimum_required(VERSION 3.16.3) project(test) # Find python and Boost – both are required …

Total answers: 1

Occur "Could NOT find Arrow" error when using pip_pypy3 to install pyarrow

Occur "Could NOT find Arrow" error when using pip_pypy3 to install pyarrow Question: I am trying to use pypy3 to install pyarrow, but some errors occur. Basic information is blow: macOS 10.15.7 Xcode 12.3 python version 3.7.9 pypy3 version 7.3.3 pyarrow version 0.17.1 cmd is ‘pip_pypy3 install pyarrow==0.17.1’ Some key information and error content in …

Total answers: 3

Protocol "https" not supported or disabled in libcurl ubuntu python

Protocol "https" not supported or disabled in libcurl ubuntu python Question: I am trying to run a repository from github in ubuntu18. after running python3 setup.py develop –user I got the error CMake Error at libmypaint-stamp/download-libmypaint.cmake:159 (message): Each download failed! error: downloading ‘https://github.com/mypaint/libmypaint/releases/download/v1.3.0/libmypaint-1.3.0.tar.xz’ failed status_code: 1 status_string: “Unsupported protocol” log: — LOG BEGIN — Protocol …

Total answers: 3

buildroot opencv3 python package builds for the wrong target?

buildroot opencv3 python package builds for the wrong target? Question: I am using buildroot tagged 2017.11.2 (building for aarch64). I enable build of python3 library for opencv3 in the buildroot configuration: BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_OPENCV3=y BR2_PACKAGE_OPENCV3_LIB_PYTHON=y I can see during the build that cmake says: — Host: Linux 4.13.0-36-generic x86_64 — Target: Linux aarch64 — C++ Compiler: …

Total answers: 1

Opencv 3.0 – module object has no attribute 'xfeatures2d'

Opencv 3.0 – module object has no attribute 'xfeatures2d' Question: I have shifted from OpenCV 2.4.9 to 3.0 to make use of drawMatches and drawMatchesKnn function. I came to know that it does not come along with non-free algorithms like SIFT , SURF. So I installed opencv_contrib from https://github.com/Itseez/opencv_contrib by following steps cmake -DOPENCV_EXTRA_MODULES_PATH=/home/zealous/Downloads/opencv_contrib-master/modules /usr/local …

Total answers: 1