Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox ignores package data from setuptools_scm with Mercurial (hg) #2894

Closed
schlamar opened this issue Jan 25, 2023 · 1 comment
Closed

tox ignores package data from setuptools_scm with Mercurial (hg) #2894

schlamar opened this issue Jan 25, 2023 · 1 comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@schlamar
Copy link

schlamar commented Jan 25, 2023

Issue

tox does not include package data from setuptools_scm if there is a Mercurial (hg) repository.

I attached a reproducible example: tox_scm.zip

Running

> hg init
> hg add *
> hg commit -m "init"
> tox

fails with FileNotFoundError: [Errno 2] No such file or directory: '.tox\py\lib\site-packages\mypkg\data.txt'

In src\mypkg.egg-info\SOURCES.txt you can see that data.txt is missing in the build.

Running the build frontend (py -m build) updates SOURCES.txt to include src/mypkg/data.txt and includes data.txt in dist/*.tar.gz and dist/*.whl. So this is probably an issue with the tox build frontend itself.

Running the same steps above with git works. In this case data.txt is installed to .tox\py\lib\site-packages\mypkg

Environment

Platform: Windows 10
tox version: 4.2.3
Python version running tox: 3.9.13 32bit

@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label Jun 16, 2023
@gaborbernat
Copy link
Member

This means the build backend requires some env-vars that tox doesn't pass through. You should set this and everything should work. It's a bit of trial and error to figure out which env-vars are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

2 participants