Spec URL: https://chandankumar.fedorapeople.org/python-typer/python-typer.spec SRPM URL: https://chandankumar.fedorapeople.org/python-typer/python-typer-0.3.2-1.fc33.src.rpm Description: Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python 3.6+ type hints. Fedora Account System Username: chandankumar
I tried doing scratch build here: https://kojipkgs.fedoraproject.org//work/tasks/9403/64259403/root.log But the build is failing: DEBUG util.py:444: Error: DEBUG util.py:444: Problem: nothing provides requested (python3dist(flit-core) < 3 with python3dist(flit-core) >= 2) DEBUG util.py:446: (try to add '--skip-broken' to skip uninstallable packages) I am new to pyproject toml macro part. Any help would be appreciated.
This is an unofficial review: Local mock build fails because of: + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 Import error: No module named 'toml' Rpmbuild fails: ModuleNotFoundError: No module named 'flit_core' Build in Koji fails because of same: > Problem: nothing provides requested (python3dist(flit-core) < 3 with python3dist(flit-core) >= 2) and python-flit is not built for F35: https://src.fedoraproject.org/rpms/python-flit Probably worth to fill a bug. .github, .gitignore and .coveragerc are not necessary and can be removed from RPM package. docs_src can be dropped if we have docs already in place
Thanks Sagi for pointing to this package review. I nowadays only review when someone asks me. I found this package as good opportunity to learn more about pyproject macros. When build fails which says about "nothing provides" there can be 2 things 1) package is available but not added as BuildRequires: in spec 2) Package is not available in Fedora then you need to package that also. In above error, we have package python3-flit-core in Fedora but requirements are not satisfying as Fedora's python-flit-core package moved to recent release which is > 3 version I think this can be adjusted by editing toml file as sed -i 's/2,<3/2/g' pyproject.toml I had a look into this package to learn more about pyproject macros. This package is missing below line along with that some missing test execution BR:'s and usage of %pytest %pyproject_save_files typer There are 2 tests which are still failing =================================== FAILURES =================================== _____________________________ test_show_completion _____________________________ def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING": "True"}, ) > assert "_TUTORIAL001.PY_COMPLETE=complete_bash" in result.stdout E AssertionError: assert '_TUTORIAL001.PY_COMPLETE=complete_bash' in '' E + where '' = CompletedProcess(args=['bash', '-c', '/usr/bin/python3 -m coverage run /builddir/build/BUILD/typer-0.3.2/docs_src/first_steps/tutorial001.py --show-completion'], returncode=1, stdout='', stderr='Shell sh not supported.\n').stdout tests/test_completion/test_completion.py:21: AssertionError ___________________________ test_install_completion ____________________________ def test_install_completion(): bash_completion_path: Path = Path.home() / ".bashrc" text = "" if bash_completion_path.is_file(): # pragma: nocover text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING": "True"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) > assert "source" in new_text E assert 'source' in '# .bashrc\n\n# Source global definitions\nif [ -f /etc/bashrc ]; then\n\t. /etc/bashrc\nfi\n\n# User specific environ...c.d ]; then\n\tfor rc in ~/.bashrc.d/*; do\n\t\tif [ -f "$rc" ]; then\n\t\t\t. "$rc"\n\t\tfi\n\tdone\nfi\n\nunset rc\n' tests/test_completion/test_completion.py:42: AssertionError ================================================================ Good to report that to upstream about its failure I think the working SPEC for this package is https://paste.centos.org/view/c75bbef1 Fedora services are down, hence SPEC is added as paste URL.
Hi Chandan, Can you provide updated SRPM and SPEC for further review here?
I recently submitted this package for review (https://bugzilla.redhat.com/show_bug.cgi?id=1964742) without noticing this existing review request. My spec file is able to pass review, but your review request came first. There are several possible options: 1. If you want to continue with the review, using your spec file and fixing the issues found in the package review, I am happy to withdraw my review request and close it as a duplicate. I can help you resolve any issues, as I’ve already worked through them once. 2. If you want to continue with your review request, but you want to simply copy my spec file, please feel free to do so. I can co-maintain too if you like. 3. If you have changed your mind about finishing this package review, you can close the issue as WONTFIX and I will proceed with mine instead. Please respond with what you want to do, so that one or the other of us can get this package into Fedora. Thanks!
> There are 2 tests which are still failing > […] > Good to report that to upstream about its failure From my spec file: > # Shell completion tests need us to be running under a supported shell, i.e. > # bash rather than sh. Unfortunately, shell detection with shellingham is so > # thorough we cannot fool it by any combination of: > # - export SHELL=/bin/bash > # - bash -c '%%pytest' > # - %%check -p /bin/bash > # so we must simply skip the affected tests. > %pytest -k 'not test_show_completion and not test_install_completion' That is, these tests are not exactly “broken,” but they are sensitive to the user’s login shell, so they are brittle. They work in upstream CI, but they won’t work in mock/koji where the login shell is “sh”.
Thanks Ben for packaging it, I was on a long vacation. So delay in reply. Please go ahead with your package review bug for python-typer. I will close this one as a WONTFIX.
Thanks for following up! I have marked this issue as a duplicate to connect the two review requests. *** This bug has been marked as a duplicate of bug 1964742 ***