]> git.pld-linux.org Git - packages/python-distlib.git/blob - python-distlib.spec
rebuild with python 3.10
[packages/python-distlib.git] / python-distlib.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Distribution utilities
8 Summary(pl.UTF-8):      Narzędzia do dystrybuowania
9 Name:           python-distlib
10 Version:        0.3.4
11 Release:        3
12 License:        PSF v2
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/distlib/
15 Source0:        https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.zip
16 # Source0-md5:  c886b7d99b4085c5d960e7435dcbd397
17 Patch0:         %{name}-sequencer.patch
18 URL:            https://pypi.org/project/distlib/
19 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
20 BuildRequires:  glibc-localedb-all
21 %endif
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.6
27 %if %{with tests}
28 BuildConflicts: python3-astroid < 2.3.3-2
29 BuildConflicts: python3-pylint < 2.4.4-2
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 BuildRequires:  sed >= 4.0
35 BuildRequires:  unzip
36 Requires:       python-modules >= 1:2.7
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Low-level components of distutils2/packaging, augmented with
42 higher-level APIs for making packaging easier.
43
44 %description -l pl.UTF-8
45 Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
46 wysokopoziomowe API ułatwiające pakietowanie.
47
48 %package -n python3-distlib
49 Summary:        Distribution utilities
50 Summary(pl.UTF-8):      Narzędzia do dystrybuowania
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.6
53
54 %description -n python3-distlib
55 Low-level components of distutils2/packaging, augmented with
56 higher-level APIs for making packaging easier.
57
58 %description -n python3-distlib -l pl.UTF-8
59 Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
60 wysokopoziomowe API ułatwiające pakietowanie.
61
62 %prep
63 %setup -q -n distlib-%{version}
64 %patch0 -p1
65
66 %if "%{_host_cpu}" == "x32"
67 # distlib.wheel doesn't distinguish x32 from x86_64
68 %{__sed} -i -e 's/test_mount_extensions/disabled&/' tests/test_wheel.py
69 %endif
70
71 %build
72 %if %{with python2}
73 %py_build
74
75 %if %{with tests}
76 LC_ALL=C.UTF-8 \
77 SKIP_ONLINE=1 \
78 PYTHONPATH=$(pwd) \
79 %{__python} tests/test_all.py
80 %endif
81 %endif
82
83 %if %{with python3}
84 %py3_build
85
86 %if %{with tests}
87 LC_ALL=C.UTF-8 \
88 SKIP_ONLINE=1 \
89 PYTHONPATH=$(pwd) \
90 %{__python3} tests/test_all.py
91 %endif
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %py_install
99
100 %py_postclean
101 %endif
102
103 %if %{with python3}
104 %py3_install
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %files
112 %defattr(644,root,root,755)
113 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
114 %{py_sitescriptdir}/distlib
115 %{py_sitescriptdir}/distlib-%{version}-py*.egg-info
116 %endif
117
118 %if %{with python3}
119 %files -n python3-distlib
120 %defattr(644,root,root,755)
121 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
122 %{py3_sitescriptdir}/distlib
123 %{py3_sitescriptdir}/distlib-%{version}-py*.egg-info
124 %endif
This page took 0.032441 seconds and 3 git commands to generate.