[Rpm-maint] [rpm-software-management/rpm] DynamicBuildRequires: error: Dependency tokens must begin with alpha-numeric, '_' or '/': [last line of spec] (#801)

Miro Hrončok notifications at github.com
Sat Jul 27 11:02:14 UTC 2019


Here is a somewhat weird error with dynamic buildrequires on Fedora 31. The reproducer is a bit complicated, sorry about that.

1. Install mock that knows how to loop over DynamicBuildRequires - you can build it from here: https://src.fedoraproject.org/rpms/mock/pull-request/8 ([rawhide scratchbuild](https://koji.fedoraproject.org/koji/taskinfo?taskID=36608730), [f30 scratchbuild](https://koji.fedoraproject.org/koji/taskinfo?taskID=36608769))

2. Download or build a fixed version of python-tox-current-env from https://src.fedoraproject.org/fork/churchyard/rpms/python-tox-current-env/tree/pr-7-10 ([rawhide scratchbuild](https://koji.fedoraproject.org/koji/taskinfo?taskID=36608782))

3. Download [pyproject-rpm-macros-0-4.fc31](https://koji.fedoraproject.org/koji/buildinfo?buildID=1336950) (only in the f31-rebuild tag for now)

4. Initialize Fedora rawhide mock, install packages from steps 2 (python3-tox-current-env) and 3 (pyproject-rpm-macros)

5. Build this spec file in mock (get sources from the Source URL):

```spec
%global pypi_name pluggy
Name:           python-%{pypi_name}
Version:        0.12.0
Release:        1%{?dist}
Summary:        The plugin manager stripped of pytest specific details

License:        MIT
URL:            https://github.com/pytest-dev/pluggy
Source0:        %{pypi_source}

BuildArch:      noarch
BuildRequires:  pyproject-rpm-macros

%description
%{summary}.


%package -n python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
%{summary}.


%prep
%autosetup -p1 -n %{pypi_name}-%{version}


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install


%check
%tox


%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/

```

The build.log has:

```
error: line 50: Dependency tokens must begin with alpha-numeric, '_' or '/': /usr/lib/python3.7/site-packages/pluggy-0.12.0.dist-info/

error: line 50: Dependency tokens must begin with alpha-numeric, '_' or '/': /usr/lib/python3.7/site-packages/pluggy-0.12.0.dist-info/

error: line 50: Dependency tokens must begin with alpha-numeric, '_' or '/': /usr/lib/python3.7/site-packages/pluggy-0.12.0.dist-info/

error: line 50: Dependency tokens must begin with alpha-numeric, '_' or '/': /usr/lib/python3.7/site-packages/pluggy-0.12.0.dist-info/

```

In the last run of `%generate_buildrequires` before it goes to `%build`. The errors seem to be nonfatal. The `/usr/lib/python3.7/site-packages/pluggy-0.12.0.dist-info/` line is the last line of spec (expanded).


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/801
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190727/a8a48776/attachment.html>


More information about the Rpm-maint mailing list