Failure to build wheel due to missing file. #3748
-
While changing from setup.py to pyproject.toml I encountered an error where files cannot be found while building the wheel. Have I missed a configuration option or is it something else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Maybe include it through |
Beta Was this translation helpful? Give feedback.
-
Hi @NeonFlames I suggest the following changes in the code base: --- a/pyproject.toml
+++ b/pyproject.toml
@@ -37,11 +37,10 @@ tuxemon = "tuxemon.__main__:main"
include-package-data = true
[tool.setuptools.packages.find]
-where = [""]
+where = ["."]
include = ["tuxemon*"]
[tool.setuptools.dynamic]
-version = {attr = "setup.get_version"}
dependencies = {file = "requirements.txt"}
[tool.black]
diff --git a/setup.py b/setup.py
index a55ea254..fce63d92 100644
--- a/setup.py
+++ b/setup.py
@@ -8,4 +8,4 @@ def get_version():
# Configure setuptools
-setup()
+setup(version=get_version()) Please note that You cannot provide a function, since setuptools will not execute the function before using it. See note 4 on docs. I believe that is what was confusing the build process (I imagine it was getting somethings wrong and not creating the necessary folders before trying to copy the files). Please also consider the points brought up by webknjaz: if you have non-Python files in your repo, it is important to use either |
Beta Was this translation helpful? Give feedback.
Hi @NeonFlames I suggest the following changes in the code base:
Please note that
version = {attr = ...}
will get a value by reading an attribute from a module and…