1
|
|
|
#!/usr/bin/env python |
2
|
|
|
# -*- coding: utf-8 -*- |
3
|
|
|
# ----------------------------------------------------------------------------- |
4
|
|
|
# Copyright (c) 2015 Yann Lanthony |
5
|
|
|
# Copyright (c) 2017-2018 Spyder Project Contributors |
6
|
|
|
# |
7
|
|
|
# Licensed under the terms of the MIT License |
8
|
|
|
# (See LICENSE.txt for details) |
9
|
|
|
# ----------------------------------------------------------------------------- |
10
|
|
|
"""Setup script for qtsass.""" |
11
|
|
|
|
12
|
|
|
# Standard library imports |
13
|
|
|
import ast |
14
|
|
|
import os |
15
|
|
|
from io import open |
16
|
|
|
|
17
|
|
|
# Third party imports |
18
|
|
|
from setuptools import find_packages, setup |
19
|
|
|
|
20
|
|
|
HERE = os.path.abspath(os.path.dirname(__file__)) |
21
|
|
|
|
22
|
|
|
|
23
|
|
|
def get_version(module='qtsass'): |
24
|
|
|
"""Get version.""" |
25
|
|
|
with open(os.path.join(HERE, module, '__init__.py'), 'r') as f: |
26
|
|
|
data = f.read() |
27
|
|
|
lines = data.split('\n') |
28
|
|
|
for line in lines: |
29
|
|
|
if line.startswith('VERSION_INFO'): |
30
|
|
|
version_tuple = ast.literal_eval(line.split('=')[-1].strip()) |
31
|
|
|
version = '.'.join(map(str, version_tuple)) |
32
|
|
|
break |
33
|
|
|
return version |
|
|
|
|
34
|
|
|
|
35
|
|
|
|
36
|
|
|
def get_description(): |
37
|
|
|
"""Get long description.""" |
38
|
|
|
with open(os.path.join(HERE, 'README.md'), 'r', encoding='utf-8') as f: |
39
|
|
|
data = f.read() |
40
|
|
|
return data |
41
|
|
|
|
42
|
|
|
|
43
|
|
|
setup( |
44
|
|
|
name='qtsass', |
45
|
|
|
version=get_version(), |
46
|
|
|
description='Compile SCSS files to valid Qt stylesheets.', |
47
|
|
|
long_description=get_description(), |
48
|
|
|
author='Yann Lanthony', |
49
|
|
|
author_email='https://github.com/yann-lty', |
50
|
|
|
maintainer='Dan Bradham', |
51
|
|
|
maintainer_email='[email protected]', |
52
|
|
|
url='https://github.com/spyder-ide/qtsass', |
53
|
|
|
license='MIT', |
54
|
|
|
packages=find_packages(), |
55
|
|
|
entry_points={ |
56
|
|
|
'console_scripts': [ |
57
|
|
|
'qtsass = qtsass.cli:main' |
58
|
|
|
] |
59
|
|
|
}, |
60
|
|
|
classifiers=( |
61
|
|
|
'Development Status :: 5 - Production/Stable', |
62
|
|
|
'Intended Audience :: Developers', |
63
|
|
|
'Natural Language :: English', |
64
|
|
|
'Operating System :: OS Independent', |
65
|
|
|
'Programming Language :: Python', |
66
|
|
|
'Programming Language :: Python :: 2', |
67
|
|
|
'Programming Language :: Python :: 3', |
68
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules', |
69
|
|
|
), |
70
|
|
|
install_requires=[ |
71
|
|
|
'libsass', |
72
|
|
|
'watchdog' |
73
|
|
|
] |
74
|
|
|
) |
75
|
|
|
|