Skip to content

Commit

Permalink
Don't package tests directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Brian Campbell committed Sep 11, 2024
1 parent 62ce3fa commit 9fe8447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
)

0 comments on commit 9fe8447

Please sign in to comment.