3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Distribution utilities
8 Summary(pl.UTF-8): Narzędzia do dystrybuowania
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
23 BuildRequires: python-modules >= 1:2.7
26 BuildRequires: python3-modules >= 1:3.6
28 BuildConflicts: python3-astroid < 2.3.3-2
29 BuildConflicts: python3-pylint < 2.4.4-2
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
34 BuildRequires: sed >= 4.0
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Low-level components of distutils2/packaging, augmented with
42 higher-level APIs for making packaging easier.
44 %description -l pl.UTF-8
45 Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
46 wysokopoziomowe API ułatwiające pakietowanie.
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
54 %description -n python3-distlib
55 Low-level components of distutils2/packaging, augmented with
56 higher-level APIs for making packaging easier.
58 %description -n python3-distlib -l pl.UTF-8
59 Niskopoziomowe komponenty distutils2/packaging, rozszerzone o
60 wysokopoziomowe API ułatwiające pakietowanie.
63 %setup -q -n distlib-%{version}
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
79 %{__python} tests/test_all.py
90 %{__python3} tests/test_all.py
95 rm -rf $RPM_BUILD_ROOT
108 rm -rf $RPM_BUILD_ROOT
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
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