From 9fe8447d6d130ef5e03f882f30753a8ec2e72dcb Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Wed, 11 Sep 2024 16:03:16 -0400 Subject: [PATCH 1/2] Don't package tests directory The `setuptools.find_packages` command will by default find all Python packages starting at the root directory, which in this case includes the `tests` directory. That means that a `tests` package gets installed into your `site-packages` when you install this. That can then cause problems if a user is using `pytest --import-mode=append tests` in order to test an installed version of a package that they are working on that depends on `polarion`, as that will put the users `tests` directory at the end of `sys.path`, and instead the installed `polarion` package tests directory will be searched. I don't believe there is any reason to ship the tests with the package, so limit the included packages to only include what is necessary when building the package. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b05f78f..f03767d 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,6 @@ "Development Status :: 3 - Alpha" ], install_requires=["zeep", "lxml", "texttable"], - packages=setuptools.find_packages(), + packages=setuptools.find_packages(include=["polarion"]), python_requires='>=3.7', ) From f3e7c51194e9c929834edd021e01ba78131bcbc4 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Wed, 11 Sep 2024 17:30:42 -0400 Subject: [PATCH 2/2] Use polarion* to also include sub-packages like `base` --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f03767d..39ed6fc 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,6 @@ "Development Status :: 3 - Alpha" ], install_requires=["zeep", "lxml", "texttable"], - packages=setuptools.find_packages(include=["polarion"]), + packages=setuptools.find_packages(include=["polarion*"]), python_requires='>=3.7', )