-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry build: crash on encountering a symlink #3589
Comments
Hello @brechtm, as you said, poetry automatically excludes all file listed in fin swimmer |
I was not aware of that. In that case, the fact that my Python package is located in the src directory might be an important factor. This is of course configured in pyproject.toml_: packages = [{ include = "rinoh", from = "src" }] |
Forget that. That doesn't make a difference. I now understand the confusion however. I want to include all files in my repository in the sdist, not just the the Python packages. So that includes tests and configuration files for tox and other tools. I have updated my first message to hopefully make this clearer. |
I tried to sum up the situation in that ticket: #3380. Maybe that can somehow help you... |
Thanks for pointer, @sinoroc. The problem is more complex than I thought. I ran into some strange things in the code that might explain some of these issues when working on my PR. I think the best approach would be to list all requirements (collecting information for related tickets) and design a solution that can handle them. |
I'm having an issue that may seem related. My library packages = [
{ include = "coordio", from = "python" }
]
include = [
{path = "python/coordio/etc/*"},
{path = "cextern/**/*", format='sdist'},
{path = "LICENSE.md"},
{path = "python/coordio/*.so", format = "wheel"}
]
[tool.poetry.build]
script = "build.py"
generate-setup-file = false This used to work fine a few months ago, I think, but now when I run If I move the library to the root of the repository (remove the |
As a note to other people finding this thread... I had the same issue, or at least error message, but it was the result of having symlinks in a subdirectory of my project. Removing the symlink (temp files generated by my code) resolved the problem. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: macOS High Sierra 10.13.6
Poetry version: 1.1.4
Issue
I'm converting my project from a setuptools to Poetry. For building the sdist, Poetry already makes things easier since it excludes files listed in .gitignore files, where this information needs to be duplicated in the MANIFEST.in file when using setuptools.
However, I wanted to go one step further and just include all of my repository's files instead of listing them all, counting on the .gitignore files to exclude unwanted files. To this effect, I am using this configuration in pyproject.toml:
This should work well, since I typically want all files under source control to be included in the sdist, and this will not require adjustments to pyproject.toml when new files are added to the repository. I might want to exclude certain files such as CI service configuration files, however.
Unfortuntely, Poetry crashes when encountering a symlink in a .tox virtualenv directory with when building the sdist:
Since the parent .tox directory is excluded by .gitignore, Poetry shouldn't bother checking any of the files under it.
Full output of: poetry build -vvv -f sdist
The text was updated successfully, but these errors were encountered: