Add checking for setuptools version
This commit is contained in:
@@ -13,13 +13,13 @@ You can clone the repo like so:
|
|||||||
First you need a system-wide installation of the Capnproto C++ library >= 0.2. All you need to do is follow the official [installation docs](http://kentonv.github.io/capnproto/install.html)].
|
First you need a system-wide installation of the Capnproto C++ library >= 0.2. All you need to do is follow the official [installation docs](http://kentonv.github.io/capnproto/install.html)].
|
||||||
Also on my ubuntu 12.10 box, I had to run `sudo ldconfig` after installation to make sure the libcapnp library was picked up by the linker.
|
Also on my ubuntu 12.10 box, I had to run `sudo ldconfig` after installation to make sure the libcapnp library was picked up by the linker.
|
||||||
|
|
||||||
You also need a working version of the latest [Cython](http://cython.org/) and the latest version of setuptools. This is easily done with:
|
You also need a working version of the latest [Cython](http://cython.org/) and the latest version of setuptools. This is easily done (assuming you've already installed pip):
|
||||||
|
|
||||||
pip install -U cython setuptools
|
pip install -U cython setuptools
|
||||||
|
|
||||||
## Building and installation
|
## Building and installation
|
||||||
|
|
||||||
`cd` into the repo directory and run `python setup.py install` or `pip install .`
|
`cd` into the repo directory and run `pip install .`
|
||||||
|
|
||||||
## Documentation/Example
|
## Documentation/Example
|
||||||
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)
|
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)
|
||||||
|
|||||||
10
setup.py
10
setup.py
@@ -8,12 +8,20 @@ except ImportError:
|
|||||||
if Cython.__version__ < '0.19.1':
|
if Cython.__version__ < '0.19.1':
|
||||||
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
|
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
|
||||||
|
|
||||||
|
try:
|
||||||
|
import setuptools
|
||||||
|
except ImportError:
|
||||||
|
raise RuntimeError('No setuptools installed. Please run `pip install setuptools`')
|
||||||
|
|
||||||
|
if setuptools.__version__ < '.0.9.8':
|
||||||
|
raise RuntimeError('Old setuptools installed. Please run `pip install -U setuptools`')
|
||||||
|
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
import os
|
import os
|
||||||
|
|
||||||
MAJOR = 0
|
MAJOR = 0
|
||||||
MINOR = 2
|
MINOR = 2
|
||||||
MICRO = 7
|
MICRO = 8
|
||||||
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
|
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user