2013-06-18 18:36:18 -07:00
|
|
|
#!/usr/bin/env python
|
2013-07-06 23:41:19 -07:00
|
|
|
try:
|
|
|
|
from Cython.Build import cythonize
|
|
|
|
import Cython
|
|
|
|
except ImportError:
|
|
|
|
raise RuntimeError('No cython installed. Please run `pip install cython`')
|
|
|
|
|
|
|
|
if Cython.__version__ < '0.19.1':
|
|
|
|
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
|
|
|
|
|
2013-06-18 18:36:18 -07:00
|
|
|
from distutils.core import setup
|
2013-07-07 00:12:15 -07:00
|
|
|
import os
|
2013-07-06 23:41:19 -07:00
|
|
|
|
|
|
|
MAJOR = 0
|
2013-08-10 13:58:08 -07:00
|
|
|
MINOR = 2
|
2013-07-06 23:41:19 -07:00
|
|
|
MICRO = 0
|
|
|
|
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
|
|
|
|
|
|
|
|
def write_version_py(filename=None):
|
|
|
|
cnt = """\
|
|
|
|
version = '%s'
|
|
|
|
short_version = '%s'
|
|
|
|
"""
|
|
|
|
if not filename:
|
|
|
|
filename = os.path.join(
|
|
|
|
os.path.dirname(__file__), 'capnp', 'version.py')
|
|
|
|
|
|
|
|
a = open(filename, 'w')
|
|
|
|
try:
|
|
|
|
a.write(cnt % (VERSION, VERSION))
|
|
|
|
finally:
|
|
|
|
a.close()
|
|
|
|
|
2013-07-07 00:12:15 -07:00
|
|
|
write_version_py()
|
|
|
|
|
2013-06-18 18:36:18 -07:00
|
|
|
setup(
|
2013-07-06 23:41:19 -07:00
|
|
|
name="capnp",
|
|
|
|
packages=["capnp"],
|
2013-08-12 11:56:44 -07:00
|
|
|
version=VERSION,
|
2013-07-06 23:41:19 -07:00
|
|
|
package_data={'capnp': ['*.pxd']},
|
2013-08-12 11:56:44 -07:00
|
|
|
ext_modules=cythonize('capnp/*.pyx'),
|
|
|
|
# PyPi info
|
|
|
|
description="A cython wrapping of the C++ capnproto library",
|
|
|
|
author="Jason Paryani",
|
|
|
|
author_email="pypi-contact@jparyani.com",
|
|
|
|
url = 'https://github.com/jparyani/capnpc-python-cpp',
|
2013-08-12 11:58:51 -07:00
|
|
|
download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v{}.zip'.format(VERSION),
|
2013-08-12 11:56:44 -07:00
|
|
|
keywords = ['testing', 'logging', 'example'], # arbitrary keywords
|
|
|
|
classifiers = [],
|
2013-07-06 16:53:00 -07:00
|
|
|
)
|