Skip to content

Commit

Permalink
Prepare spec files and configure Packit for pre-releases (#305)
Browse files Browse the repository at this point in the history
Prepare spec files and configure Packit for pre-releases

Related to packit/packit#2149.

Reviewed-by: Laura Barcziová
  • Loading branch information
softwarefactory-project-zuul[bot] authored Nov 13, 2023
2 parents 2efbd9c + a0e0ce6 commit 90590ae
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ packit_instances: ["prod", "stg"]
upstream_project_url: https://github.com/packit/specfile
issue_repository: https://github.com/packit/specfile

# PEP440
#prerelease_suffix_pattern: "([.-_]?)(a(lpha)?|b(eta)?|(r)?c|pre(view)?)([.-_]?\\d+)?"
#prerelease_suffix_macro: prerelease

copy_upstream_release_description: true

packages:
Expand Down
13 changes: 10 additions & 3 deletions epel8/python-specfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ Main focus is on modifying existing spec files, any change should result
in a minimal diff.}


%global base_version 0.24.0
#global prerelease %%{nil}

%global package_version %{base_version}%{?prerelease:~%{prerelease}}
%global pypi_version %{base_version}%{?prerelease:-%{prerelease}}


Name: python-specfile
Version: 0.24.0
Version: %{package_version}
Release: 1%{?dist}

Summary: A library for parsing and manipulating RPM spec files
License: MIT
URL: https://github.com/packit/specfile

Source0: %{pypi_source specfile}
Source0: %{pypi_source specfile %{pypi_version}}

BuildArch: noarch

Expand All @@ -36,7 +43,7 @@ Summary: %{summary}


%prep
%autosetup -p1 -n specfile-%{version}
%autosetup -p1 -n specfile-%{pypi_version}
# Remove bundled egg-info
rm -rf specfile.egg-info

Expand Down
13 changes: 10 additions & 3 deletions fedora/python-specfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ Main focus is on modifying existing spec files, any change should result
in a minimal diff.}


%global base_version 0.24.0
#global prerelease %%{nil}

%global package_version %{base_version}%{?prerelease:~%{prerelease}}
%global pypi_version %{base_version}%{?prerelease:-%{prerelease}}


Name: python-specfile
Version: 0.24.0
Version: %{package_version}
Release: 1%{?dist}

Summary: A library for parsing and manipulating RPM spec files
License: MIT
URL: https://github.com/packit/specfile

Source0: %{pypi_source specfile}
Source0: %{pypi_source specfile %{pypi_version}}

BuildArch: noarch

Expand All @@ -39,7 +46,7 @@ Summary: %{summary}


%prep
%autosetup -p1 -n specfile-%{version}
%autosetup -p1 -n specfile-%{pypi_version}

# since we are building from PyPI source, we don't need git-archive
# support in setuptools_scm
Expand Down

0 comments on commit 90590ae

Please sign in to comment.