# Same program - different names - one builds - the other fails

**URL:** <https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881>\
**Category:** Packaging\
**Tags:** setuptools\
**Created:** [September 3, 2026, 7:16pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881 "2026-09-03T19:16:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aendie](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/aendie/32/37298_2.png) [@aendie](https://discuss.python.org/u/aendie)\
**Post date:** [September 3, 2026, 7:16pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881/1 "2026-09-03T19:16:59Z")

</div>

I have two _identical_ programs, except for their name: **sfalmanac** and **skyalmanac** (both in PyPI).

Historically, I once needed different program logic, which is no longer necessary.  
For a while I will maintain the two, then retire sfalmanac.

Up to now I used **setup.cfg** and both builds worked flawlessly. I decided try the new method using only a **pyproject.toml** file. After a while I implemented a ‘ **src** ’ parent folder and figured the rest out.

Both programs **are identical** in logic and structure. I built sfalmanac first - with success. However the skyalmanac build ALWAYS excludes the data files in the ‘ **src/skyalmanac/lib/astro-data** ’ folder while ‘ **Building sdist…** ’ during **python -m build**. It has nothing to do with file/folder permissions. It’s on the same PC running Windows 11.

setuptools is 84.0.0; build is 1.6.0; wheel is 0.48.0.

I’ll try and log this error under setuptools - hoping that’s correct.  
Does anyone have an explanation for this utterly confusing illogical behavior?

The build that works uses this:

```python
[build-system]
requires = [
"setuptools >= 80.0.0",
"wheel"
]
build-backend = "setuptools.build_meta"

[project]
name = "sfalmanac"
version = "1.13.2"
description = "Creates the daily pages of a Nautical Almanac using Skyfield"
readme = "README.rst"
authors = [{ name = "<Firstname Lastname>", email = "<email>" }]
license = "GPL-3.0-or-later"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: Microsoft :: Windows :: Windows 11",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Natural Language :: English",
"Intended Audience :: End Users/Desktop",
"Topic :: Scientific/Engineering :: Astronomy"
]
keywords = ["celestial-navigation", "navigation", "sailing", "sextant", "skyfield"]
dependencies = [
"scipy",
"Skyfield >=1.49",
]
requires-python = ">= 3.9"

[project.urls]
Repo = "<url>"

[tool.setuptools]
packages = ["sfalmanac", "sfalmanac.astro-data", "sfalmanac.data", "sfalmanac.docs", "sfalmanac.lib"]
package-dir = { "" = "src" }

[tool.setuptools.package-data]
sfalmanac = ["*.txt", "*.rst", "docs/*.pdf", "data/*.jpg", "data/*.png", "data/*.pdf", "astro-data/*.dat", "astro-data/*.bsp"]

```

Replace “sfalmanac” with “skyalmanac” for the build that **always fails**.  
I have replaced text within angle brackets above.

P.S. Even the **SOURCES.txt** are identical too (except for the program name).

---

<div class="post-metadata">

**Author:** ![MegaIng](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/megaing/32/16162_2.png) [@MegaIng](https://discuss.python.org/u/MegaIng)\
**Post date:** [September 3, 2026, 7:24pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881/2 "2026-09-03T19:24:05Z")

</div>

Could you also share the **exact** `pyproject.toml` file of a failing build? (Excluding private information)

Please don’t reconstruct it, just share the actual file used in a failing run.

---

<div class="post-metadata">

**Author:** ![aendie](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/aendie/32/37298_2.png) [@aendie](https://discuss.python.org/u/aendie)\
**Post date:** [September 3, 2026, 7:31pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881/3 "2026-09-03T19:31:29Z")

</div>

```python
[build-system]
requires = [
    "setuptools >= 80.0.0",
    "wheel"
]
build-backend = "setuptools.build_meta"

[project]
name = "skyalmanac"
version = "1.13.2"
description = "Creates the daily pages of a Nautical Almanac using Skyfield"
readme = "README.rst"
authors = [{ name = "Andrew Bauer", email = "aendie.bauer@gmail.com" }]
license = "GPL-3.0-or-later"
classifiers = [
	"Development Status :: 5 - Production/Stable",
	"Operating System :: Microsoft :: Windows :: Windows 11",
	"Operating System :: POSIX :: Linux",
	"Operating System :: MacOS",
    "Programming Language :: Python :: 3",
	"Natural Language :: English",
	"Intended Audience :: End Users/Desktop",
	"Topic :: Scientific/Engineering :: Astronomy"
]
keywords = ["celestial-navigation", "navigation", "sailing", "sextant", "skyfield"]
dependencies = [
    "scipy",
    "Skyfield >=1.49",
]
requires-python = ">= 3.9"

[project.urls]
Repo = "https://github.com/aendie/SkyAlmanac-Py3"

[tool.setuptools]
packages = ["skyalmanac", "skyalmanac.astro-data", "skyalmanac.data", "skyalmanac.docs", "skyalmanac.lib"]
package-dir = { "" = "src" }

[tool.setuptools.package-data]
sfalmanac = ["*.txt", "*.rst", "docs/*.pdf", "data/*.jpg", "data/*.png", "data/*.pdf", "astro-data/*.dat", "astro-data/*.bsp"]

```

Sorry, can’t upload - a \*_.toml or \*_.txt file is not authorized.

---

<div class="post-metadata">

**Author:** ![MegaIng](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/megaing/32/16162_2.png) [@MegaIng](https://discuss.python.org/u/MegaIng)\
**Post date:** [September 3, 2026, 7:33pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881/4 "2026-09-03T19:33:51Z")

</div>

You forgot to replace the package name as the key in `tool.setuptools.package-data`

---

<div class="post-metadata">

**Author:** ![aendie](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/aendie/32/37298_2.png) [@aendie](https://discuss.python.org/u/aendie)\
**Post date:** [September 3, 2026, 7:41pm UTC](https://discuss.python.org/t/same-program-different-names-one-builds-the-other-fails/108881/5 "2026-09-03T19:41:53Z")

</div>

Brilliant!

My sincere apologies - I oversaw that.

Well done!!! Thanks !!!
