# 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的更多相关文章

  1. 【mlflow】打包:npm run build + python setup.py sdist

    mlflow是一个开源机器学习平台 最近需要使用一个它的最新版本,但是这个最新版本没有git包,无法通过pip install安装,需要打包安装. 打包完之后在项目的dist文件夹中有打包后的压缩包, ...

  2. Python setup.py和MANIFEST.in文件

    Setup.py文件 from setuptools import setup from codecs import open # 第三方依赖包及版本号 requires = ['beautifuls ...

  3. 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 ...

  4. Python安装mysql-python错误提示python setup.py egg_info

    做python项目,需要用到mysql,一般用python-mysql,安装时遇到错误提示如下: Command "python setup.py egg_info" failed ...

  5. python setup.py uninstall

    I have installed a python package with python setup.py install How do I uninstall it? ============== ...

  6. python setup.py install 报错ImportError: No module named setuptools

    学习光荣之路python课程时,使用python setup.py install安装其他模块时,第一次安装某模块成功了.安装另一模块却报错ImportError: No module named s ...

  7. pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in

    问题 Mac 下通过 pip 安装 icu 失败. 解决办法及原因 问题的原因是因为icu库中的某一行代码找不到一个文件,获取不到ICU_VERSION的值. # Install icu brew i ...

  8. Command "python setup.py egg_info" failed with error code 10

    1:今天系统重装以后,下载了新的版本的python3.6.1.然后想通过pycurl模块测试URL,突然发现windows10下我无法通过pip安装pycurl模块了,报错内容如下 Collectin ...

  9. Command "python setup.py egg_info" failed with error code 1一种问题的解决方法

    问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...

  10. 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 ...

随机推荐

  1. C++面试八股文:std::string是如何实现的?

    某日二师兄参加XXX科技公司的C++工程师开发岗位第18面: 面试官:std::string用过吧? 二师兄:当然用过(废话,C++程序员就没有没用过std::string的). 面试官:std::s ...

  2. 【TVM模型编译】0.onnx模型优化流程.md

    本文以及后续文章,着重于介绍tvm的完整编译流程. 后续文章将会按照以上流程,介绍tvm源码.其中涉及一些编程技巧.以及tvm概念,不在此部分进行进一步讲解,另有文章进行介绍. 首先介绍一下,从onn ...

  3. 将onnx的静态batch改为动态batch及修改输入输出层的名称

    目录 背景 操作 修改输入输出层 修改输入输出层名称 完整代码 背景 在模型的部署中,为了高效利用硬件算力,常常会需要将多个输入组成一个batch同时输入网络进行推理,这个batch的大小根据系统的负 ...

  4. 数据结构课后题答案 - XDU_953

    参考书: 数据结构与算法分析(第二版) 作者:荣政 编 出版社:西安电子科技大学出版社 出版日期:2021年01月01日 答案解析:

  5. Java版人脸跟踪三部曲之一:极速体验

    欢迎访问我的GitHub 这里分类和汇总了欣宸的全部原创(含配套源码):https://github.com/zq2599/blog_demos 关于<Java版人脸跟踪三部曲>系列 -& ...

  6. 特性介绍 | MySQL测试框架 MTR 系列教程(四):语法篇

    作者:卢文双 资深数据库内核研发 序言: 以前对 MySQL 测试框架 MTR 的使用,主要集中于 SQL 正确性验证.近期由于工作需要,深入了解了 MTR 的方方面面,发现 MTR 的能力不仅限于此 ...

  7. 国内可用的GPT4镜像站

    我做了个镜像站,GPT4的费用目前太贵了. 虽然做了个低价的月费,但基本上亏本在做,接口的实际费用高出太多. 运行了1个月,每天有几十人在用吧. 有兴趣的可以收藏一下 GPT4的验明正身的问题&quo ...

  8. Matlab GUI-Gamma选择工具

    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <path s ...

  9. 【游记】NOI 2023省选游记

    Day -N 下午去机房训练,回去的时候邱大大说 "我\(,lj,szy\) 可以去参加 NOI 2023省选".我瞬间就惊了.作为一个 \(CSP-S\) 只有 \(91pts\ ...

  10. 【pandas小技巧】--缺失值的列

    在实际应用中,数据集中经常会存在缺失值,也就是某些数据项的值并未填充或者填充不完整.缺失值的存在可能会对后续的数据分析和建模产生影响,因此需要进行处理. pandas提供了多种方法来处理缺失值,例如删 ...