]> git.pld-linux.org Git - SPECS.git/blob - python-docker-pycreds.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / python-docker-pycreds.spec
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
11 Summary:        Python bindings for the docker credentials store API
12 Name:           python-%{pypi_name}
13 Version:        0.4.0
14 Release:        4
15 License:        Apache v2.0
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
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-flake8 = 2.4.1
27 BuildRequires:  python-pytest = 3.0.2
28 BuildRequires:  python-pytest-cov = 2.3.1
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-flake8 = 2.4.1
36 BuildRequires:  python3-pytest = 3.0.2
37 BuildRequires:  python3-pytest-cov = 2.3.1
38 %endif
39 %endif
40 Suggests:       docker-credential-helpers >= 0.4.0
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Python 2 bindings for the docker credentials store API
46
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
51
52 %description -n python3-%{pypi_name}
53 Python 3 bindings for the docker credentials store API
54
55 %prep
56 %setup -q -n %{pypi_name}-%{version}
57
58 # Remove bundled egg-info
59 %{__rm} -r %{egg_name}.egg-info
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
71 rm -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
82 rm -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.452382 seconds and 3 git commands to generate.