-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
60 lines (56 loc) · 2.25 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
from setuptools import setup
from distutils.command.build import build
import subprocess
import shutil
import os
import sys
if sys.version_info < (3, 0):
raise ValueError("Do not run the script under Python2")
src_dir = os.path.dirname(os.path.abspath(__file__))
long_description = ''
with open(os.path.join(src_dir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
class build_binding(build):
def run(self):
protoc_command = ["python3", os.path.join(src_dir, "genbinding.py")]
if subprocess.call(protoc_command) != 0:
sys.exit(-1)
shutil.copyfile('etaler_rflx.so', 'etaler/etaler_rflx.so')
shutil.copyfile('etaler_rflx_rdict.pcm', 'etaler/etaler_rflx_rdict.pcm')
build.run(self)
setup(
name = 'pyetaler',
packages = ['etaler'],
version = '0.0.6',
license='bsd-3-clause',
description = 'A high performance implementation of Numenta\'s HTM algorithms',
long_description=long_description,
long_description_content_type="text/markdown",
author = 'Martin Chang',
author_email = '[email protected]',
url = 'https://github.com/etaler/PyEtaler/tree/master',
keywords = ['HTM', 'Hierarchical Temporal Memory', 'Numenta', "AI", "SDR"
"sparse distributed representation", "bioinspired"],
install_requires=[
'cppyy>=1.7.1', # 1.7.1 and above supports throwing C++ exceptions in Python and keyword arguments
'pathlib'
],
extras_require = {
'numpy': ["numpy"] # Supports converting between et.Tensor and np.array if avaliable
},
classifiers=[
'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
'Intended Audience :: Developers', # Define that your audience are developers
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3', #Specify which pyhton versions that you want to support
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
cmdclass = {
'build': build_binding
},
package_data = {'':['*.so', '*.pcm', '*.dll']}
)