-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packaging modernization Fixes #273. Related to packit/ogr#798. Reviewed-by: Jiri Popelka Reviewed-by: Matej Focko Reviewed-by: Nikola Forró
- Loading branch information
Showing
8 changed files
with
102 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true)$ | ||
ref-names: $Format:%D$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Needed for setuptools-scm | ||
.git_archival.txt export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
%global srcname requre | ||
%global desc %{expand: | ||
REQUest REcordingRequre [rekure] - Is Library for storing output of various | ||
function and methods to persistent storage and be able to replay the stored | ||
output to functions.} | ||
|
||
|
||
Name: python-%{srcname} | ||
Name: python-requre | ||
Version: 0.8.2 | ||
Release: 1%{?dist} | ||
Summary: Python library what allows re/store output of various objects for testing | ||
Summary: Python library that allows re/store output of various objects for testing | ||
|
||
License: MIT | ||
URL: https://github.com/packit/requre | ||
Source0: %{pypi_source} | ||
Source0: %{pypi_source requre} | ||
BuildArch: noarch | ||
|
||
BuildRequires: python3-devel | ||
BuildRequires: python3dist(click) | ||
BuildRequires: python3dist(pytest) | ||
BuildRequires: python3dist(pyyaml) | ||
BuildRequires: python3dist(requests) | ||
BuildRequires: python3dist(setuptools) | ||
BuildRequires: python3dist(setuptools-scm) | ||
BuildRequires: python3dist(setuptools-scm-git-archive) | ||
BuildRequires: python3dist(sphinx) | ||
|
||
|
||
%description | ||
REQUest REcordingRequre [rekure] - Is Library for storing output of various | ||
function and methods to persistent storage and be able to replay the stored | ||
output to functions. | ||
%{desc} | ||
|
||
|
||
%package -n python3-%{srcname} | ||
%package -n python3-requre | ||
Summary: %{summary} | ||
|
||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides | ||
%if 0%{?fedora} < 33 | ||
%{?python_provide:%python_provide python3-%{srcname}} | ||
%endif | ||
|
||
%description -n python3-%{srcname} | ||
REQUest REcordingRequre [rekure] - Is Library for storing output of various | ||
function and methods to persistent storage and be able to replay the stored | ||
output to functions. | ||
%description -n python3-requre | ||
%{desc} | ||
|
||
|
||
%prep | ||
%autosetup -n %{srcname}-%{version} | ||
# Remove bundled egg-info | ||
rm -rf %{srcname}.egg-info | ||
%autosetup -n requre-%{version} | ||
|
||
|
||
%generate_buildrequires | ||
# The -w flag is required for EPEL 9's older hatchling | ||
%pyproject_buildrequires %{?el9:-w} | ||
|
||
|
||
%build | ||
%py3_build | ||
%pyproject_wheel | ||
|
||
|
||
%install | ||
%py3_install | ||
%pyproject_install | ||
%pyproject_save_files requre | ||
|
||
|
||
%files -n python3-%{srcname} | ||
%files -n python3-requre -f %{pyproject_files} | ||
# Epel9 does not tag the license file in pyproject_files as a license. Manually install it in this case | ||
%if 0%{?el9} | ||
%license LICENSE | ||
%endif | ||
%doc README.md | ||
%{_bindir}/requre-patch | ||
%{python3_sitelib}/%{srcname} | ||
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info | ||
|
||
|
||
%changelog | ||
* Wed Apr 13 2022 Frantisek Lachman <[email protected]> - 0.8.2-1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "requre" | ||
authors = [ | ||
{ name = "Red Hat", email = "[email protected]" }, | ||
] | ||
description = "Library for testing Python code that allows to store output of various objects and use the stored data for testing." | ||
license = "MIT" | ||
license-files = { paths = ["LICENSE"] } | ||
requires-python = ">=3.6" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Topic :: Software Development", | ||
"Topic :: Utilities", | ||
] | ||
dynamic = ["version"] | ||
keywords = [ | ||
"testing", | ||
"persistent_storage", | ||
"session_storage", | ||
] | ||
dependencies = [ | ||
"click", | ||
"GitPython", | ||
"pytest", | ||
"PyYAML", | ||
"requests", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/packit/requre" | ||
|
||
[project.optional-dependencies] | ||
testing = ["pytest"] | ||
|
||
[project.scripts] | ||
requre-patch = "requre.requre_patch:requre_base" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
# we can't use pre-release-based version scheme because it generates versions | ||
# that are sorted higher than the last stable release by RPM | ||
# for example: | ||
# - pre-release (guess-next-dev): | ||
# 0.20.1.dev1+g0abcdef.d20230921 > 0.20.1 | ||
# - post-release (no-guess-dev): | ||
# 0.20.0.post1.dev1+g0abcdef < 0.20.1 | ||
raw-options.version_scheme = "no-guess-dev" |