question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document setuptools.build_meta

See original GitHub issue

There is currently no documentation for setuptools.build_meta!

We need to cover:

  1. What it is - see this three part series for more background on python packaging and PEP 517
  2. How to use it - you need to add a pyproject.toml to your source root with the following configuration (implementer - please confirm the right versions to pin):
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build-meta"
  1. How the semantics of a setuptools.build_meta differ from directly invoking setup.py; at the moment, the only deliberate difference is that with setuptools.build_meta, the source root is not on sys.path when you invoke it, meaning that you should either stop importing things from the local path, or add sys.path.insert(0, os.dirname(__file__)) to the top of your setup.py file.
  2. The fact that, if you are a setup.cfg-only project, when using pyproject.toml setup.py is now optional!

We can cover setuptools.build_meta:__legacy__ in this ticket or in a separate one.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:27
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
alvyjudycommented, Mar 30, 2020

Hello! Just a trivial note, the build-backend in the pyroject.toml should be build_meta instead of build-meta otherwise an error will be thrown

1reaction
abravalhericommented, May 19, 2022

Hi @codeandfire please feel free to submit PRs, documentation improvements are always welcome!

I just recomend discussing your ideas first if they are very big or disruptive (e.g. removing/moving documentation pages).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build System Support - Setuptools - Python Packaging Authority
How to use it?#. Start with a package that you want to distribute. You will need your source files, a pyproject.toml file and ......
Read more >
ImportError: No module named 'setuptools.build_meta'
As ignorant as I am, I tried dropping this file into the site-packages\pip_vendor\pep517 directly with no change. I'm sure this is simple, but...
Read more >
Module 'setuptools.build_meta' has no attribute '__legacy__'
I am trying to install RASA on Ubuntu: It is erroring out with: Collecting SQLAlchemy<1.4.0,>=1.3.3 Using cached SQLAlchemy-1.3.15.tar.gz ...
Read more >
error: failed building wheel for pycocotools failed to ... - You.com
... configsettings, File "C:\Users\mattw\AppData\Local\Temp\pip-build-env-x520118t\overlay\Lib\site-packages\setuptools\buildmeta.py", line 229, ...
Read more >
A Practical Guide to Setuptools and Pyproject.toml
toml file. The goal of this file is to allow you to define what build tools are needed in order to build your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found