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?

  • flatbield@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    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.

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    I do the same. The exception is test data, which sometimes is too large to not dominate the sdist size, so I choose to not include it.

  • flatbield@beehaw.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    By the way. The only files you mentioned I am less sure about are configs. Specifically if these configs are system specific, probaby only examples or templates should be included but the configs should be built by the build process on the target system.

    Edit: It should contain tests. Running some equivalent to ‘make check’ on the target system is pretty standard.

    Edit: Not sure what .github folder tree file contains so cannot say.