How do I create a Python pypi package with a C library?
I would like to put the [IP2Location Python library][1] on a local Pypi / Cheeseshop server that I have running, so that I can use buildout to automatically include it in a project. 

First, I tested out the library by installing it the way that is explained in IP2Location's (terse) documentation: 1) Download the [IP2Location C library][2] and compile it 2) Run `python setup.py build && python setup.py install` in the IP2Location Python library.

I got that working, so then I tried to upload the Python library to my local pypi server by running:

    python setup.py register -r local sdist upload -r local

It uploaded a package to my local pypi server, but the package only contained the Python part of the library, not the C part. I'd like the C library to also be included and then automatically compiled when a tool like buildout downloads it from my local pypi server.

I'm pretty new to pypi. Is what I'm trying to do even possible? If so, how?

Thanks,
Scott

  [1]: http://www.ip2location.com/developers/python
  [2]: http://www.ip2location.com/developers/c

How do I create a Python pypi package with a C library?
===

I would like to put the [IP2Location Python library][1] on a local Pypi / Cheeseshop server that I have running, so that I can use buildout to automatically include it in a project. 

First, I tested out the library by installing it the way that is explained in IP2Location's (terse) documentation: 1) Download the [IP2Location C library][2] and compile it 2) Run `python setup.py build && python setup.py install` in the IP2Location Python library.

I got that working, so then I tried to upload the Python library to my local pypi server by running:

    python setup.py register -r local sdist upload -r local

It uploaded a package to my local pypi server, but the package only contained the Python part of the library, not the C part. I'd like the C library to also be included and then automatically compiled when a tool like buildout downloads it from my local pypi server.

I'm pretty new to pypi. Is what I'm trying to do even possible? If so, how?

Thanks,
Scott

  [1]: http://www.ip2location.com/developers/python
  [2]: http://www.ip2location.com/developers/c
