appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
554 stars 76 forks source link

distribute pyrobuf_{list,util}.pxd files in sys.path #141

Open wrobell opened 5 years ago

wrobell commented 5 years ago

It would be nice if pyrobuf distributed pyrobuf_{list,util}.pxd files in sys.path. This is needed in order to cimport pyrobuf_list.

It seems, as documented in Cython documentation, it can be done with package_data parameter in setup.py file.

As workaround, I have to keep the pxd files within repository of my own projects, which inconvenient to maintain.

thirtythreeforty commented 4 years ago

Possibly this is related to the following snippet from the Cython docs:

Note also that if you use setuptools instead of distutils, the default action when running python setup.py install is to create a zipped egg file which will not work with cimport for pxd files when you try to use them from a dependent package. To prevent this, include zip_safe=False in the arguments to setup().