The package contains the experimental C ++ extension, and the installation file generates Python files, but the extension is disabled by default, you can simply add the result of setup.py build with your script.
Note that the Python package still needs a command line tool for installation. The tool is used to create some Python for you.
Once this is available, run:
cd python python setup.py build
and copy the build/lib/google directory to your script distribution, it should be on your sys.path to import.
Alternatively, use setup.py bdist --formats=zip and add the path to the resulting zip file (located in dist/protobuf-<version>.<platform>-<architecture>.zip ) to your sys.path . Renaming should be wonderful.
Note that the package uses a namespace, and therefore the pkg_resources module pkg_resources also be available. It is used only to declare the google namespace in google/__init__.py .
Martijn pieters
source share