Bug 1808601 - tox dependency generator cannot handle deps read in from a text file
Summary: tox dependency generator cannot handle deps read in from a text file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyproject-rpm-macros
Version: 32
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-28 22:34 UTC by Adam Williamson
Modified: 2020-03-16 20:34 UTC (History)
5 users (show)

Fixed In Version: pyproject-rpm-macros-0-13.fc30 pyproject-rpm-macros-0-13.fc31 pyproject-rpm-macros-0-13.fc32
Clone Of:
Environment:
Last Closed: 2020-03-14 00:25:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-python tox-current-env issues 22 0 None open print-deps-only: handle recursive deps (from files, e.g. -rrequirements.txt) 2020-03-05 12:31:17 UTC

Description Adam Williamson 2020-02-28 22:34:46 UTC
If your tox.ini looks like this:

deps =
    -r{toxinidir}/install.requires
    -r{toxinidir}/tests.requires

then the pyproject tox deps generator won't work:

Handling -r/builddir/build/BUILD/openqa_client-4.0.0.dev0/install.requires from tox --print-deps-only: py38
WARNING: Skipping invalid requirement: -r/builddir/build/BUILD/openqa_client-4.0.0.dev0/install.requires
    Parse error at "'-r/build'": Expected W:(abcd...)
Handling -r/builddir/build/BUILD/openqa_client-4.0.0.dev0/tests.requires from tox --print-deps-only: py38
WARNING: Skipping invalid requirement: -r/builddir/build/BUILD/openqa_client-4.0.0.dev0/tests.requires
    Parse error at "'-r/build'": Expected W:(abcd...)

Comment 1 Miro Hrončok 2020-02-28 22:49:29 UTC
Thanks for the report. Technically, https://github.com/fedora-python/tox-current-env cannot (yet) handle that. It prints out venv.get_resolved_dependencies() from tox. I wonder if what you do works in pure tox by accident or by design - if it is design, maybe get_resolved_dependencies() should open the files instead of passing it as arguments to pip?

Comment 2 Adam Williamson 2020-02-28 23:02:30 UTC
I've seen it used quite widely, and it's in the official docs (though marked as "New in version 1.6.1. (experimental)": https://tox.readthedocs.io/en/latest/example/basic.html#depending-on-requirements-txt-or-defining-constraints

Comment 3 Miro Hrončok 2020-02-28 23:14:01 UTC
Ok, so the docs say "This is actually a side effect that all elements of the dependency list is directly passed to pip."

I've opened https://github.com/fedora-python/tox-current-env/issues/22

Comment 4 Miro Hrončok 2020-03-02 10:32:05 UTC
Given where https://github.com/fedora-python/tox-current-env/issues/22 is going, I'll try to fix this form the macros.

Comment 6 Fedora Update System 2020-03-06 10:58:11 UTC
FEDORA-2020-901bee4b70 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-901bee4b70

Comment 7 Fedora Update System 2020-03-06 10:58:17 UTC
FEDORA-2020-f0b861e528 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f0b861e528

Comment 8 Fedora Update System 2020-03-06 20:23:33 UTC
pyproject-rpm-macros-0-13.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-901bee4b70

Comment 9 Fedora Update System 2020-03-06 21:58:59 UTC
pyproject-rpm-macros-0-13.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b82d2975cf

Comment 10 Fedora Update System 2020-03-06 22:07:03 UTC
pyproject-rpm-macros-0-13.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f0b861e528

Comment 11 Fedora Update System 2020-03-14 00:25:03 UTC
pyproject-rpm-macros-0-13.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2020-03-14 00:37:13 UTC
pyproject-rpm-macros-0-13.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2020-03-16 20:34:46 UTC
pyproject-rpm-macros-0-13.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.