aio-libs / aiosmtpd

A reimplementation of the Python stdlib smtpd.py based on asyncio.
https://aiosmtpd.aio-libs.org
Apache License 2.0
313 stars 95 forks source link

Docs and tests are installed #356

Open dvzrv opened 1 year ago

dvzrv commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

dvzrv commented 1 year ago

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

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

-------- Original Message -------- From: Pandu E POLUAN @.> Sent: December 28, 2022 1:53:23 PM GMT+01:00 To: aio-libs/aiosmtpd @.> Cc: David Runge @.>, Author @.> Subject: Re: [aio-libs/aiosmtpd] Docs and tests are installed (Issue #356)

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

-- https://sleepmap.de

pepoluan commented 1 year ago

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 commented 1 year ago

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.