背景
nova服务构建失败,报错:
'tests_require' must be a string or list of strings containing valid project/version requirement specifiers
概述
setup.py
python setup.py --help-commands
Standard commands:
build build everything needed to install
build_py "build" pure Python modules (copy to build directory)
build_ext build C/C++ extensions (compile/link to build directory)
build_clib build C/C++ libraries used by Python extensions
build_scripts "build" scripts (copy and fixup #! line)
clean clean up temporary files from 'build' command
install install everything from build directory
install_lib install all Python modules (extensions and pure Python)
install_headers install C/C++ header files
install_scripts install scripts (Python or otherwise)
install_data install data files
sdist create a source distribution (tarball, zip file, etc.)
register register the distribution with the Python package index
bdist create a built (binary) distribution
bdist_dumb create a "dumb" built distribution
bdist_rpm create an RPM distribution
bdist_wininst create an executable installer for MS Windows
upload upload binary package to PyPI
check perform some checks on the package
Extra commands:
saveopts save supplied options to setup.cfg or other config file
compile_catalog compile message catalogs to binary MO files
develop install package in 'development mode'
upload_docs Upload documentation to PyPI
extract_messages extract localizable strings from the project code
init_catalog create a new catalog based on a POT file
test run unit tests after in-place build
update_catalog update message catalogs from a POT file
bdist_egg create an "egg" distribution
setopt set an option in setup.cfg or another config file
install_egg_info Install an .egg-info directory for the package
rotate delete older distributions, keeping N newest files
egg_info create a distribution's .egg-info directory
deb_version Output the deb *compatible* version string of this package
alias define a shortcut to invoke one or more commands
easy_install Find/get/install Python packages
rpm_version Output the rpm *compatible* version string of this package
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
pip
setuptools
- Building and Distributing Packages with Setuptools
- Python包管理工具setuptools详解
- Python打包分发工具setuptools简介
- Python 分发工具初探之 setuptools
- Python 分发工具初探之 setuptools 进阶
- 日拱一卒之:Python发布工具setuptools的用法
- 将自己写的Python代码打包放到PyPI上
http://blog.csdn.net/wang1472jian1110/article/details/71730387
http://codingpy.com/article/how-to-write-your-own-python-packages/
http://xiaoh.me/2015/12/11/python-egg/
http://www.cnblogs.com/streakingBird/p/4056765.html
http://blog.useasp.net/archive/2014/09/09/packaging-python-libraries-and-upload-to-pypi-python-package-index.aspx
pbr
- Github-openstack-dev/pbr
- 制作基于pbr的python可发布package
- Packaging Python software with pbr
- openstack-pbr
- Specifying where to install ‘tests_require‘ dependencies of a distribute/setuptools package
Python 打包
- yansu-Python包管理工具setuptools详解
- 编程派-一文教会你正确打包Python程序
- python打包
- Python包和egg-info目录
- Python的egg包详细讲解
- Python egg 学习笔记
- koala bear-Python application 的打包和发布——(上)
原文地址:https://www.cnblogs.com/michael-xiang/p/10466827.html
时间: 2024-10-25 00:13:04