markdown 上传到PyPI

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 上传到PyPI相关的知识,希望对你有一定的参考价值。

Uploading to PyPI
================

## Initial things:
1. Make an account on PyPI

1. Make sure you have `twine` and `wheel` installed in your repo: `pip install twine wheel`

1. Make sure you have your `~/.pypirc` file that looks like this:
  ```
  [distutils]
  index-servers =
    pypi

  [pypi]
  username=<INSERT HERE>
  password=<INSERT HERE>
  ```

1. Change permissions of that file: `chmod 600 ~/.pypirc`

1. Add a `setup.cfg` file that looks like this:
  ```
  [metadata]
  description-file = README.md

  [wheel]
  universal = 1

  [egg_info]
  tag_build =
  tag_date = 0
  tag_svn_revision = 0
  ```

1. In your `setup.py`, make sure you have the following `classifiers`:
  ```
  classifiers=[
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
  ],
  ```

## Build and Upload:
1. Tag branch: `git tag <VERSION> -m "Version blah blah blah..."` and then upload: `git push --tags REMOTE`

1. Build it: `python setup.py sdist bdist_wheel --universal`

1. Then upload: `twine upload dist/*`

以上是关于markdown 上传到PyPI的主要内容,如果未能解决你的问题,请参考以下文章

无法使用 Twine 上传到 PyPi

无法将包上传到 PyPI:410 Gone

无法将项目上传到 pypi

上传到 PyPi 返回无效的 URI

如何使用 twine 将新版本的项目上传到 PyPI?

如何将 conda 骨架与未上传到 pypi 的包一起使用?