Skip to content

Commit

Permalink
Add replace function to order to prevent from "Unknown tag" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
huakim committed Sep 16, 2024
1 parent 959a754 commit 4a1d678
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions py2pack/templates/fedora.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Name: python-%{pypi_name}
Version: {{ version }}
Release: %autorelease
Summary: {{ summary }}
Summary: {{ summary|replace('\n','') }}

# Check if the automatically generated License and its spelling is correct for Fedora
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
License: {{ license }}
URL: {{ home_page }}
Source: {{ source_url|replace(version, '%{version}') }}
License: {{ license|replace('\n','') }}
URL: {{ home_page|replace('\n','') }}
Source: {{ source_url|replace(version, '%{version}')|replace('\n','') }}

BuildRequires: pyproject-rpm-macros
BuildRequires: python-devel
Expand Down
8 changes: 4 additions & 4 deletions py2pack/templates/mageia.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Name: python-%{mod_name}
Version: {{ version }}
Release: %mkrel 1
Url: {{ home_page }}
Summary: {{ summary }}
License: {{ license }}
Url: {{ home_page|replace('\n','') }}
Summary: {{ summary|replace('\n','') }}
License: {{ license|replace('\n','') }}
Group: Development/Python
Source: {{ source_url|replace(version, '%{version}') }}
Source: {{ source_url|replace(version, '%{version}')|replace('\n','') }}
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildRequires: python-devel
{%- for req in requires %}
Expand Down
8 changes: 4 additions & 4 deletions py2pack/templates/opensuse-legacy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
Name: python-{{ name }}
Version: {{ version }}
Release: 0
Summary: {{ summary_no_ending_dot|default(summary, true) }}
License: {{ license }}
URL: {{ home_page }}
Source: {{ source_url|replace(version, '%{version}') }}
Summary: {{ summary_no_ending_dot|default(summary, true)|replace('\n','') }}
License: {{ license|replace('\n','') }}
URL: {{ home_page|replace('\n','') }}
Source: {{ source_url|replace(version, '%{version}')|replace('\n','') }}
BuildRequires: python-setuptools
{%- if install_requires and install_requires is not none %}
{%- for req in install_requires|sort %}
Expand Down
8 changes: 4 additions & 4 deletions py2pack/templates/opensuse.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
Name: python-{{ name }}
Version: {{ version }}
Release: 0
Summary: {{ summary_no_ending_dot|default(summary, true) }}
License: {{ license }}
URL: {{ home_page }}
Source: {{ source_url|replace(version, '%{version}') }}
Summary: {{ summary_no_ending_dot|default(summary, true)|replace('\n','') }}
License: {{ license|replace('\n','') }}
URL: {{ home_page|replace('\n','') }}
Source: {{ source_url|replace(version, '%{version}')|replace('\n','') }}
BuildRequires: python-rpm-macros
{%- set build_requires_plus_pip = ((build_requires if build_requires and build_requires is not none else []) +
['pip']) %}
Expand Down

0 comments on commit 4a1d678

Please sign in to comment.