]> git.pld-linux.org Git - packages/python-importlib_metadata.git/blob - python-importlib_metadata.spec
- updated to 1.4.0
[packages/python-importlib_metadata.git] / python-importlib_metadata.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module (for Python < 3.8)
7
8 Summary:        Read metadata from Python packages
9 Summary(pl.UTF-8):      Odczyt metadanych z pakietów Pythona
10 Name:           python-importlib_metadata
11 Version:        1.4.0
12 Release:        1
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/importlib-metadata/
16 Source0:        https://files.pythonhosted.org/packages/source/i/importlib-metadata/importlib_metadata-%{version}.tar.gz
17 # Source0-md5:  4d4a009ef0c9e2962da8126075867633
18 Patch0:         %{name}-tests.patch
19 URL:            https://pypi.org/project/importlib-metadata/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 BuildRequires:  python-setuptools_scm
24 %if %{with tests}
25 BuildRequires:  python-configparser >= 3.5
26 BuildRequires:  python-contextlib2
27 BuildRequires:  python-importlib_resources
28 BuildRequires:  python-packaging
29 BuildRequires:  python-pathlib2
30 BuildRequires:  python-zipp >= 0.5
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.5
35 BuildRequires:  python3-setuptools
36 BuildRequires:  python3-setuptools_scm
37 %if %{with tests}
38 %if "%{py3_ver}" < "3.7"
39 BuildRequires:  python3-importlib_resources
40 %endif
41 BuildRequires:  python3-packaging
42 %if "%{py3_ver}" < "3.5"
43 BuildRequires:  python3-pathlib2
44 %endif
45 BuildRequires:  python3-zipp >= 0.5
46 %endif
47 %endif
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.714
50 %if %{with doc}
51 BuildRequires:  python3-rst.linker
52 BuildRequires:  sphinx-pdg-3
53 %endif
54 Requires:       python-modules >= 1:2.7
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 importlib_metadata is a library to access the metadata for a Python
60 package. It is intended to be ported to Python 3.8.
61
62 %description -l pl.UTF-8
63 importlib_metadata to biblioteka służąca do dostępu do metadanych
64 pakietów Pythona. Ma być przeniesiona do Pythona 3.8.
65
66 %package -n python3-importlib_metadata
67 Summary:        Read metadata from Python packages
68 Summary(pl.UTF-8):      Odczyt metadanych z pakietów Pythona
69 Group:          Libraries/Python
70 Requires:       python3-modules >= 1:3.5
71
72 %description -n python3-importlib_metadata
73 importlib_metadata is a library to access the metadata for a Python
74 package. It is intended to be ported to Python 3.8.
75
76 %description -n python3-importlib_metadata -l pl.UTF-8
77 importlib_metadata to biblioteka służąca do dostępu do metadanych
78 pakietów Pythona. Ma być przeniesiona do Pythona 3.8.
79
80 %package apidocs
81 Summary:        API documentation for Python importlib_metadata module
82 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona importlib_metadata
83 Group:          Documentation
84
85 %description apidocs
86 API documentation for Python importlib_metadata module.
87
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona importlib_metadata.
90
91 %prep
92 %setup -q -n importlib_metadata-%{version}
93 %patch0 -p1
94
95 %build
96 %if %{with python2}
97 %py_build
98
99 %if %{with tests}
100 %{__python} -m unittest discover -s importlib_metadata/tests -t $(pwd)
101 %endif
102 %endif
103
104 %if %{with python3}
105 %py3_build
106
107 %if %{with tests}
108 %{__python3} -m unittest discover -s importlib_metadata/tests -t $(pwd)
109 %endif
110 %endif
111
112 %if %{with doc}
113 sphinx-build-3 -b html importlib_metadata/docs docs/_build/html
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %py_install
121
122 %py_postclean
123 %endif
124
125 %if %{with python3}
126 %py3_install
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %files
134 %defattr(644,root,root,755)
135 %doc LICENSE README.rst
136 %{py_sitescriptdir}/importlib_metadata
137 %{py_sitescriptdir}/importlib_metadata-%{version}-py*.egg-info
138 %endif
139
140 %if %{with python3}
141 %files -n python3-importlib_metadata
142 %defattr(644,root,root,755)
143 %doc LICENSE README.rst
144 %{py3_sitescriptdir}/importlib_metadata
145 %{py3_sitescriptdir}/importlib_metadata-%{version}-py*.egg-info
146 %endif
147
148 %if %{with doc}
149 %files apidocs
150 %defattr(644,root,root,755)
151 %doc docs/_build/html/{_static,*.html,*.js}
152 %endif
This page took 0.071447 seconds and 4 git commands to generate.