-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
35 lines (30 loc) · 1.05 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
extensions = [
Extension("smartquadtree",
["smartquadtree.pyx", "quadtree.cpp", "neighbour.cpp"],
extra_compile_args=["-std=c++11"],
language="c++")
]
def get_long_description():
import codecs
with codecs.open('tutorial.rst', encoding='utf-8') as f:
readme = f.read()
return readme
setup(name="smartquadtree",
version="1.0",
author="Xavier Olive",
author_email="[email protected]",
description="Implementation of quadtrees for moving objects",
long_description=get_long_description(),
license="MIT",
url="https://github.com/xoolive/quadtree",
ext_modules=cythonize(extensions),
)
# Producing long description
# ipython nbconvert tutorial.ipynb --to rst
# Then manually edit paths to images to point to github
# Windows compilation (mingw)
# edit smartquadtree.cpp
# add #include <cmath> at the top of the file before #include "pyconfig.h"