标签:rms 注册邮箱 pts require rip system rar enc cut
setup.py
from setuptools import setup, find_packages
setup(
name='git-clone', # 包名
version='1.0.5', # 版本号
description=('Git clone by downloading zip and decompressing it'), # 简介
long_description=open('README.rst').read(), # 读取README.rst的内容, 在pypi里包主页显示
author='twfb', # 作者名
author_email='twfb@hotmail.com', # 作者邮箱
maintainer='twfb', # 维护者名
maintainer_email='twfb@hotmail.com', # 维护者邮箱
license='BSD License',
packages=find_packages(),
platforms=["all"],
include_package_data=True,
url='https://github.com/dhgdhg/git-clone/', # 包主页显示的链接
classifiers=[
'Development Status :: 4 - Beta', 'Operating System :: OS Independent',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries'
],
entry_points={ # 可在命令行中执行的命令及对应的脚本, 如果没有该需求可以不用写
'console_scripts': ['git-clone=git_clone.git_clone:execute'],
}),
# install_requires=['scrapy>=1.0.0', 'selenium>=3.9.0']) #我这里没用到, 这个是安装你的包环境要求
README.rst
https://github.com/dhgdhg/git-clone/
git_clone.py
def git_clone():
# 你写的包里面的方法
pass
def execute():
# 没有命令行命令需求的不用写该函数
'''
setup.py中指定的脚本文件
entry_points={ # 可在命令行中执行的命令及对应的脚本
'console_scripts': ['git-clone=git_clone.git_clone:execute'],
}),
这里再解释下
git-clone: 就是你在命令行中调用的命令
execute: 执行的函数名
'''
import sys
git_clone(sys.argv[1], sys.argv[2], sys.argv[3])
# sys.argv 命令中的参数
__init__.py
python from .git_clone import git_clone
README.md
requirements/requirements.txt
python setup.py sdist bdist_wheel --universal
pip install twine
twine upload dist/*
标签:rms 注册邮箱 pts require rip system rar enc cut
原文地址:https://www.cnblogs.com/edhg/p/10548388.html