Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile python bindings from source #1769

Open
deo-abhijit opened this issue Oct 21, 2024 · 2 comments
Open

Compile python bindings from source #1769

deo-abhijit opened this issue Oct 21, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@deo-abhijit
Copy link

Context

https://eclipse-ecal.github.io/ecal/_download_archive/download_archive.html#download-archive

Currently there are already compiled python binaries available for different os and python versions. I was wondering if there is any compilation guide for custom ubunntu version with custom python version. (lets say i want to install python package for ubuntu 22.04 and python3.8)

If i can build those binaries from source, it would help me a lot.

Thank you

Proposal

No response

Tasks and updates

No response

@Peguen
Copy link
Contributor

Peguen commented Oct 22, 2024

Hi @deo-abhijit ,

thank you for reaching out. There are multiple ways, depending on which branch you want to work from, to build the wheel.

1. If you want to compile for the releases that are currently available, you can follow the guide here:
https://eclipse-ecal.github.io/ecal/development/building_ecal_from_source.html

This would be recommended, if you also want to build the whole of eCAL.

2. If you want to just build the wheel for the python version, you can configure the project instead like this:
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DHAS_HDF5=ON -DHAS_QT5=ON -DHAS_CURL=ON -DHAS_CAPNPROTO=OFF -DHAS_FTXUI=ON -DBUILD_DOCS=OFF -DBUILD_APPS=OFF -DBUILD_SAMPLES=OFF -DBUILD_TIME=OFF -DBUILD_PY_BINDING=ON -DBUILD_STANDALONE_PY_WHEEL=ON -DBUILD_CSHARP_BINDING=OFF -DBUILD_ECAL_TESTS=OFF -DECAL_INCLUDE_PY_SAMPLES=OFF -DECAL_INSTALL_SAMPLE_SOURCES=OFF -DECAL_JOIN_MULTICAST_TWICE=OFF -DECAL_NPCAP_SUPPORT=OFF -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON -DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF -DECAL_THIRDPARTY_BUILD_SPDLOG=ON -DECAL_THIRDPARTY_BUILD_TINYXML2=ON -DECAL_THIRDPARTY_BUILD_FINEFTP=ON -DECAL_THIRDPARTY_BUILD_CURL=OFF -DECAL_THIRDPARTY_BUILD_GTEST=ON -DECAL_THIRDPARTY_BUILD_HDF5=OFF -DECAL_THIRDPARTY_BUILD_RECYCLE=ON -DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON -DECAL_THIRDPARTY_BUILD_QWT=OFF -DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF -DCMAKE_BUILD_TYPE=Release -DPython_FIND_VIRTUALENV=ONLY

  • then create a python venv, activate and install:
    pip install wheel setuptools
    pip install ./doc/requirements.txt

  • then build like in the 1. approach with
    cmake --build . --target create_python_wheel --config Release

This will generate the wheel in the build folder under _deploy.

3. On master (in an alpha state), you can build using cibuildwheel:

I hope you will find this useful. Let us know, if you could build the wheel and use it successfully. If not, we can support further.

Many greetings
Peter

@deo-abhijit
Copy link
Author

Thanks for the detailed response. I would try it out and let you know!

Also if we could add this information in the readme, it might help others who are looking for the same things as me.

Thanks

@Peguen Peguen added the documentation Improvements or additions to documentation label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants