-
Notifications
You must be signed in to change notification settings - Fork 7
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
Include tests in source distribution #8
Comments
Just a plain old [tool.poetry]
include = ["tests"] seems to do the trick on my version. I'll give it a shot... |
The only potential problem is that (on my version anyway) that also copies the tests into the wheel at the top level, and I'm not sure if that's desirable. |
It's not showing up in the wheel for me. I'm on the preview release here, and in the CI. So it shouldn't be a problem, but I'll check once it makes it to PyPI to make sure. |
I've verified that the newest wheel on PyPI isn't getting the tests included. |
When building from a source distribution (e.g., when creating a system package) it is preferable to run the tests on the built code. This requires the tests to be included in the source distribution.
I haven't used poetry before, but I had a play with it and couldn't find a nice way to include them:
You can use
packages = [{ include = "quaternion" }, { include = "tests", format = "sdist" }]
in the[tool.poetry]
section of pyproject.toml which includes the tests directory in the source distribution, but treats it as another package, i.e., the generated setup.py would also install the tests as a package, which is certainly not ideal.Add support of inline tables in include on pyproject.toml. python-poetry/poetry-core#6 adds similar
format=
filtering to includes; it has been accepted but doesn't seem to have been released yet (at least, the Poetry version 1.0.10 I have installed doesn't support it). I think this will allow something likeinclude = [{path = "tests/*", format = "sdist"}]
once its available.For now, the archive generated by GitHub is sufficient, but once there is sufficient poetry support it would be nice to have the tests in all source distributions.
The text was updated successfully, but these errors were encountered: