加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
panfei 提交于 2021-05-19 10:25 . update darglint
"""Defines the package, tests, and dependencies."""
import os
from setuptools import setup, find_packages, Command
import subprocess
def read_full_documentation(fname):
"""Get long documentation from the README.rst.
Args:
fname: The filename for the documentation.
Returns:
The documentation, as a string.
"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requirements = []
class CleanCommand(Command):
"""Cleans the project.
- Remove the dist directory.
- Remove the build directory.
"""
description = 'Clean the directory of build artifacts'
user_options = []
def initialize_options(self):
self.cwd = None
def finalize_options(self):
self.cwd = os.getcwd()
def run(self):
assert os.getcwd() == self.cwd, 'We must be in the package root.'
subprocess.run(['rm', '-rf', './dist'])
subprocess.run(['rm', '-rf', './build'])
flake8_entry_point = 'flake8.extension'
setup(
name="darglint",
version="1.8.0-1",
author="Terrence Reilly",
author_email="terrencepreilly@gmail.com",
description=("A utility for ensuring Google-style docstrings "
"stay up to date with the source code."),
license="MIT",
keywords="documentation linter development",
url="http://github.com/terrencepreilly/darglint",
packages=find_packages(exclude=('tests', 'docs')),
long_description=read_full_documentation('README.md'),
long_description_content_type="text/markdown",
entry_points={
'console_scripts': [
'darglint = darglint.driver:main',
],
flake8_entry_point: [
'DAR = darglint.flake8_entry:DarglintChecker',
],
},
install_requires=requirements,
setup_requires=requirements,
tests_require=['pytest', 'tox'] + requirements,
python_requires='>=3.6',
classifiers=[
'Intended Audience :: Developers',
'Topic :: Software Development :: Documentation',
'Topic :: Software Development :: Quality Assurance',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.6',
],
cmdclass={
'clean': CleanCommand,
},
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化