]> git.pld-linux.org Git - packages/python-setuptools_scm.git/blame - python-setuptools_scm.spec
rebuild with python 3.10
[packages/python-setuptools_scm.git] / python-setuptools_scm.spec
CommitLineData
a7eeda10
JB
1#
2# Conditional build:
93ab9a3c 3%bcond_without tests # py.test tests
9c37af6f
JB
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
a7eeda10
JB
7
8Summary: Python 2 package to manager versions by scm tags
9Summary(pl.UTF-8): Pakiet Pythona 2 do zarządzania wersjami poprzez etykiety systemu kontroli wersji
10Name: python-setuptools_scm
e6f9d2e2 11Version: 5.0.2
438f857f 12Release: 2
a7eeda10
JB
13License: MIT
14Group: Libraries/Python
3b805f38
JB
15#Source0Download: https://pypi.org/simple/setuptools_scm/
16Source0: https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
e6f9d2e2 17# Source0-md5: 8ddd44e0cd3a243350fe709024ec7224
cdd8c19a 18URL: https://github.com/pypa/setuptools_scm
a7eeda10 19%if %{with python2}
3b805f38 20BuildRequires: python-modules >= 1:2.7
b9b9739a 21BuildRequires: python-setuptools >= 1:42
20ee71fd
JB
22%if %{with tests}
23BuildRequires: python-py >= 1.4.26
3b805f38 24BuildRequires: python-pytest >= 3.1.0
93ab9a3c 25BuildRequires: python-toml
20ee71fd 26%endif
a7eeda10
JB
27%endif
28%if %{with python3}
f4fbde57 29BuildRequires: python3-modules >= 1:3.5
b9b9739a 30BuildRequires: python3-setuptools >= 1:42
20ee71fd
JB
31%if %{with tests}
32BuildRequires: python3-py >= 1.4.26
3b805f38 33BuildRequires: python3-pytest >= 3.1.0
93ab9a3c 34BuildRequires: python3-toml
20ee71fd 35%endif
a7eeda10 36%endif
20ee71fd
JB
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
9c37af6f
JB
39%if %{with tests_scm}
40BuildRequires: git-core
41BuildRequires: mercurial
42%endif
a7eeda10 43Requires: python-setuptools
a813f03b 44Requires: python-toml
a7eeda10
JB
45BuildArch: noarch
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49setuptools_scm is a simple utility for the setup_requires feature of
50setuptools for use in Mercurial and Git based projects.
51
52%description -l pl.UTF-8
53setuptools_scm to proste narzędzie dla funkcji setup_requires modułu
54setuptools przeznaczone do stosowania w projektach opatych na
55systemach kontroli wersji Mercurial i Git.
56
57%package -n python3-setuptools_scm
58Summary: Python 3 package to manager versions by scm tags
59Summary(pl.UTF-8): Pakiet Pythona 3 do zarządzania wersjami poprzez etykiety systemu kontroli wersji
60Group: Libraries/Python
61Requires: python3-setuptools
a813f03b 62Requires: python3-toml
a7eeda10
JB
63
64%description -n python3-setuptools_scm
65setuptools_scm is a simple utility for the setup_requires feature of
66setuptools for use in Mercurial and Git based projects.
67
68%description -n python3-setuptools_scm -l pl.UTF-8
69setuptools_scm to proste narzędzie dla funkcji setup_requires modułu
70setuptools przeznaczone do stosowania w projektach opatych na
71systemach kontroli wersji Mercurial i Git.
72
73%prep
050f3a26 74%setup -q -n setuptools_scm-%{version}
a7eeda10 75
9c37af6f 76%if %{without tests_scm}
3b805f38 77%{__rm} testing/test_{file_finder,git,mercurial,regressions}.py
9c37af6f
JB
78%endif
79
3b805f38
JB
80# tries to install using pip
81%{__rm} testing/test_setuptools_support.py
82
a7eeda10
JB
83%build
84%if %{with python2}
20ee71fd
JB
85%py_build
86
3b805f38 87%if %{with tests}
93ab9a3c
JB
88PYTHONPATH=$(pwd)/src \
89PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
e46cf47f 90%{__python} -m pytest testing
3b805f38 91%endif
a7eeda10
JB
92%endif
93
94%if %{with python3}
20ee71fd
JB
95%py3_build
96
3b805f38 97%if %{with tests}
93ab9a3c
JB
98PYTHONPATH=$(pwd)/src \
99PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
e46cf47f 100%{__python3} -m pytest testing
3b805f38 101%endif
a7eeda10
JB
102%endif
103
104%install
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
decb9fc9 108%py_install
a7eeda10
JB
109
110%py_postclean
111%endif
112
113%if %{with python3}
decb9fc9 114%py3_install
a7eeda10
JB
115%endif
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%if %{with python2}
121%files
122%defattr(644,root,root,755)
123%doc CHANGELOG.rst LICENSE README.rst
124%{py_sitescriptdir}/setuptools_scm
125%{py_sitescriptdir}/setuptools_scm-%{version}-py*.egg-info
126%endif
127
128%if %{with python3}
129%files -n python3-setuptools_scm
130%defattr(644,root,root,755)
131%doc CHANGELOG.rst LICENSE README.rst
132%{py3_sitescriptdir}/setuptools_scm
133%{py3_sitescriptdir}/setuptools_scm-%{version}-py*.egg-info
134%endif
This page took 0.142237 seconds and 4 git commands to generate.