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

Bug: _needs_reinstall captures python setup.py --name stderr in addition to stdout #1052

Closed
hashbrowncipher opened this issue Oct 10, 2018 · 4 comments

Comments

@hashbrowncipher
Copy link

I ran into this bug because my setup.py --name uses the warnings module, which prints to stderr. As a result, tox was unable to infer the location of my egg_info directory.

@hashbrowncipher
Copy link
Author

This has the side-effect of not showing users the warning that their setup.py presumably wanted seen.

@gaborbernat
Copy link
Member

Is #1051 fix for this? Or this is an additional one?

@hashbrowncipher
Copy link
Author

This is separate from #1051. I wrote up a failing test case for the behavior I'd like to succeed:

def test_warning_emitted(cmd, initproj):
    initproj(
        "spam-0.0.1",
        filedefs={
            "tox.ini": """
        [testenv]
        skipsdist=True
        usedevelop=True
    """,
            "setup.py": """
        from setuptools import setup
        from warnings import warn
        warn("I am a warning")

        setup(name="spam", version="0.0.1")
    """
        }
    )
    result = cmd()
    result = cmd()
    assert "develop-inst-noop" in result.out

@gaborbernat
Copy link
Member

In this case I would propose to print the warning ourselves too, but still continue with the build. Will address.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants