Skip to content

Commit e7693f1

Browse files
author
Marek Suchánek
committed
Add an RPM spec file for newdoc
1 parent 79b0251 commit e7693f1

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ MANIFEST
4949
# Usually these files are written by a python script from a template
5050
# before PyInstaller builds the exe, so as to inject date/other infos into it.
5151
*.manifest
52-
*.spec
52+
# This conflicts with the RPM spec file
53+
# *.spec
5354

5455
# Installer logs
5556
pip-log.txt

newdoc/newdoc.spec

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
%global srcname newdoc
2+
3+
Name: python-%{srcname}
4+
Version: 1.3.1
5+
Release: 1%{?dist}
6+
Summary: A script to generate assembly and module AsciiDoc files from templates
7+
8+
License: GPLv3+
9+
URL: https://pypi.python.org/pypi/%{srcname}
10+
Source0: %pypi_source
11+
12+
BuildArch: noarch
13+
BuildRequires: python2-devel python3-devel
14+
15+
%description
16+
A script to generate assembly and module AsciiDoc files from templates
17+
18+
%package -n python2-%{srcname}
19+
Summary: %{summary}
20+
%{?python_provide:%python_provide python2-%{srcname}}
21+
22+
%description -n python2-%{srcname}
23+
A script to generate assembly and module AsciiDoc files from templates
24+
25+
26+
%package -n python3-%{srcname}
27+
Summary: %{summary}
28+
%{?python_provide:%python_provide python3-%{srcname}}
29+
30+
%description -n python3-%{srcname}
31+
A script to generate assembly and module AsciiDoc files from templates
32+
33+
34+
%prep
35+
%autosetup -n %{srcname}-%{version}
36+
37+
%build
38+
%py2_build
39+
%py3_build
40+
41+
%install
42+
# Must do the python2 install first because the scripts in /usr/bin are
43+
# overwritten with every setup.py install, and in general we want the
44+
# python3 version to be the default.
45+
# If, however, we're installing separate executables for python2 and python3,
46+
# the order needs to be reversed so the unversioned executable is the python2 one.
47+
%py2_install
48+
%py3_install
49+
50+
%check
51+
%{__python2} setup.py test
52+
%{__python3} setup.py test
53+
54+
# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
55+
%files -n python2-%{srcname}
56+
%license LICENSE
57+
%doc README.md
58+
%{python2_sitelib}/*
59+
60+
%files -n python3-%{srcname}
61+
%license COPYING
62+
%doc README.md
63+
%{python3_sitelib}/*
64+
%{_bindir}/newdoc
65+
66+
%changelog

0 commit comments

Comments
 (0)