forked from chainer/chainerui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
48 lines (41 loc) · 1.12 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
# -*- coding: utf-8 -*-
import imp
import os
from setuptools.command.sdist import sdist
from setuptools import find_packages
from setuptools import setup
import subprocess
with open('requirements.txt') as f:
required = f.read().splitlines()
here = os.path.abspath(os.path.dirname(__file__))
__version__ = imp.load_source(
'_version', os.path.join(here, 'chainerui', '_version.py')).__version__
class chainerui_sdist(sdist):
def run(self):
subprocess.check_call('cd frontend && npm run build', shell=True)
sdist.run(self)
setup(
name='chainerui',
version=__version__,
description='ChainerUI: User Interface for Chainer',
install_requires=required,
package_data={
'chainerui': [
'templates/*',
'static/**/*'
],
},
author='',
author_email='',
url='https://github.com/chainer/chainerui',
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
"console_scripts": [
"chainerui=chainerui.app:main",
]
},
tests_require=['pytest'],
cmdclass={
'sdist': chainerui_sdist
},
)