diff --git a/SOURCES/macros.python-srpm b/SOURCES/macros.python-srpm index c4bdd1c..5dfee89 100644 --- a/SOURCES/macros.python-srpm +++ b/SOURCES/macros.python-srpm @@ -66,7 +66,7 @@ # Accepts zero to three arguments: # 1: The PyPI project name, defaulting to %srcname if it is defined, then # %pypi_name if it is defined, then just %name. -# 2: The PYPI version, defaulting to %version. +# 2: The PYPI version, defaulting to %version with tildes stripped. # 3: The file extension, defaulting to "tar.gz". (A period will be added # automatically.) # Requires %__pypi_url and %__pypi_default_extension to be defined. @@ -93,7 +93,7 @@ \ -- If no second argument, use %version if ver == '%2' then - ver = rpm.expand('%version') + ver = rpm.expand('%version'):gsub('~', '') end \ -- If no third argument, use the preset default extension diff --git a/SPECS/python-rpm-macros.spec b/SPECS/python-rpm-macros.spec index f4641aa..4bda903 100644 --- a/SPECS/python-rpm-macros.spec +++ b/SPECS/python-rpm-macros.spec @@ -1,6 +1,6 @@ Name: python-rpm-macros Version: 3 -Release: 38%{?dist} +Release: 39%{?dist} Summary: The unversioned Python RPM macros License: MIT @@ -71,6 +71,10 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ %changelog +* Tue Jun 16 2020 Charalampos Stratakis - 3-39 +- Strip tildes from %%version in %%pypi_source by default +- Resolves: rhbz#1844902 + * Mon Oct 14 2019 Charalampos Stratakis - 3-38 - Fix the %%py_build macro to respect the global definition of %%__python - Resolves: rhbz#1757833