Closed kloczek closed 3 years ago
Correct: the tests are not included in the distribution, so to run them you need to use a source checkout. This is intentional and is unlikely to change.
But I'm not using sdist tar ball.
I suspect "setup.py install --root </install/prefix>" is having the same effect. The CircleCI run does a pip install -e .[dev]
from a source checkout, and the tests are run from within the source checkout.
If you want the same behaviour, please use the same methods.
If you want to use a different set of methods, then I'm afraid you'll need to figure out why it's not working for you.
Issue is that in your CI looks like you are doing everything from root in /usr/local when I need to do that from non-root account in </install/prefix>
to be able use that base directory to collect all files to assemble at the end package.
To be honest I have art the moment almost 600 packaged modules and I see first-time ever module which (so far) is not possible to build, install and test from non root account. I'm using setuptools to install stuff in +99% of all those packages
[tkloczko@barrel SPECS]$ grep ^%py3_install -lw python-* | wc -l; ls -1 python-* | wc -l
582
586
and none of those packages has problems like I found in mock
BTW. setuptools build and isnstall shows some warnings
[tkloczko@barrel mock-4.0.3]$ python3 setup.py build
/usr/lib/python3.8/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
warnings.warn(
/usr/lib/python3.8/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
/usr/lib/python3.8/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
warnings.warn(
running build
running build_py
What versions are you using?
What happened? I'm trying to package your module as rpm packag. So I'm using typical in such case build, install and test cycle used on building package from non-root account:
May I ask for help because few units are failing:
On first look it looks like it fails because it cannot find
mock.tests
module which is not installed and looks likemock
test suite assumes that it will be testing not what has been installed but source tree where ismock.tests
.