Skip to content

Instantly share code, notes, and snippets.

@kavya006
Created February 5, 2023 17:19
Show Gist options
  • Save kavya006/e5ebfb80584c3d0a99becc16c0059fde to your computer and use it in GitHub Desktop.
Save kavya006/e5ebfb80584c3d0a99becc16c0059fde to your computer and use it in GitHub Desktop.
Complete pyproject.toml file
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[metadata]
name = "project"
version = "0.0.1"
[tool.setuptools.packages]
find = {} # Scan the project directory with the default parameters
[project]
name = "project"
version = "0.0.1"
authors = [
{ name="your_name", email="your_email" },
]
description = "Sample project for medium article"
readme = "README.md"
requires-python = ">=3.8"
@dotexe3301
Copy link

I read your medium post, but I am unable to build my package alone with myproject.toml file.
It says:

ValueError: No distribution was found. Ensure that setup.py is not empty and that it calls setup().
How can I build my package alone with .toml file with setuptools as my build-backend?

@kavya006
Copy link
Author

kavya006 commented Apr 1, 2024

Hi @dotexe3301 ,

Can you share the exact commands and steps you followed? I just tried again with the steps mentioned and I was able to build my package without any issues. For reference, this is my setuptools and build packages version.

image

@dotexe3301
Copy link

Well, I figured out that it was successfully built with .toml alone after so many tries and surfing docs again and again ;)

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