arrayfire / arrayfire-python

Python bindings for ArrayFire: A general purpose GPU library.

Home Page:https://arrayfire.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

do not create root-level "tests" package

joelb123 opened this issue · comments

Merge pull request #211 moved the tests/ directory from arrayfire.tests to the root, resulting in installation of a root-level python package called "tests". While pip will happily make this in your virtualenv, every sane package manager will complain. Most python coders consider it surprising and therefore bad design for "pip install mypackage" to create another top-level package other than "mypackage". It's even worse to make a top-level package with a common name like "tests", which just asks for conflicts. Please back this commit out.

commented

Hello. tests/ dir creation is a bug, because I forgot to add include option in metatag [options.packages.find] in setup.cfg. I'll add another PR to fix this bug ASAP.
And as for the tests in the root, this is a bad practice to keep tests/ within your lib. You will install them every time with your package, but you don't need them. It's okay to keep tests for OS integration or something, but these tests are just simple tests of base functionality.
Also, I didn't get what do you mean by sane package manager 🤔

commented

Try to run python setup.py build in PR #214 branch. tests/ dir should not be created now.

@joelb123 Looks like @roaffix fixed this behavior in #214 . Can you please confirm this isn't happening per your test.

Interesting that current master has tests in exclude list of setup.cfg and yet this happened.