|
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
|
|
|
from io import open |
|
14
|
|
|
import ast |
|
15
|
|
|
import os |
|
16
|
|
|
|
|
17
|
|
|
# Third party imports |
|
18
|
|
|
from setuptools import find_packages, setup |
|
19
|
|
|
|
|
20
|
|
|
|
|
21
|
|
|
# Constants |
|
22
|
|
|
HERE = os.path.abspath(os.path.dirname(__file__)) |
|
23
|
|
|
|
|
24
|
|
|
|
|
25
|
|
|
def get_version(module='qtsass'): |
|
26
|
|
|
"""Get version.""" |
|
27
|
|
|
with open(os.path.join(HERE, module, '__init__.py'), 'r') as f: |
|
28
|
|
|
data = f.read() |
|
29
|
|
|
|
|
30
|
|
|
lines = data.split('\n') |
|
31
|
|
|
for line in lines: |
|
32
|
|
|
if line.startswith('__version__'): |
|
33
|
|
|
version = ast.literal_eval(line.split('=')[-1].strip()) |
|
34
|
|
|
break |
|
35
|
|
|
|
|
36
|
|
|
return version |
|
|
|
|
|
|
37
|
|
|
|
|
38
|
|
|
|
|
39
|
|
|
def get_description(): |
|
40
|
|
|
"""Get long description.""" |
|
41
|
|
|
with open(os.path.join(HERE, 'README.md'), 'r', encoding='utf-8') as f: |
|
42
|
|
|
data = f.read() |
|
43
|
|
|
|
|
44
|
|
|
return data |
|
45
|
|
|
|
|
46
|
|
|
|
|
47
|
|
|
setup( |
|
48
|
|
|
name='qtsass', |
|
49
|
|
|
version=get_version(), |
|
50
|
|
|
description='Compile SCSS files to valid Qt stylesheets.', |
|
51
|
|
|
long_description=get_description(), |
|
52
|
|
|
long_description_content_type='text/markdown', |
|
53
|
|
|
author='Yann Lanthony', |
|
54
|
|
|
maintainer='The Spyder Project Contributors', |
|
55
|
|
|
maintainer_email='[email protected]', |
|
56
|
|
|
url='https://github.com/spyder-ide/qtsass', |
|
57
|
|
|
license='MIT', |
|
58
|
|
|
packages=find_packages(exclude=['contrib', 'docs', 'tests*']), |
|
59
|
|
|
entry_points={ |
|
60
|
|
|
'console_scripts': [ |
|
61
|
|
|
'qtsass = qtsass.cli:main' |
|
62
|
|
|
] |
|
63
|
|
|
}, |
|
64
|
|
|
classifiers=( |
|
65
|
|
|
'Development Status :: 5 - Production/Stable', |
|
66
|
|
|
'Intended Audience :: Developers', |
|
67
|
|
|
'License :: OSI Approved :: MIT License', |
|
68
|
|
|
'Natural Language :: English', |
|
69
|
|
|
'Operating System :: OS Independent', |
|
70
|
|
|
'Programming Language :: Python', |
|
71
|
|
|
'Programming Language :: Python :: 2', |
|
72
|
|
|
'Programming Language :: Python :: 2.7', |
|
73
|
|
|
'Programming Language :: Python :: 3', |
|
74
|
|
|
'Programming Language :: Python :: 3.5', |
|
75
|
|
|
'Programming Language :: Python :: 3.6', |
|
76
|
|
|
'Programming Language :: Python :: 3.7', |
|
77
|
|
|
'Programming Language :: Python :: 3.8', |
|
78
|
|
|
'Topic :: Software Development :: Build Tools', |
|
79
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules', |
|
80
|
|
|
), |
|
81
|
|
|
install_requires=[ |
|
82
|
|
|
'libsass', |
|
83
|
|
|
], |
|
84
|
|
|
keywords='qt sass qtsass scss css qss stylesheets', |
|
85
|
|
|
) |
|
86
|
|
|
|