I'm trying to create a package with with a data file, but it's not working.
My setup.cfg (per link) is below.
[metadata]
name = my_package
version = 1.0.0
description = My package description
author = John Henckel
author_email = henckel.jonathan@mayo.edu
url = http://example.com
keywords = one, two
license = BSD 3-Clause License
classifiers =
Framework :: Django
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
[options]
include_package_data = True
packages = find:
[options.package_data]
* = *.txt
and the directory structure of my project is...
LICENSE
pyproject.toml
README.md
setup.cfg
my_package
hello.txt
__init__.py
and I typed...
python -m build --sdist
tar -vtf dist/my_package-1.0.0.tar.gz
and the output, as you can see does not contain the hello.txt
. WHY NOT!??
drwxrwxrwx 0 0 0 0 Oct 22 17:28 my_package-1.0.0/
-rw-rw-rw- 0 0 0 48 Oct 22 17:24 my_package-1.0.0/LICENSE
-rw-rw-rw- 0 0 0 474 Oct 22 17:28 my_package-1.0.0/PKG-INFO
-rw-rw-rw- 0 0 0 29 Oct 22 17:24 my_package-1.0.0/README.md
drwxrwxrwx 0 0 0 0 Oct 22 17:28 my_package-1.0.0/my_package/
-rw-rw-rw- 0 0 0 0 Oct 22 17:24 my_package-1.0.0/my_package/__init__.py
drwxrwxrwx 0 0 0 0 Oct 22 17:28 my_package-1.0.0/my_package.egg-info/
-rw-rw-rw- 0 0 0 474 Oct 22 17:28 my_package-1.0.0/my_package.egg-info/PKG-INFO
-rw-rw-rw- 0 0 0 201 Oct 22 17:28 my_package-1.0.0/my_package.egg-info/SOURCES.txt
-rw-rw-rw- 0 0 0 1 Oct 22 17:28 my_package-1.0.0/my_package.egg-info/dependency_links.txt
-rw-rw-rw- 0 0 0 11 Oct 22 17:28 my_package-1.0.0/my_package.egg-info/top_level.txt
-rw-rw-rw- 0 0 0 108 Oct 01 13:52 my_package-1.0.0/pyproject.toml
-rw-rw-rw- 0 0 0 528 Oct 22 17:28 my_package-1.0.0/setup.cfg