/demo-setuptools-with-setuppy

Python Package repository example using setuptools with pyproject.toml and setup.py

Primary LanguagePythonMIT LicenseMIT

Setuptools with pyproject.toml and setup.py

This package is an example project for building a Python package (i.e. wheel or sdist). It relies on setuptools as a build backend with setup.py for configuration.

Commands:

Note

setuptools doesn't manage your virtual environment. You'll need to create and activate one yourself (e.g. with venv).

  • Editable install:
# requires pip >= 21.3
python -m pip install -e .
  • Run code:
python -c "import demo"
  • Build:
python -m pip install build
python -m build
  • Upload to PyPI:
python -m pip install twine
python -m twine upload dist/*