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

Docs and tests are installed #356

Open
dvzrv opened this issue Dec 28, 2022 · 5 comments
Open

Docs and tests are installed #356

dvzrv opened this issue Dec 28, 2022 · 5 comments
Milestone

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Dec 28, 2022

Hi! I package this project for Arch Linux! :)

The documentation and test directories/files (docs/, gqa/, tests/) are all installed to the target system when building this project and installing it.
The docs directory and tests are not required during runtime though and should only be contained in the sdist tarball, but not be installed to the target system.

@pepoluan
Copy link
Collaborator

pepoluan commented Dec 28, 2022

I'll try to see what I can do.

It has been that way since, uh, a long long time ago...

Edit: Hmmm... this is difficult ... MANIFEST.in specifies only files to go into sdist, but for wheel, it's a different matter altogether ...

This might need to be delayed to 1.5.0. I don't think the changes can make it for 1.4.4.

@pepoluan
Copy link
Collaborator

The easiest way out is to just exclude all the dirs docs/, qa/, testing/, and tests/ from both the sdist and the wheel.

@dvzrv
Copy link
Contributor Author

dvzrv commented Dec 28, 2022 via email

@pepoluan
Copy link
Collaborator

That would not be good, as we do use the tests.

Understood. Will not touch the sdist then.

The setup.cfg should allow you to exclude directories from the to be installed files: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

I will do some study. I have a branch in which we're migrating to pyproject.toml.

@pepoluan pepoluan added this to the 1.5 milestone Jan 13, 2023
@pepoluan
Copy link
Collaborator

I wonder if adding the following to pyproject.toml will be enough:

[tool.setuptools.exclude-package-data]
aiosmtpd = [
    "docs/*",
    "qa/*",
    "testing/*",
    "tests/*",
]

of course this will be done only after PR #363 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants