Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Nov 15, 2025

From Controlling files in the distribution:

For the most common use cases, setuptools will automatically find out which files are necessary for distributing the package. More precisely, the following files are included in a source distribution by default:

  • All files specified by the license-files configuration parameter in pyproject.toml [...]; note that if you don’t explicitly set this parameter, setuptools will include any files that match the following glob patterns: LICEN[CS]E*, COPYING*, NOTICE*, AUTHORS**;
  • pyproject.toml;
  • setup.py;
  • README, README.txt, README.rst or README.md;
  • MANIFEST.in

Source distributions should include tests:

recursive-exclude distributed **/tests/*

See Provide complete source distributions in the Python Packaging User Guide:

Ideally, a source distribution archive published on PyPI should include all the files from the package’s Git repository that are necessary to build the package itself, run its test suite, build and install its documentation, and any other files that may be useful to end users, such as shell completions, editor support files, and so on.

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the MANIFET.in branch 3 times, most recently from caac852 to 81b2c82 Compare November 15, 2025 10:25
@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2025

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ±0      27 suites  ±0   9h 52m 40s ⏱️ - 3m 48s
 4 112 tests ±0   4 007 ✅ +3    104 💤 ±0  1 ❌  - 3 
51 516 runs  ±0  49 330 ✅ +2  2 185 💤 +1  1 ❌  - 3 

For more details on these failures, see this check.

Results for commit 1295c2f. ± Comparison against base commit 0771baa.

♻️ This comment has been updated with latest results.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but has conflicts

@DimitriPapadopoulos
Copy link
Contributor Author

Rebased.

@DimitriPapadopoulos
Copy link
Contributor Author

Is it OK to remove this line?

recursive-exclude distributed **/tests/*

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Nov 19, 2025

Not sure, we dont want to ship tests

@DimitriPapadopoulos
Copy link
Contributor Author

It is often (but not always) recommended shipping tests in sources distributions:

  • Python Packaging User Guide

    With that being said, there are still important differences between sdists and wheels, even for pure Python projects. Wheels are meant to contain exactly what is to be installed, and nothing more. In particular, wheels should never include tests and documentation, while sdists commonly do.

  • Setuptools documentation

    More precisely, the following files are included in a source distribution by default:
    [...]

    • Files that match the following glob patterns: tests/test*.py, test/test*.py;
  • Should sdists include docs and tests?

It's not compulsory, of course.

File setup.py was removed by dask#9137 / ca5a56f.
For the most common use cases, setuptools will automatically
find out which files are necessary for distributing the package.
The following files are included in a source distribution by default:
- All files specified by the license-files configuration parameter
  in pyproject.toml; note that if you don’t explicitly set this
  parameter, setuptools will include any files that match the
  following glob patterns: LICEN[CS]E*, COPYING*, NOTICE*, AUTHORS**;
- pyproject.toml;
- setup.py;
- README, README.txt, README.rst or README.md;
- MANIFEST.in

https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
Added in version v69.0.0: setuptools will attempt to include type
information files by default in the distribution (.pyi and py.typed,
as specified in PEP 561), as long as they are contained inside of
a package directory (for the time being there is no automatic
support for top-level .pyi files).

https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
Remove files related to CI from source distribution.
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

Successfully merging this pull request may close these issues.

2 participants