-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
47 lines (40 loc) · 1.56 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
#!/usr/bin/env python
import re
import sys
import subprocess
import sys
from setuptools import setup, find_packages, Extension
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(*args, **kwargs):
from Cython.Build import cythonize
return cythonize(*args, **kwargs)
def version():
with open('naminggamesal/_version.py') as f:
return re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read()).group(1)
def requirements():
with open('requirements.txt') as f:
return f.readlines()
extensions = [Extension(name='naminggamesal.ngmeth_utils.csrtheo_utils',sources=['naminggamesal/ngmeth_utils/csrtheo_utils.pyx']),
Extension(name='naminggamesal.ngvoc.c2dictdict',sources=['naminggamesal/ngvoc/c2dictdict.pyx']),
]
def do_setup():
setup(name='naminggamesal',
version=version(),
packages=['naminggamesal'],#find_packages(),
install_requires=[requirements()],
setup_requires=['setuptools>=18.0','Cython'],
author='William Schueller',
author_email='william.schueller@gmail.com',
description='Using Active Learning in Naming Games',
url='https://github.com/flowersteam/naminggamesal',
license='GNU AFFERO GENERAL PUBLIC LICENSE Version 3',
#ext_modules = cythonize(['naminggamesal/ngmeth_utils/csrtheo_utils.pyx','naminggamesal/ngvoc/c2dictdict.pyx']),
ext_modules=extensions
)
try:
do_setup()
except:
extensions = cythonize(['naminggamesal/ngmeth_utils/csrtheo_utils.pyx','naminggamesal/ngvoc/c2dictdict.pyx'])
do_setup()