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

Exclude is not respected when building package. #1597

Closed
3 tasks done
mhozza opened this issue Nov 17, 2019 · 4 comments · Fixed by #1606
Closed
3 tasks done

Exclude is not respected when building package. #1597

mhozza opened this issue Nov 17, 2019 · 4 comments · Fixed by #1606
Assignees
Labels
kind/bug Something isn't working as expected
Milestone

Comments

@mhozza
Copy link

mhozza commented Nov 17, 2019

  • 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).

Issue

Exclude is not respected when building package.

I have **/node_modules/** in my .gitignore and I also included exclude = ["**/node_modules"] in my pyproject.toml file, but none of them causes the node_modules to be ignored.

When I do poetry build -vvv I see a lot of lines similar to:

 - Adding: /home/mio/source/trojstenweb/trojsten/special/plugin_prask_2_4_1/static/plugin_prask_2_4_1/js/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-block-scoping/node_modules/babel-runtime/node_modules/core-js/fn/log.js
@mhozza mhozza added the kind/bug Something isn't working as expected label Nov 17, 2019
@finswimmer
Copy link
Member

finswimmer commented Nov 18, 2019

Hello,

this is already fixed by #1464 but obviously it is not included in the current version

Can you please check the output of git ls-files --others -i --exclude-standard? Because I would thought that the .gitgnore should work. If the files you want to excluded that you have already added them with git add. You will have to remove them from the git tracking.

Nevertheless with the fix already in dev the pyproject.toml should work.

In the meantime you can use also use exclude = ["**/node_modules/**/*"].

@sdispater Is this correct that the fix isn't in the current release?

@mhozza
Copy link
Author

mhozza commented Nov 18, 2019

Thanks for the response.

git ls-files --others -i --exclude-standard contains these files. I'm quite sure they are not commited to the repository or added using git add.
exclude = ["**/node_modules/**/*"] makes no difference, so I'm not sure if the fix will actually help. I'm wondering if recursive glob should be used.

Not sure if relevant, but I also have

packages = [
  { include = "trojsten"}
]

in my pyproject.toml file.

@finswimmer finswimmer self-assigned this Nov 18, 2019
@finswimmer
Copy link
Member

I had the time to take a closer look at this:

  • In any case have the .gitignore version works for me
  • exclude = ["**/node_modules/**/*"] works
  • exclude = ["**/node_modules/"] doesn't work, even with linked fix

So I will work on a fix for the last point.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants