-
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
Include exclude globs with whitelist pattern #1336
Comments
for the includes, it looks like you might need to add file extensions at the end @dpgaspar like: |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This is also an issue for me. Like the @dpgaspar I want to exclude the superset of a directory and including specific files from that directory using
This did work until recently and I suspect 12f981c has something to do with it. basically, since i upgraded from a previous 1.0.0 pre-release build, this was working as expected. Not anymore with 1.0.0. Will downgrade for now. |
The reason for this is, that there is no check whether a file is explicit included or not. poetry builds a list of all files it can found and remove those from this list, that are excluded by |
Thanks. So, apparently this worked in previous builds and according to @dpgaspar this is also something that the MANIFEST supports. How would this be done now with Poetry? I have lots of files in that sample directory but only want to include a minimal subset. |
Could you please tell me in which version this works? |
Sorry, I was wrong. poetry checks for explicit included files and doesn't exclude them. What might have changed is, that you have to start with the package name or a wildcard when giving the paths:
|
in terms of what version works: i'm not 100% sure as there is unfortunately no indication what i had before :( in terms of your comment regarding the package name: That's what I already do. I have the package name as first path element this is what i currently use (slight changed paths) exclude = [
"my_package/**/tests/**/*",
"my_package/dir1/csrc/**/*",
"my_package/dir1/automation/**",
"my_package/dir1/automation/lib/.gitignore",
"my_package/sample/**/*"
]
include = [
"my_package/sample/file1.yaml",
"my_package/sample/file2.yaml",
"my_package/sample/file3.yaml",
# these are python files in the sample dir that must not be excluded
"my_package/sample/__init__.py",
"my_package/sample/sample_data.py",
"my_package/sample/some_other_sample_data.py",
"my_package/subdir2/schema/*.yaml",
"my_package/**/*.so"
] And just to be sure:
The result of a |
Ah, the problem only exists for wheel and not for sdist packages (at least in my testings). Fix (#1750) is on the way. |
cool... also... fwiw:
was working OK before. |
Note that this behavior was different for files in dirs; see "if file.is_dir():" block a bit higher in the code. Related: python-poetry/poetry#1336
I am unable to exclude the pycache folder. Please tell me.. |
Same issue. |
Hello @iamishalkin, please open a new issue with a minimal reproducible example included. fin swimmer |
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. |
Hi,
Making a POC for using poetry with apache/superset#8079 but I'm having some issues
First superset has a complex directory structure, I'm struggling with the
include
,exclude
parameters in glob, usingMANIFEST.in
we could whitelist for example:But using poetry toml we can't, how can I implement the same?
With this pattern all superset/assets get excluded. Any advice?
The text was updated successfully, but these errors were encountered: