Enhance setup.py

Use trove classifiers instead of keywords. Use 'python' (not
'python3') in the she-bang line to let distributions decide. Use
pkg_resources to load install_requires from requirements.txt. This way
there's only one place to specify dependencies. Since this and
install_requires depend on setuptools, use find_packages rather than
explictly listing Python modules. Fix URL typo.
This commit is contained in:
Sascha Peilicke 2014-02-02 14:19:43 +01:00
parent a556030931
commit 268d1d78e3

View File

@ -1,30 +1,47 @@
#!/usr/bin/env python3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from distutils.core import setup
from setuptools import find_packages, setup
import pkg_resources
import codecs
with codecs.open('LICENSE', encoding="utf-8") as f:
with codecs.open('LICENSE', encoding='utf-8') as f:
license = f.read()
with codecs.open('README.rst', encoding="utf-8") as f:
with codecs.open('README.rst', encoding='utf-8') as f:
long_description = f.read()
with open("requirements.txt", "r") as f:
install_requires = [str(req) for req in pkg_resources.parse_requirements(f)]
setup(
name='lesscpy',
version='0.9j',
description='Lesscss compiler.',
license=license,
description='Python LESS compiler',
long_description=long_description,
author='Jóhann T Maríusson',
author_email='jtm@robot.is',
keywords=["lesscss"],
url='https://github.com/robotis/lesscpy',
packages=['lesscpy',
'lesscpy/lessc',
'lesscpy/lib',
'lesscpy/plib',
'lesscpy/scripts'],
url='https://github.com/robotis/Lesscpy',
packages=find_packages(exclude=['*test*']),
scripts=['bin/lesscpy'],
install_requires=["ply"],
license=license,
long_description=long_description,
install_requires=install_requires,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Code Generators',
'Topic :: Software Development :: Pre-processors',
],
)