-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude test and docs from package #378
Conversation
Thank you for the report; indeed this is problematic, and I can confirm the issue with However, after re-reading setuptools documentation about automatic discovery, I wonder if we shouldn't just remove the diff --git a/pyproject.toml b/pyproject.toml
index c67455f..2fbf803 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -79,9 +79,6 @@ Homepage = "https://github.com/dalibo/pg_activity"
[tool.setuptools.dynamic]
version = { attr = "pgactivity.__version__" }
-[tool.setuptools.packages.find]
-where = ["."]
-
[tool.black]
line-length = 88
include = '\.pyi?$' Can you try if that works for you? |
It fails with:
|
Where does this |
It's created by Fedora's build system:
You can check a full log here: |
Ok; can you try that? diff --git a/pyproject.toml b/pyproject.toml
index c67455f..5c7fbcc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -79,8 +79,8 @@ Homepage = "https://github.com/dalibo/pg_activity"
[tool.setuptools.dynamic]
version = { attr = "pgactivity.__version__" }
-[tool.setuptools.packages.find]
-where = ["."]
+[tool.setuptools]
+packages = ["pgactivity"]
[tool.black]
line-length = 88 (Last resort attempt; I'd rather be explicit on what to include than listing what should be excluded.) |
Fails:
I pushed a new change using include rather than excluding. It works for me. |
The message is about the toml file being invalid because it contains a duplicated |
Sorry, you're right, did not realize about Works fine with your proposal. I updated the PR with that change, but as solution was yours feel free to close this and push a patch in your name. |
Automatic discovery, a.k.a. `packages.find` option, requires some tweak on include/exclude so only required files are installed. Declaring `packages` directly simplifies this by just adding the required package.
Just published version 3.4.2 including this change. Thank you. |
I've reported this at rpm-software-management/rpm#2532 |
After the migration to
pyproject.toml
done in 3.4.0, creating the package for Fedora fails with the following error:Those files were not installed before 3.4.0 and are missing the
pgactivity
package name.Excluding
tests
anddocs
package can be built again.