]> git.pld-linux.org Git - packages/python-docker-pycreds.git/blame - python-docker-pycreds.spec
rebuild with python 3.10
[packages/python-docker-pycreds.git] / python-docker-pycreds.spec
CommitLineData
0a5f1baa
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module dockerpycreds
9%define egg_name docker_pycreds
10%define pypi_name docker-pycreds
11Summary: Python bindings for the docker credentials store API
12Name: python-%{pypi_name}
1d9e9d4f 13Version: 0.4.0
6eb9c91a 14Release: 5
f969b51b 15License: Apache v2.0
0a5f1baa
ER
16Group: Libraries/Python
17Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
1d9e9d4f 18# Source0-md5: 322f570cea6b4661c6ac335683988e18
6424983d 19URL: https://github.com/shin-/dockerpy-creds
0a5f1baa
ER
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-flake8 = 2.4.1
27BuildRequires: python-pytest = 3.0.2
28BuildRequires: python-pytest-cov = 2.3.1
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3-modules
33BuildRequires: python3-setuptools
34%if %{with tests}
35BuildRequires: python3-flake8 = 2.4.1
36BuildRequires: python3-pytest = 3.0.2
37BuildRequires: python3-pytest-cov = 2.3.1
38%endif
39%endif
05056e32 40Suggests: docker-credential-helpers >= 0.4.0
0a5f1baa
ER
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45Python 2 bindings for the docker credentials store API
46
47%package -n python3-%{pypi_name}
48Summary: Python bindings for the docker credentials store API
49Group: Libraries/Python
05056e32 50Suggests: docker-credential-helpers >= 0.4.0
0a5f1baa
ER
51
52%description -n python3-%{pypi_name}
53Python 3 bindings for the docker credentials store API
54
55%prep
56%setup -q -n %{pypi_name}-%{version}
57
58# Remove bundled egg-info
4f078be4 59%{__rm} -r %{egg_name}.egg-info
0a5f1baa
ER
60
61%build
62%if %{with python2}
63%py_build %{?with_tests:test}
64%endif
65
66%if %{with python3}
67%py3_build %{?with_tests:test}
68%endif
69
70%install
71rm -rf $RPM_BUILD_ROOT
72%if %{with python2}
73%py_install
74%py_postclean
75%endif
76
77%if %{with python3}
78%py3_install
79%endif
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%if %{with python2}
85%files
86%defattr(644,root,root,755)
87%doc README.md
88%{py_sitescriptdir}/%{module}
89%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
90%endif
91
92%if %{with python3}
93%files -n python3-%{pypi_name}
94%defattr(644,root,root,755)
95%doc README.md
96%{py3_sitescriptdir}/%{module}
97%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
98%endif
99
This page took 0.079975 seconds and 4 git commands to generate.