From 5ebbf3b3d2bf019a2ac99d0b2831b76b73699287 Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Mon, 12 Aug 2013 12:39:35 -0700 Subject: [PATCH] Fix up for v0.2 release --- README.md | 4 +--- setup.cfg | 2 -- setup.py | 27 ++++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 8 deletions(-) delete mode 100644 setup.cfg diff --git a/README.md b/README.md index 8d24848..bc2866b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ You also need a working version of the latest [Cython](http://cython.org/) and t At the moment, there is no documenation, but the library is almost a 1:1 clone of the [Capnproto C++ Library](http://kentonv.github.io/capnproto/cxx.html) The examples directory has one example that shows off the capabilities quite nicely. Here it is, reproduced: + ```python import capnp addressbook = capnp.load('addressbook.capnp') @@ -84,6 +85,3 @@ def printAddressBook(fd): f = open('example', 'r') printAddressBook(f.fileno()) ``` - -## PyPy -There is also a preliminary branch that works for pypy. Unfortunately it requires some pretty terrible hacks to get working, so I've left it in it's own branch. Just do `git checkout pypy` and then install like normal with `pypy setup.py install` or `pip install .`. Don't forget to install dependencies beforehand with `pip install -U cython setuptools` diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 224a779..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py index ee23246..56b222b 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ MINOR = 2 MICRO = 0 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) + def write_version_py(filename=None): cnt = """\ version = '%s' @@ -33,6 +34,12 @@ short_version = '%s' write_version_py() +try: + import pypandoc + long_description = pypandoc.convert('README.md', 'rst') +except (IOError, ImportError): + long_description = '' + setup( name="capnp", packages=["capnp"], @@ -40,11 +47,25 @@ setup( package_data={'capnp': ['*.pxd']}, ext_modules=cythonize('capnp/*.pyx'), # PyPi info - description="A cython wrapping of the C++ capnproto library", + description='A cython wrapping of the C++ capnproto library', + long_description=long_description, author="Jason Paryani", author_email="pypi-contact@jparyani.com", url = 'https://github.com/jparyani/capnpc-python-cpp', download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v{}.zip'.format(VERSION), - keywords = ['testing', 'logging', 'example'], # arbitrary keywords - classifiers = [], + keywords = ['capnp', 'capnproto'], + classifiers = [ + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: POSIX', + 'Programming Language :: C++' + 'Programming Language :: Cython' + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + # 'Programming Language :: Python :: Implementation :: PyPy' + 'Topic :: Communications'], )