]> git.pld-linux.org Git - packages/python-setuptools_scm.git/blob - python-setuptools_scm.spec
- disable git and hg tests by default
[packages/python-setuptools_scm.git] / python-setuptools_scm.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # py.test tests
4 %bcond_with     tests_scm       # py.test tests using SCM programs (git, hg)
5 %bcond_without  python2         # CPython 2.x module
6 %bcond_without  python3         # CPython 3.x module
7
8 Summary:        Python 2 package to manager versions by scm tags
9 Summary(pl.UTF-8):      Pakiet Pythona 2 do zarządzania wersjami poprzez etykiety systemu kontroli wersji
10 Name:           python-setuptools_scm
11 Version:        1.15.0
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/setuptools_scm
16 Source0:        https://pypi.python.org/packages/80/b7/31b6ae5fcb188e37f7e31abe75f9be90490a5456a72860fa6e643f8a3cbc/setuptools_scm-%{version}.tar.gz
17 # Source0-md5:  b6916c78ed6253d6602444fad4279c5b
18 URL:            https://github.com/pypa/setuptools_scm
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-py >= 1.4.26
24 BuildRequires:  python-pytest
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-setuptools
29 BuildRequires:  python3-modules >= 1:3.3
30 %if %{with tests}
31 BuildRequires:  python3-py >= 1.4.26
32 BuildRequires:  python3-pytest
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 %if %{with tests_scm}
38 BuildRequires:  git-core
39 BuildRequires:  mercurial
40 %endif
41 Requires:       python-setuptools
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 setuptools_scm is a simple utility for the setup_requires feature of
47 setuptools for use in Mercurial and Git based projects.
48
49 %description -l pl.UTF-8
50 setuptools_scm to proste narzędzie dla funkcji setup_requires modułu
51 setuptools przeznaczone do stosowania w projektach opatych na
52 systemach kontroli wersji Mercurial i Git.
53
54 %package -n python3-setuptools_scm
55 Summary:        Python 3 package to manager versions by scm tags
56 Summary(pl.UTF-8):      Pakiet Pythona 3 do zarządzania wersjami poprzez etykiety systemu kontroli wersji
57 Group:          Libraries/Python
58 Requires:       python3-setuptools
59
60 %description -n python3-setuptools_scm
61 setuptools_scm is a simple utility for the setup_requires feature of
62 setuptools for use in Mercurial and Git based projects.
63
64 %description -n python3-setuptools_scm -l pl.UTF-8
65 setuptools_scm to proste narzędzie dla funkcji setup_requires modułu
66 setuptools przeznaczone do stosowania w projektach opatych na
67 systemach kontroli wersji Mercurial i Git.
68
69 %prep
70 %setup -q -n setuptools_scm-%{version}
71
72 %if %{without tests_scm}
73 %{__rm} testing/test_{git,mercurial}.py
74 %endif
75
76 %build
77 %if %{with python2}
78 %py_build
79
80 %{?with_tests:%{__python} -mpytest}
81 %endif
82
83 %if %{with python3}
84 %py3_build
85
86 %{?with_tests:%{__python3} -mpytest}
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc CHANGELOG.rst LICENSE README.rst
109 %{py_sitescriptdir}/setuptools_scm
110 %{py_sitescriptdir}/setuptools_scm-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-setuptools_scm
115 %defattr(644,root,root,755)
116 %doc CHANGELOG.rst LICENSE README.rst
117 %{py3_sitescriptdir}/setuptools_scm
118 %{py3_sitescriptdir}/setuptools_scm-%{version}-py*.egg-info
119 %endif
This page took 0.054579 seconds and 3 git commands to generate.