Skip to content

Instantly share code, notes, and snippets.

@tiagocordeiro
Created May 10, 2019 18:22
Show Gist options
  • Save tiagocordeiro/cfb7b2f8466d80a541f1bdd03b5be7c3 to your computer and use it in GitHub Desktop.
Save tiagocordeiro/cfb7b2f8466d80a541f1bdd03b5be7c3 to your computer and use it in GitHub Desktop.
Como atualizar um pacote no PyPi

Atualizando um pacote no Pypi

Versionamento

Atualizar a tag de versão do pacote.

git tag                 # verifica as tags
git tag [versão]        # adiciona uma nova tag com a versão
git push origin --tags  # Faz o push das tags para o repositório

Atualizando dependencias

pip install --upgrade setuptools wheel  # Necessários para gerar os pacotes
pip install --upgrade twine             # Responsável pelo upload dos pacotes

Gerando os pacotes

python setup.py sdist bdist_wheel

Upload dos pacotes

twine upload dist/*

É isso. Para mais detalhes, confira a documentação oficial. https://packaging.python.org/tutorials/packaging-projects/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment