summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python-vcversioner.spec49
1 files changed, 49 insertions, 0 deletions
diff --git a/python-vcversioner.spec b/python-vcversioner.spec
new file mode 100644
index 0000000..edb18ef
--- /dev/null
+++ b/python-vcversioner.spec
@@ -0,0 +1,49 @@
+%{?scl:%scl_package python-vcversioner}
+%{!?scl:%global pkg_name %{name}}
+
+Name: %{?scl_prefix}python-vcversioner
+Version: 2.16.0.0
+Release: 1%{?dist}
+Summary: Use version control tags to discover version numbers
+
+License: ISC
+URL: https://github.com/habnabit/vcversioner
+Source0: https://pypi.python.org/packages/c5/cc/33162c0a7b28a4d8c83da07bc2b12cee58c120b4a9e8bba31c41c8d35a16/vcversioner-2.16.0.0.tar.gz
+
+BuildArch: noarch
+
+BuildRequires: %{?scl_prefix}python-devel
+BuildRequires: %{?scl_prefix}python-setuptools
+
+%{?scl:Requires: %{scl}-runtime}
+%{?scl:BuildRequires: %{scl}-runtime}
+
+%description
+Use version control tags to discover version numbers
+
+%prep
+%autosetup -n vcversioner-%{version} -p1
+
+%build
+rm -Rf requirements.txt test-requirements.txt *.egg-info
+%{?scl:scl enable %{scl} - << \EOF}
+PBR_VERSION=%{version} %{__python3} setup.py build
+%{?scl:EOF}
+
+%install
+%{?scl:scl enable %{scl} - << \EOF}
+PBR_VERSION=%{version} %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+%{?scl:EOF}
+
+%check
+%{?scl:scl enable %{scl} - << \EOF}
+%{__python3} -c "import vcversioner"
+%{?scl:EOF}
+
+%files
+%defattr(644,root,root,755)
+%{python3_sitelib}/*
+
+%changelog
+* Fri Aug 25 2017 Tristan Cacqueray <tdecacqu@redhat.com> - 2.16.0.0-1
+- Initial packaging