-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (36 loc) · 1.3 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
from setuptools import setup, find_packages, Extension
import os, shutil
from src.utils.files import find_file
with open('requirements.txt') as f:
required = f.read().splitlines()
neuralNet_build_folder = "libs/NeuralNet/build"
utils_folder = "./src/utils"
dir_path = os.path.dirname(os.path.realpath(__file__))
neuralNet_so_file = find_file(".so", utils_folder)
# Check for neural net so file otherwise compile it
if not os.path.exists(neuralNet_build_folder) or not neuralNet_so_file:
os.chdir('libs/NeuralNet')
os.system('git submodule init && git submodule update')
os.system('source ./scripts/build_without_tests.sh')
os.chdir(dir_path)
# move the .so file to utils
neuralNet_so_file = find_file(".so", neuralNet_build_folder)
shutil.move(neuralNet_so_file, utils_folder)
setup(
name='zoidberg',
version='1.0.0',
author='Antoine Azar',
author_email='antoine.azar123@gmail.com',
description='An epitech project',
packages=find_packages(),
install_requires=required,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)