]> git.pld-linux.org Git - packages/python-distlib.git/blame - python-distlib.spec
rebuild with python 3.10
[packages/python-distlib.git] / python-distlib.spec
CommitLineData
c38e00c4
JB
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
7Summary: Distribution utilities
8Summary(pl.UTF-8): Narzędzia do dystrybuowania
9Name: python-distlib
57e0b3b6 10Version: 0.3.4
87845166 11Release: 2
c38e00c4
JB
12License: PSF v2
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/distlib/
15Source0: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.zip
57e0b3b6
JP
16# Source0-md5: c886b7d99b4085c5d960e7435dcbd397
17Patch0: %{name}-sequencer.patch
c38e00c4
JB
18URL: https://pypi.org/project/distlib/
19%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
20BuildRequires: glibc-localedb-all
21%endif
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.7
24%endif
25%if %{with python3}
19c993a9 26BuildRequires: python3-modules >= 1:3.6
bf9aabed
JB
27%if %{with tests}
28BuildConflicts: python3-astroid < 2.3.3-2
29BuildConflicts: python3-pylint < 2.4.4-2
30%endif
c38e00c4
JB
31%endif
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.714
13b6f6e7 34BuildRequires: sed >= 4.0
c38e00c4
JB
35BuildRequires: unzip
36Requires: python-modules >= 1:2.7
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41Low-level components of distutils2/packaging, augmented with
42higher-level APIs for making packaging easier.
43
44%description -l pl.UTF-8
45Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
46wysokopoziomowe API ułatwiające pakietowanie.
47
48%package -n python3-distlib
49Summary: Distribution utilities
50Summary(pl.UTF-8): Narzędzia do dystrybuowania
51Group: Libraries/Python
19c993a9 52Requires: python3-modules >= 1:3.6
c38e00c4
JB
53
54%description -n python3-distlib
55Low-level components of distutils2/packaging, augmented with
56higher-level APIs for making packaging easier.
57
58%description -n python3-distlib -l pl.UTF-8
59Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
60wysokopoziomowe API ułatwiające pakietowanie.
61
62%prep
63%setup -q -n distlib-%{version}
64%patch0 -p1
c38e00c4 65
13b6f6e7
JB
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
c38e00c4
JB
71%build
72%if %{with python2}
73%py_build
74
75%if %{with tests}
76LC_ALL=C.UTF-8 \
77SKIP_ONLINE=1 \
78PYTHONPATH=$(pwd) \
79%{__python} tests/test_all.py
80%endif
81%endif
82
83%if %{with python3}
84%py3_build
85
86%if %{with tests}
87LC_ALL=C.UTF-8 \
88SKIP_ONLINE=1 \
89PYTHONPATH=$(pwd) \
90%{__python3} tests/test_all.py
91%endif
92%endif
93
94%install
95rm -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
108rm -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.081117 seconds and 4 git commands to generate.