from setuptools import setup
import generate

generate.run()

setup(
    name='nnpy',
    version='0.1',
    url='https://github.com/nanomsg/nnpy',
    license='MIT',
    author='Dirkjan Ochtman',
    author_email='dirkjan@ochtman.nl',
    description='cffi-based Python bindings for nanomsg',
    long_description=open('README.rst').read(),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: Implementation :: CPython',
    ],
    packages=['nnpy'],
    package_data={'nnpy': ['*.h']},
    install_requires=['cffi'],
)

@@ -25,40 +25,8 @@
 etup
-%0Aimport generate%0A%0Agenerate.run()
 %0A%0Ase
@@ -889,38 +889,76 @@
     
-package_data=%7B'nnpy': %5B'*.h'%5D%7D
+setup_requires=%5B%22cffi%3E=1.0.0%22%5D,%0A    cffi_modules=%5B%22generate.py:ffi%22%5D
 ,%0A  

Use setup_requires and cffi_modules variable for build