Skip to content
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

sdist on PyPi does not contain enough of the test suite #183

Open
s-t-e-v-e-n-k opened this issue Dec 18, 2024 · 2 comments
Open

sdist on PyPi does not contain enough of the test suite #183

s-t-e-v-e-n-k opened this issue Dec 18, 2024 · 2 comments

Comments

@s-t-e-v-e-n-k
Copy link

s-t-e-v-e-n-k commented Dec 18, 2024

Your system
openSUSE Tumbleweed
Python 3.10.16, but is irrelevant

What version of libgphoto2 have you installed? 2.5.31

How have you installed (or attempted to install) python-gphoto2? No

Your problem
The sdist as posted to PyPi has the test files included, but not enough of them to run the test suite succesfully:

% tar ztf gphoto2-2.5.1.tar.gz | grep tests
gphoto2-2.5.1/tests/
gphoto2-2.5.1/tests/test_abilities_list.py
gphoto2-2.5.1/tests/test_camera.py
gphoto2-2.5.1/tests/test_context.py
gphoto2-2.5.1/tests/test_file.py
gphoto2-2.5.1/tests/test_filesys.py
gphoto2-2.5.1/tests/test_list.py
gphoto2-2.5.1/tests/test_port.py
gphoto2-2.5.1/tests/test_port_info_list.py
gphoto2-2.5.1/tests/test_port_log.py
gphoto2-2.5.1/tests/test_result.py
gphoto2-2.5.1/tests/test_version.py
gphoto2-2.5.1/tests/test_widget.py

Which gives:

[   53s] ============================= test session starts ==============================
[   53s] platform linux -- Python 3.10.16, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.10
[   53s] cachedir: .pytest_cache
[   53s] rootdir: /home/abuild/rpmbuild/BUILD/gphoto2-2.5.1
[   53s] configfile: pyproject.toml
[   53s] collecting ... collected 10 items / 7 errors
[   53s]
[   53s] ==================================== ERRORS ====================================
[   53s] ________________ ERROR collecting tests/test_abilities_list.py _________________
[   53s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/gphoto2-2.5.1/tests/test_abilities_list.py'.
[   53s] Hint: make sure your test modules/packages have valid Python names.
[   53s] Traceback:
[   53s] /usr/lib64/python3.10/importlib/__init__.py:126: in import_module
[   53s]     return _bootstrap._gcd_import(name[level:], package, level)
[   53s] tests/test_abilities_list.py:30: in <module>
[   53s]     from tests.vcamera import has_vcam, use_vcam
[   53s] E   ModuleNotFoundError: No module named 'tests.vcamera'

This doesn't include the non test files or the data directory either. I can push up a PR to sort that out in MANIFEST.in if you wish.

@jim-easterbrook
Copy link
Owner

I never intended to include any of the test files in the PyPI distribution. That should contain only what's needed to install python-gphoto2. I can't change the files already on PyPI but I'll sort it out before the next release.

@s-t-e-v-e-n-k
Copy link
Author

That also works, thanks!

jim-easterbrook added a commit that referenced this issue Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants