this post was submitted on 27 Jan 2025
14 points (100.0% liked)

Python

6618 readers
10 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
14
submitted 1 week ago* (last edited 1 week ago) by logging_strict to c/python
 

From helping other projects have run across a fundamental issue which web searches have not given appropriate answers.

What should go in a tarball and what should not?

Is it only the build files, python code, and package data and nothing else?

Should it include tests/ folder?

Should it include development and configuration files?

Have seven published packages which include almost all the files and folders. Including:

.gitignore,

.gitattributes,

.github folder tree,

docs/,

tests/,

Makefile,

all config files,

all tox files,

pre-commit config file

My thinking is that the tarball should have everything needed to maintain the package, but this belief has been challenged. That the tarball is not appropriate for that.

Thoughts?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 1 week ago* (last edited 1 week ago) (1 children)

If your talking about a source distribution archive, generally it is the project in the 'distclean' state. This is decribed in GNU documentation. I think for GNU Make. Not sure if the git specific files should technically be included but maybe these days they should. The 'distclean' state is generally the same code as from the VCS tree but with hard to build files pre-built but probably not platform specific files. The 'maintainerclean' state is basically the clean VCS snapshot nothing pre-built.

Edit: The reason to prebuild some not platform specific files is to minimize the tools needed for installing from source.

[โ€“] logging_strict 1 points 1 week ago* (last edited 1 week ago)

Thank you. Took me awhile to internalize your very generous and detailed advice

target spelling correction: maintainerclean --> maintainer-clean

Here is the docs covering the topic

GNU Make standard targets

Actions taken

  1. In Makefile, separate GNU Make standard targets from other target categories

  2. Rename make coverage --> make check. This would require including tests/ in tarball

  3. Consider creating targets distclean and maintainer-clean

  4. In MANIFEST.in, remove git related files: .gitignore, .github/**/*

  5. Removed config files: codecov.yml, .readthedocs.yml