python setup.py sdist bdist_wheel
# python setup.py sdist bdist_wheel
# twine upload dist/*
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
NAME = 'xgo-pythonlib'
DESCRIPTION = 'PythonLib for XGO2-DOG'
URL = 'https://github.com/Xgorobot/XGO-PythonLib'
EMAIL = 'hello@xgorobot.com'
AUTHOR = 'luwudynamics'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '0.2.3'
# What packages are required for this module to be executed?
REQUIRED = [
# 'requests', 'maya', 'records',
]
# What packages are optional?
EXTRAS = {
# 'fancy feature': ['django'],
}
# The rest you shouldn't have to touch too much :)
# ------------------------------------------------
# Except, perhaps the License and Trove Classifiers!
# If you do change the License, remember to change the Trove Classifier for that!
here = os.path.abspath(os.path.dirname(__file__))
# Import the README and use it as the long-description.
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
try:
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = DESCRIPTION
# Load the package's __version__.py module as a dictionary.
about = {}
if not VERSION:
project_slug = NAME.lower().replace("-", "_").replace(" ", "_")
with open(os.path.join(here, project_slug, '__version__.py')) as f:
exec(f.read(), about)
else:
about['__version__'] = VERSION
class UploadCommand(Command):
"""Support setup.py upload."""
description = 'Build and publish the package.'
user_options = []
@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.status('Removing previous builds…')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass
self.status('Building Source and Wheel (universal) distribution…')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
self.status('Uploading the package to PyPI via Twine…')
os.system('twine upload dist/*')
self.status('Pushing git tags…')
os.system('git tag v{0}'.format(about['__version__']))
os.system('git push --tags')
sys.exit()
# Where the magic happens:
setup(
name=NAME,
version=about['__version__'],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
packages=find_packages(),
# If your package is a single module, use this instead of 'packages':
# py_modules=['mypackage'],
# entry_points={
# 'console_scripts': ['mycli=mymodule:cli'],
# },
install_requires=REQUIRED,
extras_require=EXTRAS,
include_package_data=True,
license='MIT',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
# $ setup.py publish support.
cmdclass={
'upload': UploadCommand,
},
)
python setup.py sdist bdist_wheel的更多相关文章
- 【mlflow】打包:npm run build + python setup.py sdist
mlflow是一个开源机器学习平台 最近需要使用一个它的最新版本,但是这个最新版本没有git包,无法通过pip install安装,需要打包安装. 打包完之后在项目的dist文件夹中有打包后的压缩包, ...
- Python setup.py和MANIFEST.in文件
Setup.py文件 from setuptools import setup from codecs import open # 第三方依赖包及版本号 requires = ['beautifuls ...
- python setup.py install 报错【Project namexxx was given, but was not able to be found.】
错误信息: [root@wangjq networking-mirror]# python setup.py install /usr/lib64/python2./distutils/dist.py ...
- Python安装mysql-python错误提示python setup.py egg_info
做python项目,需要用到mysql,一般用python-mysql,安装时遇到错误提示如下: Command "python setup.py egg_info" failed ...
- python setup.py uninstall
I have installed a python package with python setup.py install How do I uninstall it? ============== ...
- python setup.py install 报错ImportError: No module named setuptools
学习光荣之路python课程时,使用python setup.py install安装其他模块时,第一次安装某模块成功了.安装另一模块却报错ImportError: No module named s ...
- pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in
问题 Mac 下通过 pip 安装 icu 失败. 解决办法及原因 问题的原因是因为icu库中的某一行代码找不到一个文件,获取不到ICU_VERSION的值. # Install icu brew i ...
- Command "python setup.py egg_info" failed with error code 10
1:今天系统重装以后,下载了新的版本的python3.6.1.然后想通过pycurl模块测试URL,突然发现windows10下我无法通过pip安装pycurl模块了,报错内容如下 Collectin ...
- Command "python setup.py egg_info" failed with error code 1一种问题的解决方法
问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...
- Command "python setup.py egg_info" failed with error code 1 in C:\Users\w5659\AppData\Local\Temp\pip-install-t7uomu4r\xa dmin\
Error msg: C:\Users\w5659>pip install xadmin Collecting xadmin Using cached https://files.pythonh ...
随机推荐
- C++面试八股文:聊一聊指针?
某日二师兄参加XXX科技公司的C++工程师开发岗位第17面: 面试官:聊一聊指针? 二师兄:好的. 面试官:你觉得指针本质上是什么? 二师兄:这要从内存地址开始说起了.如果有一块容量是1G的内存,假设 ...
- 【对比】ChatGPT Plus与ChatGPT实操对比体验
前言 缘由 20美刀大洋充值ChatGPT Plus,必须分享让它物尽其用 应单位追求科技前沿需求,以及花钱就是香的原则.遂找了远在他乡的高中老同学,斥资20美刀为公司身先士卒怒充会员.秉承分享至上原 ...
- IcedID恶意文档钓鱼手法剖析
析 利用oletools静态分析,提取宏代码,如图: Function contents() With ActiveDocument.Content.Find loveDoor = .Execute( ...
- Kubernetes(k8s)服务账号Service Accounts
目录 一.系统环境 二.前言 三.服务账号Service Accounts简介 四.用户账号与服务账号区别 五.服务账号(Service Accounts) 5.1 创建服务账号(Service Ac ...
- 文盘Rust -- FFI 浅尝
rust FFI 是rust与其他语言互调的桥梁,通过FFI rust 可以有效继承 C 语言的历史资产.本期通过几个例子来聊聊rust与C 语言交互的具体步骤. 场景一 调用C代码 创建工程 car ...
- Unity的IGenerateNativePluginsForAssemblies:深入解析与实用案例
Unity IGenerateNativePluginsForAssemblies Unity是一款非常流行的游戏引擎,它支持多种平台,包括Windows.Mac.Linux.Android.iOS等 ...
- 【NestJS系列】核心概念:Controller控制器
前言 控制器主要是用来处理客户端传入的请求并向客户端返回响应. 它一般是用来做路由导航的,内部路由机制控制哪个控制器接收哪些请求. 路由 为了创建基本控制器,我们需要使用@Controller装饰器, ...
- K8S | Deployment应用编排
目录 一.背景 二.Deployment组件 1.简介 2.语法说明 三.基础用例 1.创建操作 2.查看信息 3.更新操作 4.删除操作 四.进阶用例 1.回滚操作 2.伸缩操作 3.暂停与恢复 五 ...
- Linux 函数: my_func
# A man and his 'fuctions' ;) # quick use ipmitool cmd to do something ipmi-ip-cmd () { local ip=$1 ...
- 这可能是前端处理excel最好的工具了
大家好,我是程序视点的小二哥! 今天小二哥要分享的是一个纯前端实现读取和导出excel文件的工具库:ExcelJS ExcelJs 简介 功能十分简单: 读取,操作并写入电子表格数据和样式到 XLSX ...