On 24. 07. 21 21:53, Robert-André Mauchin wrote:
Hi,
I'm trying to convert one of my Python package to the new guidelines.
With the former guidelines, it had the following BR:
BuildRequires: python3-devel
BuildRequires: python3dist(click)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(setuptools)
However when converting to the new guidelines, I'm encountering the
following the following error:
Handling wheel from get_requires_for_build_wheel
Requirement satisfied: wheel
(installed: wheel 0.36.2)
Handling tox-current-env >= 0.0.6 from tox itself
Requirement satisfied: tox-current-env >= 0.0.6
(installed: tox-current-env 0.0.6)
ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found
This only happens when you use use %pyproject_buildrequires -t (or -e...).
You should ask yourself the following questions:
- does upstream use tox at all?
- is the source tarball missing some files?
There is a setup.cfg, but there is no dependency specified anywhere
in it. The deps are specified in the setup.py but don't seem to be detected:
https://github.com/click-contrib/click-default-group/blob/master/setup.py
Is there any workaround for this situation? Should I write my own pyproject.toml
in %prep?
Workaround is not use %pyproject_buildrequires -t / -e, but specify test
dependencies somehow differently. I would use the following, in this order:
- an extra for test deps, e.g. %pyproject_buildrequires -x testing
- test deps from file, e.g. %pyproject_buildrequires requirements/tests.txt
- manual BuildRequires
Hope that helps.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok