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

Feature Request: Include folder without being installed #2513

Closed
2 tasks done
msiemens opened this issue Jun 6, 2020 · 3 comments
Closed
2 tasks done

Feature Request: Include folder without being installed #2513

msiemens opened this issue Jun 6, 2020 · 3 comments
Labels
kind/feature Feature requests/implementations

Comments

@msiemens
Copy link

msiemens commented Jun 6, 2020

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

I'd like to include tests in my project within the distributed source distribution. But of course I don't want the tests to be installed as a package.

My project layout is like this:

- project_name
- tests

When I set includes = ['tests/*'], the tests will be installed as a package. This is due to the generated setup.py file containing:

package_data = \
{'': ['*']}

This means that all Python packages are installed which includes the tests folder. But I want to include the tests in the source package WITHOUT them being installed.

@JWCook
Copy link

JWCook commented May 9, 2021

I was trying to figure this out as well, and I think this works the way you want if you use include instead of packages. Also,
the per-format packages support added in #1133 appears to also apply to include, although I don't see that in the docs.

include = [
    { path = "tests", format = "sdist" }
]

I noticed this in poetry's own pyproject.toml, recently updated in #4007.

@finswimmer
Copy link
Member

Works exactly as @JWCook said 👍

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

4 participants