-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
60 lines (52 loc) · 1.97 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
# Drakkar-Software OctoBot-Channels
# Copyright (c) Drakkar-Software, All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library.
# from distutils.extension import Extension
from setuptools import dist
dist.Distribution().fetch_build_eggs(['Cython>=0.29.14'])
try:
from Cython.Distutils import build_ext
from Cython.Build import cythonize
except ImportError:
# create closure for deferred import
def cythonize(*args, **kwargs):
from Cython.Build import cythonize
return cythonize(*args, **kwargs)
def build_ext(*args, **kwargs):
from Cython.Distutils import build_ext
return build_ext(*args, **kwargs)
from setuptools import find_packages
from setuptools import setup, Extension
PACKAGES = find_packages(exclude=["tests"])
packages_list = [
"iterables_comparisons.tuple_vs_list.creation_and_iteration",
"cython_types.types_tests",
"float_vs_decimal.comparator",
"closures.closures_tests",
]
ext_modules = [
Extension(package, [f"{package.replace('.', '/')}.py"])
for package in packages_list]
setup(
name="OctoBot-Benchmarks",
version="1.0.0",
url='https://github.com/Drakkar-Software/OctoBot-Benchmarks',
license='LGPL-3.0',
author='Drakkar-Software',
author_email='[email protected]',
description='OctoBot benchmarks',
cmdclass={'build_ext': build_ext},
ext_modules=cythonize(ext_modules)
)