Skip to main content

High-performance Python bindings for Chromium Embedded Framework (CEF)

Project description

pybindcef

High-performance Python bindings for Chromium Embedded Framework (CEF)

Build Instructions

Building libcef_dll_wrapper

  • Linux

    Download cef minimal build for your system architecture via https://cef-builds.spotifycdn.com

    mkdir -p ~/Downloads/cef_binary
    
    wget https://cef-builds.spotifycdn.com/cef_binary_146.0.9%2Bg3ca6a87%2Bchromium-146.0.7680.165_linux64_minimal.tar.bz2 -O ~/Downloads/cef_binary.tar.bz2
    
    tar -xjf ~/Downloads/cef_binary.tar.bz2 -C ~/Downloads/cef_binary --strip-components=1
    

    Now build the libcef_dll_wrapper

    mkdir ~/Downloads/cef_binary/build
    cd ~/Downloads/cef_binary/build
    
    cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON
    make -j$(nproc)
    
  • Confirm the build

    ls ~/Downloads/cef_binary/build/libcef_dll_wrapper/
    

    A file named libcef_dll_wrapper.a will be listed.

Building pybindcef extension

  • Linux

    Clone this repository.

    git clone https://github.com/Novfensec/pybindcef -b main --single-branch --depth 1
    

    Now build the extension with -DPython_EXECUTABLE="pythonexecutablewithversion"

    mkdir pybindcef/build
    cd pybindcef/build
    
    cmake .. -DPython_EXECUTABLE=/usr/bin/python
    make
    

    Now build cef_worker

    mkdir pybindcef/cef_worker/build
    cd pybindcef/cef_worker/build
    
    cmake ..
    make
    

Extracting resources

Copy all files under cef_binary/Resources to cef_binary/Release

cp -r ~/Downloads/cef_binary/Resources/* ~/Downloads/cef_binary/Release/

Tests

Linux

  1. Kivy

    • Copy pybindcef extension and cef_worker executable to pybindcef/tests/kivy/.
    • Run main.py with the python executable version suitable for the extension.
    python main.py
    
  2. PyQt

    • Copy pybindcef extension and cef_worker executable to pybindcef/tests/pyqt/.
    • Run main.py with the python executable version suitable for the extension.
    python main.py
    
  3. Tkinter

    • Copy pybindcef extension and cef_worker executable to pybindcef/tests/tkinter/.
    • Run main.py with the python executable version suitable for the extension.
    python main.py
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybindcef-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl (260.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

File details

Details for the file pybindcef-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pybindcef-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 90ea7e429e95060ab633f409037e56f1fe00543c68f40628d43e3b983620edef
MD5 e2cbf99b3d93ad4b5dd43dee6e5708cc
BLAKE2b-256 b4befe9afe5e5864ad191fc740ca62af7fd077b84aed1ff8733ba45fc60d8233

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page