This is a Python library for parsing RPM spec files.
Make sure to run commands in a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtRun tests:
pytest # Run all tests
pytest --cov=pyrpm.spec # Run tests with coverage
pytest tests/test_spec_file_parser.py -k test_name # Run single testType checking:
mypy . # Run type checker (strict mode enabled)Linting:
pylint --rcfile=.pylintrc pyrpm # Run linter on main moduleCode formatting:
black --line-length 130 . # Format code (line length: 130)Build and release:
flit build # Build distribution
flit publish # Publish to PyPI