]> git.pld-linux.org Git - packages/python-setuptools_scm_git_archive.git/blob - python-setuptools_scm_git_archive.spec
8caebc8b72d3bd853792265b1a7be2c13c64409a
[packages/python-setuptools_scm_git_archive.git] / python-setuptools_scm_git_archive.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        setuptools_scm plugin for git archives
8 Summary(pl.UTF-8):      Wtyczka setuptools_scm do archiwów gita
9 Name:           python-setuptools_scm_git_archive
10 Version:        1.1
11 Release:        3
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/setuptools_scm_git_archive/
15 Source0:        https://files.pythonhosted.org/packages/source/s/setuptools_scm_git_archive/setuptools_scm_git_archive-%{version}.tar.gz
16 # Source0-md5:  1c9351fa5cebd12e76488737a7c78f2e
17 URL:            https://pypi.org/project/setuptools_scm_git_archive/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 BuildRequires:  python-setuptools_scm
22 %if %{with tests}
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools
29 BuildRequires:  python3-setuptools_scm
30 %if %{with tests}
31 BuildRequires:  python3-pytest
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.5
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 This is a setuptools_scm plugin that adds support for git archives
42 (for example the ones GitHub automatically generates).
43
44 %description -l pl.UTF-8
45 Ten moduł to wtyczka setuptools_scm, dodająca obsługę archiwów git
46 (np. takich, jak automatycznie generowane przez GitHuba).
47
48 %package -n python3-setuptools_scm_git_archive
49 Summary:        setuptools_scm plugin for git archives
50 Summary(pl.UTF-8):      Wtyczka setuptools_scm do archiwów gita
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.2
53
54 %description -n python3-setuptools_scm_git_archive
55 This is a setuptools_scm plugin that adds support for git archives
56 (for example the ones GitHub automatically generates).
57
58 %description -n python3-setuptools_scm_git_archive -l pl.UTF-8
59 Ten moduł to wtyczka setuptools_scm, dodająca obsługę archiwów git
60 (np. takich, jak automatycznie generowane przez GitHuba).
61
62 %prep
63 %setup -q -n setuptools_scm_git_archive-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build
68
69 %if %{with tests}
70 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
71 %{__python} -m pytest tests.py
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
80 %{__python3} -m pytest tests.py
81 %endif
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc LICENSE README.rst
104 %{py_sitescriptdir}/setuptools_scm_git_archive
105 %{py_sitescriptdir}/setuptools_scm_git_archive-%{version}-py*.egg-info
106 %endif
107
108 %if %{with python3}
109 %files -n python3-setuptools_scm_git_archive
110 %defattr(644,root,root,755)
111 %doc LICENSE README.rst
112 %{py3_sitescriptdir}/setuptools_scm_git_archive
113 %{py3_sitescriptdir}/setuptools_scm_git_archive-%{version}-py*.egg-info
114 %endif
This page took 0.466733 seconds and 2 git commands to generate.