Include rust2rpm version info in the generated spec file

Fixes #77.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-05-06 22:44:55 +02:00
parent 253d1f6021
commit 6de75b87af
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ import jinja2
import requests import requests
import tqdm import tqdm
from . import Metadata, licensing from . import Metadata, licensing, __version__
from .metadata import normalize_deps from .metadata import normalize_deps
DEFAULT_EDITOR = "vi" DEFAULT_EDITOR = "vi"
@ -265,6 +265,7 @@ def main():
patch_file = None patch_file = None
kwargs = {} kwargs = {}
kwargs["generator_version"] = __version__
kwargs["crate"] = crate kwargs["crate"] = crate
kwargs["target"] = args.target kwargs["target"] = args.target
kwargs["all_features"] = args.all_features kwargs["all_features"] = args.all_features

View file

@ -1,5 +1,5 @@
{% include target ~ "-header.spec.inc" ignore missing %} {% include target ~ "-header.spec.inc" ignore missing %}
# Generated by rust2rpm # Generated by rust2rpm {{ generator_version }}
%bcond_without check %bcond_without check
{% if not include_main %} {% if not include_main %}
%global debug_package %{nil} %global debug_package %{nil}