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

macOS wheel builds broken because of find_sources test failure #10073

Closed
JukkaL opened this issue Feb 11, 2021 · 7 comments
Closed

macOS wheel builds broken because of find_sources test failure #10073

JukkaL opened this issue Feb 11, 2021 · 7 comments
Assignees
Labels
bug mypy got something wrong priority-0-high

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Feb 11, 2021

macOS wheel builds are broken because of a test failure:

...
        files = {
            "pkg/a1/b/c/d/e.py",
            "pkg/a1/b/f.py",
            "pkg/a2/__init__.py",
            "pkg/a2/b/c/d/e.py",
            "pkg/a2/b/f.py",
        }
        fscache = FakeFSCache(files)
>       assert len(find_sources(["/"], options, fscache)) == len(files)

site-packages/mypy/test/test_find_sources.py:363: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
site-packages/mypy/test/test_find_sources.py:59: in find_sources
    return normalise_build_source_list(create_source_list(paths, options, fscache))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   mypy.find_sources.InvalidSourceList: There are no .py[i] files in directory '/'

This is blocking the 0.810 release #10062.

@JukkaL JukkaL added bug mypy got something wrong priority-0-high labels Feb 11, 2021
@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 11, 2021

Actually it's unclear if this is failing on the 0.810 release branch. If it's only failing on master, this doesn't block the 0.810 release.

@JukkaL JukkaL self-assigned this Feb 11, 2021
@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 11, 2021

Yes, this is failing on the 0.810 release branch, as I feared originally. I'm working on a fix.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 11, 2021

The wheel build is still failing. I have another attempt being built, but at least if it doesn't work, I'll probably have to postpone until the next week.

@hauntsaninja
Copy link
Collaborator

Sorry for the trouble, I'm optimistic #10077 would fix.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Feb 11, 2021

Your fix seems to have worked... But maybe we should change the logic a little:

subpath_str = os.path.abspath(subpath).replace(os.sep, "/")

We currently normalise the path for the purposes of --exclude using abspath, but maybe we should use relpath. This would make the behaviour more consistent across possible project locations (assuming that you run mypy from within the project)

@hauntsaninja
Copy link
Collaborator

I opened a PR in case you think using relpath is better: #10078

@JukkaL
Copy link
Collaborator Author

JukkaL commented Feb 15, 2021

@hauntsaninja Thanks, the macOS wheel builds work now.

@JukkaL JukkaL closed this as completed Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-0-high
Projects
None yet
Development

No branches or pull requests

2 participants