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.

Pyroma outputs verbose build backend output when building metadata

See original GitHub issue

I’m getting the warning:

warning: no previously-included files matching '.isort' found anywhere in distribution

I already ignored the file in MANIFEST.in:

global-exclude .isort

However, the pyroma still keeps showing the warning. Is there any way to remove this warning?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wesleyblcommented, Sep 16, 2022

@CAM-Gerlach thanks for your detailed explanation!

Really when I remove these two lines:

https://github.com/plone/Products.CMFPlone/blob/6.0.0b2/MANIFEST.in#L6-L7

news folder warning goes away.

I saw that the build.ProjectBuilder class has a runner parameter.

So I changed this line:

https://github.com/regebro/pyroma/blob/2c0c3fb6e5c216d40870060d3bdda431d009fff6/pyroma/projectdata.py#L27

to

import pep517
...

metadata_dir = build.ProjectBuilder(str(path),runner=pep517.quiet_subprocess_runner).prepare("wheel", tempdir)

See: https://pep517.readthedocs.io/en/latest/callhooks.html#pep517.quiet_subprocess_runner

So I was able to suppress the setuptools output:

 ./bin/pyroma .
------------------------------
Checking .
Getting metadata for wheel...
Found Products.CMFPlone
------------------------------
Final rating: 10/10
Your cheese is so fresh most people think it's a cream: Mascarpone

I think these outputs are more of a hindrance than a help, in the context of pyroma. (Or not. They can help people learn, like I learned here 😄 )

1reaction
CAM-Gerlachcommented, Sep 16, 2022

Thanks for the additional information and the link to an example package on which you’re seeing this. This is helpful in confirming my previous explanation, and helping me describe what’s going on in your case with further specificity.

As mentioned, this is a valid warning produced by your build backend (Setuptools, in this case) due to your package configuration, and occurs entirely independent of pyroma. Your MANIFEST.in is indeed being picked up, as these warnings are each directly about a specific respective line in that file, and would not occur otherwise. The build frontend tool (build, pip wheel, etc) you are using to build your package artifacts for distribution may or may not be showing you the output of your build backend (Setuptools), or it may be buried in the copious output Setuptools produces by default, but that output does indeed include these warnings. Indeed, I reproduced this myself on a fresh clone of your repo running the standard, officially-recommended build frontend:

Build output
$ git clone https://github.com/plone/Products.CMFPlone.git
$ cd Products.CMFPlone
$ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for sdist...
C:\Users\CAM~1.GER\AppData\Local\Temp\build-env-t050psxl\lib\site-packages\setuptools\dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
  warnings.warn(msg, SetuptoolsDeprecationWarning)
running egg_info
creating Products.CMFPlone.egg-info
writing Products.CMFPlone.egg-info\PKG-INFO
writing dependency_links to Products.CMFPlone.egg-info\dependency_links.txt
writing namespace_packages to Products.CMFPlone.egg-info\namespace_packages.txt
writing requirements to Products.CMFPlone.egg-info\requires.txt
writing top-level names to Products.CMFPlone.egg-info\top_level.txt
writing manifest file 'Products.CMFPlone.egg-info\SOURCES.txt'
reading manifest file 'Products.CMFPlone.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*' found under directory 'news'
warning: no previously-included files found matching 'news'
adding license file 'LICENSE'
writing manifest file 'Products.CMFPlone.egg-info\SOURCES.txt'
* Building sdist...
# etc etc

As mentioned, this warning is due to an exclude not matching any file that was previously included. In this particular example, you have a directory news that is in your source tree, but it is not matched by any include rule (you have include *, but that only matches top-level files, not recursive directory contents). Then, exclude news and recursive-exclude news * both don’t match anything, as news and its contents are never included to begin with, thus the (valid) warning.

To resolve it, you can simply remove the useless exclude news (and redundant recursive-exclude news *), since news is never included to begin with (as the warning is telling you).

You also have a warning for not matching any compiled *.pyc files, but that is useful to retain and can simply be ignored (unfortunately, I don’t know of a straightforward way for you to silence it, but you’ll only see it when viewing the full developer-facing build output; you could adopt a whitelist rather than blacklist approach for extensions in your code directory, but that runs the risk of not including a desired file—at that point, better to use Setuptools-SCM or a more modern build backend that just uses your .gitignore to include all VCS-tracked files automatically).

As a sidenote, include pyproject.toml is also redundant since you already have include *, which includes everything in the root directory anyway.

Hopefully this helps further clarity what is going on for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · regebro/pyroma - GitHub
Contribute to regebro/pyroma development by creating an account on GitHub ... Pyroma outputs verbose build backend output when building metadata enhancement.
Read more >
Enable Verbose Build Output when building projects under ...
Is there a way to look at which compiler is getting invoked and which flags are getting passed when building the projects under...
Read more >
Defining metadata (meta.yaml) - Conda
All the metadata in the conda-build recipe is specified in the meta.yaml file. ... The source is copied to the work directory before...
Read more >
Logging, verbose — sklearn-onnx 1.11 documentation
verbose is a parameter which prints messages on the standard output. It tells which converter is called. verbose=1 usually means what skl2onnx is...
Read more >
TML Verbose Logs - TIBCO Product Documentation
This graph requires you to select the request_uuid from the Verbose Log Metadata table so that the following log panel displays each type...
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