#2 Populate .egg-info with some real metadata
Merged 2 years ago by ellert. Opened 2 years ago by churchyard.
rpms/ churchyard/pythia8 egg-info  into  rawhide

file modified
+10 -4
@@ -7,7 +7,7 @@ 

  

  Name:		pythia8

  Version:	8.3.03

- Release:	1%{?dist}

+ Release:	2%{?dist}

  Summary:	Pythia Event Generator for High Energy Physics

  

  License:	GPLv2+
@@ -173,19 +173,22 @@ 

  mkdir -p %{buildroot}%{python2_sitearch}

  mv %{buildroot}%{_libdir}/pythia8$(%{__python2}-config --extension-suffix) \

  	%{buildroot}%{python2_sitearch}

- touch %{buildroot}%{python2_sitearch}/%{name}-%{version}.egg-info

+ echo 'Name: %{name}' > %{buildroot}%{python2_sitearch}/%{name}-%{version}.egg-info

+ echo 'Version: %{version}' >> %{buildroot}%{python2_sitearch}/%{name}-%{version}.egg-info

  %endif

  

  mkdir -p %{buildroot}%{python3_sitearch}

  mv %{buildroot}%{_libdir}/pythia8$(%{__python3}-config --extension-suffix) \

  	%{buildroot}%{python3_sitearch}

- touch %{buildroot}%{python3_sitearch}/%{name}-%{version}.egg-info

+ echo 'Name: %{name}' > %{buildroot}%{python3_sitearch}/%{name}-%{version}.egg-info

+ echo 'Version: %{version}' >> %{buildroot}%{python3_sitearch}/%{name}-%{version}.egg-info

  

  %if %{?rhel}%{!?rhel:0} == 7

  mkdir -p %{buildroot}%{python3_other_sitearch}

  mv %{buildroot}%{_libdir}/pythia8$(%{__python3_other}-config --extension-suffix) \

  	%{buildroot}%{python3_other_sitearch}

- touch %{buildroot}%{python3_other_sitearch}/%{name}-%{version}.egg-info

+ echo 'Name: %{name}' > %{buildroot}%{python3_other_sitearch}/%{name}-%{version}.egg-info

+ echo 'Version: %{version}' >> %{buildroot}%{python3_other_sitearch}/%{name}-%{version}.egg-info

  %endif

  

  %ldconfig_scriptlets
@@ -239,6 +242,9 @@ 

  %license COPYING

  

  %changelog

+ * Mon May 31 2021 Miro Hrončok <mhroncok@redhat.com> - 8.3.03-2

+ - Populate .egg-info with some real metadata

+ 

  * Sun Feb 14 2021 Mattias Ellert <mattias.ellert@physics.uu.se> - 8.3.03-1

  - Update to version 8.3.03

  

An empty egg-info file is not good enough for our Python RPM generators.

Alternate approach: https://src.fedoraproject.org/rpms/pythia8/pull-request/1

Has something changed? This worked fine until now.
The name and version being parsed from the egg-info filename used to be sufficient.

Yes indeed, we changed the implementation from pkg_resources to importlib.metadata 3 months ago in https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/30 and one of the changes was that is actually reads the metadata from the egg-info file instead of trusting the name.

pythia8 was not flagged during the impact check, presumably because it failed to build at that time.

Note that this also affects Fedora 34.

Now we are changing the generators to fail the build when there is a problem and the impact check caught pythia8.

Personal note: I don't think pythia8 should do this in the first place, hence I've opened https://src.fedoraproject.org/rpms/pythia8/pull-request/1 as well. However, since I don't want to push my personal opinions, this PR gets the job done for what was intended here.

Pull-Request has been merged by ellert

2 years ago
Metadata