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