forked from kylekrol/lin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
475 lines (419 loc) · 22 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# Based off of https://github.com/pybind/python_example
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import os
import setuptools
import sys
__version__ = '0.0.1'
class get_pybind_include(object):
def __str__(self):
import pybind11
return pybind11.get_include()
ext_modules = [
Extension(
'lin',
['lin.cpp'],
include_dirs=[
get_pybind_include(),
'include'
],
language='c++'
),
]
def has_flag(compiler, flagname):
import tempfile
import os
with tempfile.NamedTemporaryFile('w', suffix='.cpp', delete=False) as f:
f.write('int main (int argc, char **argv) { return 0; }')
fname = f.name
try:
compiler.compile([fname], extra_postargs=[flagname])
except setuptools.distutils.errors.CompileError:
return False
finally:
try:
os.remove(fname)
except OSError:
pass
return True
def cpp_flag(compiler):
for flag in ['-std=c++14']:
if has_flag(compiler, flag):
return flag
raise RuntimeError('Unsupported compiler -- at least C++14 support is needed!')
class BuildExt(build_ext):
c_opts = {
'msvc': ['/EHsc'],
'unix': [],
}
l_opts = {
'msvc': [],
'unix': [],
}
if sys.platform == 'darwin':
darwin_opts = ['-stdlib=libc++', '-mmacosx-version-min=10.7']
c_opts['unix'] += darwin_opts
l_opts['unix'] += darwin_opts
def build_extensions(self):
ct = self.compiler.compiler_type
opts = self.c_opts.get(ct, [])
link_opts = self.l_opts.get(ct, [])
if ct == 'unix':
opts.append(cpp_flag(self.compiler))
if has_flag(self.compiler, '-fvisibility=hidden'):
opts.append('-fvisibility=hidden')
#if has_flag(self.compiler, '-Werror'):
# opts.append('-Werror')
for ext in self.extensions:
ext.define_macros = [('VERSION_INFO', '"{}"'.format(self.distribution.get_version()))]
ext.extra_compile_args = opts
ext.extra_link_args = link_opts
build_ext.build_extensions(self)
_SQR = 6
_ALL = 4
def autocode():
# Helper functions for cxx type names
def __cxx_vector(rows):
return f'lin::Vectord<{rows}>'
def __cxx_row_vector(columns):
return f'lin::RowVectord<{columns}>'
def __cxx_matrix(rows, columns):
return f'lin::Matrixd<{rows}, {columns}>'
# Helper functions for python names
def __py_vector(rows):
return f'Vector{rows}'
def __py_row_vector(columns):
return f'RowVector{columns}'
def __py_matrix(rows, columns):
return f'Matrix{rows}x{columns}'
# Helper functions to autogenerate code
def __gen_class(cxx_class, py_class):
return \
f'py::class_<{cxx_class}> {py_class}(m, "{py_class}", py::buffer_protocol());\n' + \
f'{py_class}.def(py::init<>());\n' + \
f'{py_class}.def("__init__", []({cxx_class} &self, py::array_t<double> arr) -> void ' + '{\n' + \
' py::buffer_info info = arr.request();\n' + \
' if (info.format != py::format_descriptor<double>::format()) throw std::runtime_error("Incompatible format - expected a double array!");\n' + \
' if (info.ndim == 2) {\n' + \
' if (info.shape[0] != (long) self.rows()) throw std::runtime_error("Invalid buffer shape - wrong row count!");\n' + \
' if (info.shape[1] != (long) self.cols()) throw std::runtime_error("Invalid buffer shape - wrong column count!");\n' + \
' for (lin::size_t i = 0; i < self.rows(); i++)\n' + \
' for (lin::size_t j = 0; j < self.cols(); j++)\n' + \
' self(i, j) = *((double *)(((char *) info.ptr) + i * info.strides[0] + j * info.strides[1]));\n' + \
' } else if (info.ndim == 1) {\n' + \
' if (info.shape[0] != (long) self.size()) throw std::runtime_error("Invalid buffer shape - wrong size count!");\n' + \
' for (lin::size_t i = 0; i < self.size(); i++)\n' + \
' self(i) = *((double *)(((char *) info.ptr) + i * info.strides[0]));\n' + \
' } else { throw std::runtime_error("Incompatible buffer dimensions - expected one or two dimensions!"); }\n' + \
'});\n' + \
f'{py_class}.def_static("nans", []() -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::nans<{cxx_class}>());' +' });\n' + \
f'{py_class}.def_static("ones", []() -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::ones<{cxx_class}>());' +' });\n' + \
f'{py_class}.def_static("zeros", []() -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::zeros<{cxx_class}>());' +' });\n' + \
f'{py_class}.def_buffer([]({cxx_class} &self) -> py::buffer_info ' + '{\n' + \
f' if (lin::internal::is_col_vector<{cxx_class}>())\n' + \
' return py::buffer_info{ self.data(), sizeof(double), py::format_descriptor<double>::format(), 1, {self.rows()}, {sizeof(double)} };\n' + \
' else\n' + \
' return py::buffer_info{ self.data(), sizeof(double), py::format_descriptor<double>::format(), 2, {self.rows(), self.cols()}, {self.cols() * sizeof(double), sizeof(double)} };\n' + \
'});\n' + \
f'{py_class}.def("__repr__", []({cxx_class} const &self) -> std::string ' + '{\n' + \
f' std::stringstream ss; ss << "{py_class}";\n' + \
' for (lin::size_t i = 0; i < self.rows(); i++) {\n' + \
' ss << "\\n";\n' + \
' for (lin::size_t j = 0; j < self.cols() - 1; j++)\n' + \
' ss << self(i, j) << ", ";\n' + \
' ss << self(i, self.cols() - 1);\n' + \
' }\n' + \
' return std::string(ss.str());\n' + \
'});\n' + \
f'{py_class}.def(py::pickle(\n' + \
f' []({cxx_class} const &self) -> std::array<double, {cxx_class}::Traits::max_size> * ' + '{\n' + \
f' std::array<double, {cxx_class}::Traits::max_size> *arr = new std::array<double, {cxx_class}::Traits::max_size>();\n' + \
f' memcpy(arr->data(), self.data(), {cxx_class}::Traits::max_size * sizeof(double));\n' + \
' return arr;' + \
' },\n' + \
f' [](std::array<double, {cxx_class}::Traits::max_size> const &arr) -> {cxx_class} * ' + '{\n' + \
f' {cxx_class} *other = new {cxx_class}();\n' + \
f' memcpy(other->data(), arr.data(), {cxx_class}::Traits::max_size * sizeof(double));\n' + \
' return other;' + \
'}\n' + \
'));\n' + \
f'{py_class}.def("rows", &{cxx_class}::rows);\n' + \
f'{py_class}.def("cols", &{cxx_class}::cols);\n' + \
f'{py_class}.def("size", &{cxx_class}::size);\n' + \
f'{py_class}.def("__len__", &{cxx_class}::size);\n' + \
f'{py_class}.def("__getitem__", []({cxx_class} const &self, long i) -> double ' + '{\n' +\
' if (i < 0) i = self.size() + i;\n' + \
' if (i < 0 || ((lin::size_t) i) >= self.size()) throw py::index_error("Invalid indexing - index out of bounds!");\n' +\
' return self(i);\n' + \
'});\n' + \
f'{py_class}.def("__getitem__", []({cxx_class} const &self, std::tuple<long, long> t) -> double ' + '{\n' + \
' long i = (std::get<0>(t) < 0 ? self.rows() + std::get<0>(t) : std::get<0>(t));\n' + \
' long j = (std::get<1>(t) < 0 ? self.cols() + std::get<1>(t) : std::get<1>(t));\n' + \
' if (i < 0 || ((lin::size_t) i) >= self.rows()) throw py::index_error("Invalid indexing - row index out of bounds!");\n' + \
' if (j < 0 || ((lin::size_t) j) >= self.cols()) throw py::index_error("Invalid indexing - column index out of bounds!");\n' + \
' return self(i, j);\n' + \
'});\n' + \
f'{py_class}.def("__setitem__", []({cxx_class} &self, long i, double x) -> void ' + '{\n' + \
' if (i < 0) i = self.size() + i;\n' + \
' if (i < 0 || ((lin::size_t) i) >= self.size()) throw py::index_error("Invalid indexing - index out of bounds!");\n' +\
' self(i) = x;\n' + \
'});\n' + \
f'{py_class}.def("__setitem__", []({cxx_class} &self, std::tuple<long, long> t, double x) -> void ' + '{\n' +\
' long i = (std::get<0>(t) < 0 ? self.rows() + std::get<0>(t) : std::get<0>(t));\n' + \
' long j = (std::get<1>(t) < 0 ? self.cols() + std::get<1>(t) : std::get<1>(t));\n' + \
' if (i < 0 || ((lin::size_t) i) >= self.rows()) throw py::index_error("Invalid indexing - row index out of bounds!");\n' + \
' if (j < 0 || ((lin::size_t) j) >= self.cols()) throw py::index_error("Invalid indexing - column index out of bounds!");\n' + \
' self(i, j) = x;\n' + \
'});\n' + \
f'{py_class}.def("__neg__", []({cxx_class} const &self) -> {cxx_class} * ' + '{\n' + \
f' return new {cxx_class}(-self);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__pos__", []({cxx_class} const &self) -> {cxx_class} * ' + '{\n' + \
f' return new {cxx_class}(self);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__iadd__", []({cxx_class} &self, {cxx_class} const &other) -> {cxx_class} & ' + '{\n' \
' return (self = self + other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__iadd__", []({cxx_class} &self, double other) -> {cxx_class} & ' + '{\n' \
' return (self = self + other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__add__", []({cxx_class} const &self, {cxx_class} const &other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self + other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__add__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self + other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__radd__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(other + self);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__itruediv____", []({cxx_class} &self, {cxx_class} const &other) -> {cxx_class} & ' + '{\n' \
' return (self = self / other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__itruediv____", []({cxx_class} &self, double other) -> {cxx_class} & ' + '{\n' \
' return (self = self / other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__truediv__", []({cxx_class} const &self, {cxx_class} const &other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self / other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__truediv__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self / other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__rtruediv__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(other / self);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__isub__", []({cxx_class} &self, {cxx_class} const &other) -> {cxx_class} & ' + '{\n' \
' return (self = self - other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__isub__", []({cxx_class} &self, double other) -> {cxx_class} & ' + '{\n' \
' return (self = self - other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__sub__", []({cxx_class} const &self, {cxx_class} const &other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self - other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__sub__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(self - other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__rsub__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' \
f' return new {cxx_class}(other - self);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__imul__", []({cxx_class} &self, double other) -> {cxx_class} & ' + '{\n' + \
f' return (self = other * self);' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__mul__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' + \
f' return new {cxx_class}(self * other);\n' + \
'}, py::is_operator());\n' + \
f'{py_class}.def("__rmul__", []({cxx_class} const &self, double other) -> {cxx_class} * ' + '{\n' + \
f' return new {cxx_class}(other * self);\n' + \
'}, py::is_operator());\n' + \
'\n'
def __gen_uop(cxx_class, op):
return \
f'm.def("{op}", []({cxx_class} const &c) -> decltype(lin::{op}(c).eval()) * ' + '{ ' + f'return new decltype(lin::{op}(c).eval())(lin::{op}(c));' + ' });\n'
def __gen_bop(cxx_class, op):
return \
f'm.def("{op}", []({cxx_class} const &u, {cxx_class} const &v) -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::{op}(u,v));' + ' });\n' + \
f'm.def("{op}", []({cxx_class} const &u, double v) -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::{op}(u,v));' + ' });\n' + \
f'm.def("{op}", [](double u, {cxx_class} const &v) -> {cxx_class} * ' + '{ ' + f'return new {cxx_class}(lin::{op}(u,v));' + ' });\n'
def __gen_uops(cxx_class):
return \
f'm.def("fro", []({cxx_class} const &c) -> double' + ' { return lin::fro(c); });\n' + \
__gen_uop(cxx_class, 'negate') + \
__gen_uop(cxx_class, 'sign') + \
__gen_uop(cxx_class, 'square') + \
f'm.def("sum", []({cxx_class} const &c) -> double' + ' { return lin::sum(c); });\n' + \
__gen_uop(cxx_class, 'transpose') + \
f'm.def("isfinite", []({cxx_class} const &c) -> bool' + ' { return lin::all(lin::isfinite(c)); });\n' + \
'\n'
def __gen_bops(cxx_class):
return \
__gen_bop(cxx_class, 'add') + \
__gen_bop(cxx_class, 'divide') + \
__gen_bop(cxx_class, 'multiply') + \
__gen_bop(cxx_class, 'subtract')
# Generating module source code
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'lin.cpp'), 'w') as ostream:
# Header
ostream.write(r'''
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>
namespace py = pybind11;
#include <lin/core.hpp>
#include <lin/generators.hpp>
#include <lin/math.hpp>
#include <lin/queries.hpp>
#include <array>
#include <cstring>
#include <exception>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
PYBIND11_MODULE(lin, m) {
'''
)
# Column vector types
ostream.write(r'''// -----
// Vector type definitions
//
'''
)
for i in range(2, _SQR + 1):
ostream.write(__gen_class(__cxx_vector(i), __py_vector(i)))
ostream.write(r'''// -----
'''
)
# Column vector types
ostream.write(r'''// -----
// Row vector type definitions
//
'''
)
for i in range(2, _SQR + 1):
ostream.write(__gen_class(__cxx_row_vector(i), __py_row_vector(i)))
ostream.write(r'''// -----
'''
)
# Matrix types
ostream.write(r'''// -----
// Matrix type definitions
//
'''
)
for i in range(2, _ALL + 1):
for j in range(2, _ALL + 1):
ostream.write(__gen_class(__cxx_matrix(i, j), __py_matrix(i, j)))
for i in range(_ALL + 1, _SQR + 1):
ostream.write(__gen_class(__cxx_matrix(i, i), __py_matrix(i, i)))
ostream.write(r'''// -----
'''
)
# Matrix multiplication operators
ostream.write(r'''// -----
// Matrix multiplication operators
//
'''
)
for i in range(2, _ALL + 1):
for j in range(2, _ALL + 1):
ostream.write(
f'{__py_vector(i)}.def("__mul__", []({__cxx_vector(i)} const &self, {__cxx_row_vector(j)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
for i in range(_ALL + 1, _SQR + 1):
ostream.write(
f'{__py_vector(i)}.def("__mul__", []({__cxx_vector(i)} const &self, {__cxx_row_vector(i)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
ostream.write('\n')
for i in range(2, _ALL + 1):
for j in range(2, _ALL + 1):
for k in range(1, _ALL + 1):
if k == 1:
other = __cxx_vector(j)
else:
other = __cxx_matrix(j, k)
ostream.write(
f'{__py_matrix(i, j)}.def("__mul__", []({__cxx_matrix(i, j)} const &self, {other} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
for i in range(_ALL + 1, _SQR + 1):
ostream.write(
f'{__py_matrix(i, i)}.def("__mul__", []({__cxx_matrix(i, i)} const &self, {__cxx_matrix(i, i)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
ostream.write(
f'{__py_matrix(i, i)}.def("__mul__", []({__cxx_matrix(i, i)} const &self, {__cxx_vector(i)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
ostream.write('\n')
for i in range(2, _ALL + 1):
for k in range(2, _ALL + 1):
ostream.write(
f'{__py_row_vector(i)}.def("__mul__", []({__cxx_row_vector(i)} const &self, {__cxx_matrix(i, k)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
for i in range(_ALL + 1, _SQR + 1):
ostream.write(
f'{__py_row_vector(i)}.def("__mul__", []({__cxx_row_vector(i)} const &self, {__cxx_matrix(i, i)} const &other) -> decltype((self * other).eval()) * ' +
'{ return new decltype((self * other).eval())(self * other); }, py::is_operator());\n'
)
# Operators
ostream.write(r'''// -----
// Operators
//
'''
)
for i in range(2, _SQR + 1):
ostream.write(f'm.def("dot", []({__cxx_vector(i)} const &u, {__cxx_vector(i)} const &v) -> double' + ' { return lin::dot(u, v); });\n')
ostream.write(f'm.def("dot", []({__cxx_vector(i)} const &u, {__cxx_row_vector(i)} const &v) -> double' + ' { return lin::dot(u, v); });\n')
ostream.write(f'm.def("norm", []({__cxx_vector(i)} const &u) -> double' + ' { return lin::norm(u); });\n')
ostream.write(__gen_uops(__cxx_vector(i)))
ostream.write(__gen_bops(__cxx_vector(i)))
for i in range(2, _SQR + 1):
ostream.write(f'm.def("dot", []({__cxx_row_vector(i)} const &u, {__cxx_row_vector(i)} const &v) -> double' + ' { return lin::dot(u, v); });\n')
ostream.write(f'm.def("dot", []({__cxx_row_vector(i)} const &u, {__cxx_vector(i)} const &v) -> double' + ' { return lin::dot(u, v); });\n')
ostream.write(f'm.def("norm", []({__cxx_row_vector(i)} const &c) -> double' + ' { return lin::norm(c); });\n')
ostream.write(__gen_uops(__cxx_row_vector(i)))
ostream.write(__gen_bops(__cxx_row_vector(i)))
for i in range(2, _ALL + 1):
for j in range(2, _ALL + 1):
if i == j:
ostream.write(f'm.def("trace", []({__cxx_matrix(i, j)} const &m) -> double' + ' { return lin::trace(m); });\n')
ostream.write(__gen_uops(__cxx_matrix(i, j)))
ostream.write(__gen_bops(__cxx_matrix(i, j)))
for i in range(_ALL + 1, _SQR + 1):
ostream.write(f'm.def("trace", []({__cxx_matrix(i, i)} const &m) -> double' + ' { return lin::trace(m); });\n')
ostream.write(__gen_uops(__cxx_matrix(i, i)))
ostream.write(__gen_bops(__cxx_matrix(i, i)))
if _SQR >= 3:
ostream.write(r'''
m.def("cross", [](lin::Vector3d const &u, lin::Vector3d const &v) -> lin::Vector3d { return lin::cross(u, v); });
m.def("cross", [](lin::Vector3d const &u, lin::RowVector3d const &v) -> lin::Vector3d { return lin::cross(u, v); });
m.def("cross", [](lin::RowVector3d const &u, lin::Vector3d const &v) -> lin::RowVector3d { return lin::cross(u, v); });
m.def("cross", [](lin::RowVector3d const &u, lin::RowVector3d const &v) -> lin::RowVector3d { return lin::cross(u, v); });'''
)
ostream.write(r'''
// -----
'''
)
# Footer
ostream.write(r'''}
'''
)
autocode()
setup(
name='lin',
version=__version__,
author='Kyle Krol',
author_email='[email protected]',
url='https://github.com/kkrol27/lin',
description='Simple python wrapper for lin matrix and vector types.',
long_description='',
ext_modules=ext_modules,
setup_requires=['pybind11>=2.6.0'],
install_requires=['numpy'],
cmdclass={'build_ext': BuildExt},
zip_safe=False,
)