markdown Python私有包依赖项的权威指南

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Python私有包依赖项的权威指南相关的知识,希望对你有一定的参考价值。

# pip install

## From a setup.py file 
### Specifiers
Complete grammar of version specifiers:
https://www.python.org/dev/peps/pep-0508/

Version specifiers format:
https://www.python.org/dev/peps/pep-0440/

### Dependency links
Make `pip` parse the `dependency_links` section in `setup.py`:  `--process-dependency-links`

Dependency links for packages not in PyPi
http://setuptools.readthedocs.io/en/latest/setuptools.html#dependencies-that-aren-t-in-pypi

Sometimes egg version is required, put 0 if none:
https://github.com/pypa/pip/issues/3610#issuecomment-283578756

## From a requirements file (usually requirements.txt)
Done by doing
`pip install -r <requirements_file>`

According to `pip install --help`
```
  -i, --index-url <url>       Base URL of Python Package Index (default
                              https://pypi.python.org/simple). This should
                              point to a repository compliant with PEP 503
                              (the simple repository API) or a local directory
                              laid out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition
                              to --index-url. Should follow the same rules as
                              --index-url.
  --no-index                  Ignore package index (only looking at --find-
                              links URLs instead).
  -f, --find-links <url>      If a url or path to an html file, then parse for
                              links to archives. If a local path or file://
                              url that's a directory, then look for archives
                              in the directory listing.
```
(define what is understood by an archive, whl, tar.gz?)


## Other considerations
Self-signed certificates or no certificates at all (??): `--trusted-host <hostname>`

External files, scripts, tests, etc.??
- http://python-packaging.readthedocs.io/en/latest/index.html
- http://setuptools.readthedocs.io/en/latest/setuptools.html

以上是关于markdown Python私有包依赖项的权威指南的主要内容,如果未能解决你的问题,请参考以下文章

处理 node.js 私有模块依赖项的推荐方法是啥?

如何捆绑包含依赖项的 Python 应用程序?

用于依赖项的 Gradle 私有存储库

AWS Elastic Beanstalk 中的 Python:私有包依赖项

如何处理将作为另一个包的依赖项的命名空间包

在 setup.py 或 pip 需求文件中,如何控制安装包依赖项的顺序?