Metadata-Version: 2.4
Name: minha-calculadora-laercio
Version: 0.1.1
Summary: Biblioteca simples de operações matemáticas criada para estudo de módulos, pacotes e publicação no PyPI.
Author: Laercio Alves
License: MIT
Project-URL: Homepage, https://github.com/seuusuario/minha-calculadora-laercio
Project-URL: Repository, https://github.com/seuusuario/minha-calculadora-laercio
Keywords: calculadora,matematica,python,estudo
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Minha Calculadora Laercio

Projeto simples criado para estudar:

- módulos Python;
- pacotes Python;
- testes automatizados;
- criação de arquivos `.whl` e `.tar.gz`;
- publicação no PyPI.

## Estrutura

```text
minha_calculadora_laercio/
├── pyproject.toml
├── README.md
├── LICENSE
├── .gitignore
├── src/
│   └── minha_calculadora/
│       ├── __init__.py
│       └── operacoes.py
└── tests/
    └── test_operacoes.py
```

## Criar ambiente virtual

No Linux:

```bash
python3 -m venv .venv
source .venv/bin/activate
```

## Instalar dependências de desenvolvimento

```bash
python -m pip install --upgrade pip
pip install build twine pytest
```

## Instalar o projeto em modo desenvolvimento

```bash
pip install -e .
```

## Executar os testes

```bash
pytest
```

## Exemplo de uso

```python
from minha_calculadora import somar, dividir

print(somar(10, 20))
print(dividir(10, 2))
```

## Gerar o pacote

```bash
python -m build
```

Serão criados arquivos na pasta:

```text
dist/
```

Normalmente:

```text
minha_calculadora_laercio-0.1.0-py3-none-any.whl
minha_calculadora_laercio-0.1.0.tar.gz
```

## Verificar o pacote antes da publicação

```bash
twine check dist/*
```

## Testar instalação do wheel

```bash
pip uninstall minha-calculadora-laercio -y
pip install dist/minha_calculadora_laercio-0.1.0-py3-none-any.whl
```

Depois:

```bash
python
```

```python
from minha_calculadora import somar

print(somar(5, 8))
```

Resultado:

```text
13
```

## Publicação

Antes de publicar no PyPI oficial, é recomendado testar primeiro no TestPyPI.

Depois de criar sua conta e configurar a autenticação, o fluxo típico é:

```bash
python -m twine upload --repository testpypi dist/*
```

Para o PyPI oficial:

```bash
python -m twine upload dist/*
```

> Observação: o nome de distribuição no PyPI é `minha-calculadora-laercio`,
> mas o nome usado no `import` é `minha_calculadora`.
