You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
48 lines
1.4 KiB
From 6de75b87af4bd86d87dfee038f5b6cdf99437a7c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Mon, 6 May 2019 22:44:55 +0200
|
|
Subject: [PATCH 06/14] Include rust2rpm version info in the generated spec
|
|
file
|
|
|
|
Fixes #77.
|
|
---
|
|
rust2rpm/__main__.py | 3 ++-
|
|
rust2rpm/templates/main.spec | 2 +-
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py
|
|
index b8d3772..a7674fd 100644
|
|
--- a/rust2rpm/__main__.py
|
|
+++ b/rust2rpm/__main__.py
|
|
@@ -17,7 +17,7 @@ import jinja2
|
|
import requests
|
|
import tqdm
|
|
|
|
-from . import Metadata, licensing
|
|
+from . import Metadata, licensing, __version__
|
|
from .metadata import normalize_deps
|
|
|
|
DEFAULT_EDITOR = "vi"
|
|
@@ -265,6 +265,7 @@ def main():
|
|
patch_file = None
|
|
|
|
kwargs = {}
|
|
+ kwargs["generator_version"] = __version__
|
|
kwargs["crate"] = crate
|
|
kwargs["target"] = args.target
|
|
kwargs["all_features"] = args.all_features
|
|
diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec
|
|
index 0c84325..0ef0b10 100644
|
|
--- a/rust2rpm/templates/main.spec
|
|
+++ b/rust2rpm/templates/main.spec
|
|
@@ -1,5 +1,5 @@
|
|
{% include target ~ "-header.spec.inc" ignore missing %}
|
|
-# Generated by rust2rpm
|
|
+# Generated by rust2rpm {{ generator_version }}
|
|
%bcond_without check
|
|
{% if not include_main %}
|
|
%global debug_package %{nil}
|
|
--
|
|
2.22.0.rc3
|
|
|