Code Monkey home page Code Monkey logo

Comments (5)

KerstinKeller avatar KerstinKeller commented on June 24, 2024 1

@DownerCase thanks for this great hint! Setuptools-protobuf seems really promising.
We have to see if it plays together with py-build-cmake, but worst case, we'll make two different packages, one with the binary extensions, and one with the _pb2 files, but let's see..

from ecal.

FlorianReimold avatar FlorianReimold commented on June 24, 2024

For windows x64 we should be PyPi ready, as Windows has the most amazing binary compatibility of all Operating systems. So there really isn't an issue with publishing .whl files containing native .dlls

For Linux we currently depend on too many system packages, I guess. The .whl files are just not self contained enough for being functional on a wide variety of Linux distros.

from ecal.

DownerCase avatar DownerCase commented on June 24, 2024

You've probably already done the investigation; but it is certainly possible to generate the pb files as part of setup.py, I've been able to do a PoC of that process. Mostly involves injecting an extra subcommand into the main build command.

You can look to Google's protobuf distutils and the newer (and pyproject compatible) setuptools-protobuf projects for inspiration (if they're not directly suitable).

from ecal.

DownerCase avatar DownerCase commented on June 24, 2024

That said I was commenting from a pure python standpoint.

Given you’re calling into a CMake build system you should be able to set up an add_custom_command to call protoc with the normal —python-out argument to generate the python bindings as part of the build.

from ecal.

KerstinKeller avatar KerstinKeller commented on June 24, 2024

The good thing is that during build, we already have protobuf available. That's challenging with setuptools-protobuf as the user has to provide a protoc (which needs to be compatible with the protobuf version that he wants to use).

from ecal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.