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
8 %define module dockerpycreds
9 %define egg_name docker_pycreds
10 %define pypi_name docker-pycreds
11 Summary: Python bindings for the docker credentials store API
12 Name: python-%{pypi_name}
16 Group: Libraries/Python
17 Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5: 322f570cea6b4661c6ac335683988e18
19 URL: https://github.com/shin-/dockerpy-creds
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
26 BuildRequires: python-flake8 = 2.4.1
27 BuildRequires: python-pytest = 3.0.2
28 BuildRequires: python-pytest-cov = 2.3.1
32 BuildRequires: python3-modules
33 BuildRequires: python3-setuptools
35 BuildRequires: python3-flake8 = 2.4.1
36 BuildRequires: python3-pytest = 3.0.2
37 BuildRequires: python3-pytest-cov = 2.3.1
40 Suggests: docker-credential-helpers >= 0.4.0
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Python 2 bindings for the docker credentials store API
47 %package -n python3-%{pypi_name}
48 Summary: Python bindings for the docker credentials store API
49 Group: Libraries/Python
50 Suggests: docker-credential-helpers >= 0.4.0
52 %description -n python3-%{pypi_name}
53 Python 3 bindings for the docker credentials store API
56 %setup -q -n %{pypi_name}-%{version}
58 # Remove bundled egg-info
59 %{__rm} -r %{egg_name}.egg-info
63 %py_build %{?with_tests:test}
67 %py3_build %{?with_tests:test}
71 rm -rf $RPM_BUILD_ROOT
82 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
88 %{py_sitescriptdir}/%{module}
89 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
93 %files -n python3-%{pypi_name}
94 %defattr(644,root,root,755)
96 %{py3_sitescriptdir}/%{module}
97 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info