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