1 Star 0 Fork 0

sighingnow/python-lens

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 3.15 KB
一键复制 编辑 原始数据 按行查看 历史
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
from distutils.cmd import Command
from setuptools import find_packages
from setuptools import setup
from setuptools_rust import RustExtension
repo_root = os.path.dirname(os.path.abspath(__file__))
class FormatAndLint(Command):
description = "format and lint code"
user_options = []
user_options = [("inplace=", "i", "Run code formatter and linter inplace")]
def initialize_options(self):
self.inplace = False
def finalize_options(self):
if self.inplace or self.inplace == "True" or self.inplace == "true":
self.inplace = True
else:
self.inplace = False
def run(self):
targets = [
"setup.py",
]
subprocess.check_call([sys.executable, "-m", "isort"] + targets, cwd=repo_root)
subprocess.check_call([sys.executable, "-m", "black"] + targets, cwd=repo_root)
subprocess.check_call([sys.executable, "-m", "flake8"] + targets, cwd=repo_root)
subprocess.check_call(["cargo", "fmt"], cwd=repo_root)
with open(
os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.md"),
mode="r",
encoding="utf-8",
) as fp:
long_description = fp.read()
setup(
name="python-lens",
author="Tao He",
author_email="sighingnow@gmail.com",
description="Lens that inspect the internals of CPython objects and the runtime.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/unsafecoerce/python-lens",
package_dir={"": "."},
packages=find_packages("."),
package_data={},
ext_modules=[],
rust_extensions=[
RustExtension("lens.python._python_lens"),
],
cmdclass={
"lint": FormatAndLint,
},
zip_safe=False,
entry_points={},
setup_requires=[
"setuptools",
"setuptools-rust",
"wheel",
],
install_requires=[],
extras_require={
"dev": [
"black",
"flake8",
"isort",
"pytest",
],
},
platform=["POSIX", "MacOS", "Windows"],
license="Apache License 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Distributed Computing",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
project_urls={
"Documentation": "https://unsafecoerce.github.io/python-lens",
"Source": "https://github.com/unsafecoerce/python-lens",
"Tracker": "https://github.com/unsafecoerce/python-lens/issues",
},
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/sighingnow/python-lens.git
git@gitee.com:sighingnow/python-lens.git
sighingnow
python-lens
python-lens
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385