]> git.pld-linux.org Git - packages/python-pytest-runner.git/blob - python-pytest-runner.spec
- new
[packages/python-pytest-runner.git] / python-pytest-runner.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # documentation (uses python2)
4 %bcond_with     tests   # perform "make test" (broken with \--build-base)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %if %{without python2}
9 %undefine       with_doc
10 %endif
11 Summary:        Invoke py.test as distutils command with dependency resolution
12 Summary(pl.UTF-8):      Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności
13 Name:           python-pytest-runner
14 Version:        2.5.1
15 Release:        1
16 License:        MIT
17 Group:          Libraries/Python
18 #Source0Download: https://pypi.python.org/pypi/pytest-runner
19 Source0:        https://pypi.python.org/packages/source/p/pytest-runner/pytest-runner-%{version}.zip
20 # Source0-md5:  2eef117c2f9db55d6639f5ef733575a6
21 URL:            https://bitbucket.org/pytest-dev/pytest-runner
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.616
24 %if %{with python2}
25 BuildRequires:  python-modules >= 1:2.6
26 BuildRequires:  python-setuptools
27 BuildRequires:  python-setuptools_scm
28 %{?with_doc:BuildRequires:      sphinx-pdg}
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.2
32 BuildRequires:  python3-setuptools
33 BuildRequires:  python3-setuptools_scm
34 %endif
35 Requires:       python-modules
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Setup scripts can use pytest-runner to add setup.py test support for
41 pytest runner.
42
43 %description -l pl.UTF-8
44 Skrypty setup mogą wykorzystywać moduł pytest-runner do dodawania
45 obsługi testów pytest runnera w setup.py.
46
47 %package -n python3-pytest-runner
48 Summary:        Invoke py.test as distutils command with dependency resolution
49 Summary(pl.UTF-8):      Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności
50 Group:          Libraries/Python
51 Requires:       python3-modules
52
53 %description -n python3-pytest-runner
54 Setup scripts can use pytest-runner to add setup.py test support for
55 pytest runner.
56
57 %description -n python3-pytest-runner -l pl.UTF-8
58 Skrypty setup mogą wykorzystywać moduł pytest-runner do dodawania
59 obsługi testów pytest runnera w setup.py.
60
61 %package apidocs
62 Summary:        pytest-runner module documentation
63 Summary(pl.UTF-8):      Dokumentacja modułu pytest-runner
64 Group:          Documentation
65
66 %description apidocs
67 Documentation for pytest-runner module.
68
69 %description apidocs -l pl.UTF-8
70 Dokumentacja modułu pytest-runner.
71
72 %prep
73 %setup -q -n pytest-runner-%{version}
74
75 %build
76 %if %{with python2}
77 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
78
79 %if %{with doc}
80 %{__python} setup.py build_sphinx
81 %endif
82 %endif
83
84 %if %{with python3}
85 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %{__python} setup.py \
93         build --build-base build-2 \
94         install --skip-build \
95         --optimize=2 \
96         --root=$RPM_BUILD_ROOT
97
98 %py_postclean
99 %endif
100
101 %if %{with python3}
102 %{__python3} setup.py \
103         build --build-base build-3 \
104         install --skip-build \
105         --optimize=2 \
106         --root=$RPM_BUILD_ROOT
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
114 %defattr(644,root,root,755)
115 %doc CHANGES.txt README.txt
116 %{py_sitescriptdir}/ptr.py[co]
117 %{py_sitescriptdir}/pytest_runner-%{version}-py*.egg-info
118 %endif
119
120 %if %{with python3}
121 %files -n python3-pytest-runner
122 %defattr(644,root,root,755)
123 %doc CHANGES.txt README.txt
124 %{py3_sitescriptdir}/ptr.py
125 %{py3_sitescriptdir}/__pycache__/ptr.cpython-*.py[co]
126 %{py3_sitescriptdir}/pytest_runner-%{version}-py*.egg-info
127 %endif
128
129 %if %{with doc}
130 %files apidocs
131 %defattr(644,root,root,755)
132 %doc build/sphinx/html/*
133 %endif
This page took 0.07496 seconds and 4 git commands to generate.