-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathsetup.py
68 lines (53 loc) · 1.59 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
61
62
63
64
65
66
67
68
from setuptools import setup, Command
from subprocess import call
import glob
class CoverageCommand(Command):
description = 'run test code coverage'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
call(['coverage', 'run', '-m', 'unittest', 'discover', 'tests'])
print()
call(['coverage', 'report', '-m'])
class ExamplesCommand(Command):
description = 'run examples and produce HTML reports'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import pweave
for example_file in glob.iglob('examples/**/*.md', recursive=True):
print(example_file)
pweave.weave(example_file, doctype='md2html')
with open('README.md') as f:
long_description = f.read()
setup(
name='dsntnn',
version='0.5.4',
author='Aiden Nibali',
description='PyTorch implementation of DSNT',
long_description=long_description,
long_description_content_type='text/markdown',
license='Apache Software License 2.0',
packages=['dsntnn'],
test_suite='tests',
cmdclass={
'coverage': CoverageCommand,
'examples': ExamplesCommand,
},
install_requires=[
'torch>=0.4',
],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
]
)