背景

nova服务构建失败,报错:

  1. 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers

概述

setup.py

  1. python setup.py --help-commands
  2. Standard commands:
  3. build build everything needed to install
  4. build_py "build" pure Python modules (copy to build directory)
  5. build_ext build C/C++ extensions (compile/link to build directory)
  6. build_clib build C/C++ libraries used by Python extensions
  7. build_scripts "build" scripts (copy and fixup #! line)
  8. clean clean up temporary files from 'build' command
  9. install install everything from build directory
  10. install_lib install all Python modules (extensions and pure Python)
  11. install_headers install C/C++ header files
  12. install_scripts install scripts (Python or otherwise)
  13. install_data install data files
  14. sdist create a source distribution (tarball, zip file, etc.)
  15. register register the distribution with the Python package index
  16. bdist create a built (binary) distribution
  17. bdist_dumb create a "dumb" built distribution
  18. bdist_rpm create an RPM distribution
  19. bdist_wininst create an executable installer for MS Windows
  20. upload upload binary package to PyPI
  21. check perform some checks on the package
  22. Extra commands:
  23. saveopts save supplied options to setup.cfg or other config file
  24. compile_catalog compile message catalogs to binary MO files
  25. develop install package in 'development mode'
  26. upload_docs Upload documentation to PyPI
  27. extract_messages extract localizable strings from the project code
  28. init_catalog create a new catalog based on a POT file
  29. test run unit tests after in-place build
  30. update_catalog update message catalogs from a POT file
  31. bdist_egg create an "egg" distribution
  32. setopt set an option in setup.cfg or another config file
  33. install_egg_info Install an .egg-info directory for the package
  34. rotate delete older distributions, keeping N newest files
  35. egg_info create a distribution's .egg-info directory
  36. deb_version Output the deb *compatible* version string of this package
  37. alias define a shortcut to invoke one or more commands
  38. easy_install Find/get/install Python packages
  39. rpm_version Output the rpm *compatible* version string of this package
  40. usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
  41. or: setup.py --help [cmd1 cmd2 ...]
  42. or: setup.py --help-commands
  43. or: setup.py cmd --help

pip

setuptools

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

Python 打包

Python 打包中 setpy.py settuptools pbr 的了解的更多相关文章

  1. Python包中 __init__.py文件的作用

    原创连接 https://www.cnblogs.com/AlwinXu/p/5598543.html Python包中 __init__.py文件的作用 在创建python包的过程中,IDE都会在包 ...

  2. python包中__init__.py文件的作用

    python包中__init__.py文件的作用 __init__.py文件最常用的作用是标识一个文件夹是一个 python包. __init__.py文件的另一个作用是定义模糊导入时要导入的内容. ...

  3. python模块中__init__.py的作用

    基本概念先上结论举例解释实验一:不包含__init__.py实验二:A中包含__init__.py实验三:A.A_A中也包含__init__.py进阶基本概念概念 解释import 即导入,方式就是在 ...

  4. Python包中__init__.py作用

    在创建python包的过程中,IDE都会在包根目录下创建一个__init__.py文件,该Python文件默认是空的.目录结构如下: Pycharm下的package树结构: 在Finder中的目录结 ...

  5. python包中__init__.py的作用

    1.__init__.py定义包的属性和方法 一般为空文件,但是必须存在,没有__init__.py表明他所在的目录只是目录不是包 2.导入包的时候使用 例如有一个test目录,test下有xx1.p ...

  6. Python中setup.py一些不为人知的技巧

    http://python.jobbole.com/80912/ 在我开始之前,我想先说清楚我将要解释的是些“窍门”.他们不是“最好的做法”,至少在一种情况下是不可取的. 说到不可取的做法,我会适时写 ...

  7. python中__init__.py文件的作用

    问题 在执行models.py时,报ImportError:No module named transwarp.db的错误,但明明transwarp下就有db.py文件,路径也没有错误.真是想不通.后 ...

  8. python中 __init__.py的例程

    __init__.py一般是为空,用在一个python目录中,标识该目录是一个python的模块包 先上来看一个例子: .: test1 test2 test_init.py ./test1: tim ...

  9. Python自定义Module中__init__.py文件介绍

    ./pyModuleTest/├── addutil│   ├── add.py│   ├── add.pyc│   ├── __init__.py│   ├── __init__.pyc│   └─ ...

随机推荐

  1. docker tool

    安装docker tool http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/ 安装1.8.3 有把vbox等服务器地址加 ...

  2. PHP面向对象构造和析构函数

    一.构造函数 用来生成对象的函数 <?php class Ren{ public $name; public $sex;//性别是人一出生就知道的,可以用构造函数来定义 /*public fun ...

  3. itextsharp display:none无效的bug

    在使用itextsharp实现 html 2 pdf时,发现display:none无效.如 <div style="display: none">应该隐藏</d ...

  4. ASP.NET JSON(转http://www.360doc.com/content/14/0615/21/18155648_386887590.shtml)

    概念介绍还是先简单说说Json的一些例子吧.注意,以下概念是我自己定义的,可以参考.net里面的TYPE的模型设计如果有争议,欢迎提出来探讨!1.最简单:{"total":0} t ...

  5. JTable的模型

    2018-11-04 23:15:21开始写 模型类 import javax.swing.table.DefaultTableModel;//导入包 public class LocalTableM ...

  6. Linux Shell入门

    转自:http://www.mamicode.com/info-detail-605431.html

  7. flask模板结构组织(局部模板、宏、模板继承)

    模板结构组织 除了使用函数.过滤器等工具控制模板的输出外,jinja2还提供了一些工具来在宏观上组织模板内容. 局部模板 在Web程序中,我们通常会为每一类页面编写一个独立的模板.比如主页模板.用户资 ...

  8. 特定条件下批量解压文件改变编码,顺便修改.so.0找不到等一些小问题

    直接结论: 1.linux解压文件乱码: unzip -O GBK *.zip 2.linux改变文件内容编码: 安装enca,下载地址:https://github.com/nijel/enca/i ...

  9. 算法提高 c++_ch02_01 (强制类型转换)

    编写一个程序,利用强制类型转换打印元音字母大小写10种形式的ASCII码. 输出的顺序为:大写的字母A,E,I,O,U的ASCII码,小写的字母a,e,i,o,u的ASCII码.所有的ASCII码都用 ...

  10. Linux shell 时间操作(取昨天 前天)

    1. 取今天时间 $date -d "now" +%Y-%m-%d 2. 取昨天时间 $date -d "yesterday" +%Y-%m-%d $date  ...