-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·41 lines (34 loc) · 982 Bytes
/
Copy pathsetup.py
File metadata and controls
executable file
·41 lines (34 loc) · 982 Bytes
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
from os import path, getenv
version = '1.0.4'
release = getenv('TRAVIS_TAG', '0.1.dev10')
cmdclass = {}
cmdopts = {}
#Using Shinx documentation
try:
from sphinx.setup_command import BuildDoc
cmdclass['build_docs'] = BuildDoc
cmdopts['build_docs'] = {
'project': ('setup.py', 'IoT-UPnP'),
'version': ('setup.py', version),
'release': ('setup.py', release),
'source_dir' : ('setup.py', 'docs'),
'build_dir' : ('setup.py', 'build')
}
except ImportError:
print("You must install Sphinx for documentation generation")
#README
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'docs', 'requirements.txt')) as f:
docs_required = f.read().splitlines()
#Main setup
setup(
version=release,
cmdclass=cmdclass,
command_options=cmdopts,
extras_require={
'docs' : docs_required
}
)