]> git.pld-linux.org Git - packages/python-d2to1.git/blame - python-d2to1.spec
- python 3.7 rebuild
[packages/python-d2to1.git] / python-d2to1.spec
CommitLineData
5933ce47 1# TODO: extern/six -> python-six?
eaf5760c
ER
2#
3# Conditional build:
5933ce47 4%bcond_without tests # test target
eaf5760c 5%bcond_without python2 # CPython 2.x module
5933ce47 6%bcond_without python3 # CPython 3.x module
eaf5760c
ER
7
8%define module d2to1
5933ce47
JB
9Summary: Allow using distutils2-like setup.cfg files with setup.py (Python 2 version)
10Summary(pl.UTF-8): Możliwość używania setup.cfg w stylu distutils2 z setup.py (wersja dla Pythona 2)
eaf5760c 11Name: python-%{module}
5933ce47 12Version: 0.2.12.post1
c63aea7a 13Release: 3
eaf5760c
ER
14License: BSD
15Group: Libraries/Python
5933ce47
JB
16#Source0Download: URL: https://pypi.python.org/pypi/d2to1
17Source0: https://pypi.python.org/packages/source/d/d2to1/%{module}-%{version}.tar.gz
18# Source0-md5: 1ba7e64ead23cbf104993122f0871030
19URL: https://pypi.python.org/pypi/d2to1
eaf5760c 20BuildRequires: rpm-pythonprov
bdee49b4 21BuildRequires: rpmbuild(macros) >= 1.710
eaf5760c 22%if %{with python2}
5933ce47 23BuildRequires: python-modules >= 1:2.5
eaf5760c 24BuildRequires: python-setuptools
4c6d6332
ER
25%if %{with tests}
26BuildRequires: python-nose
27%endif
eaf5760c
ER
28%endif
29%if %{with python3}
5933ce47 30BuildRequires: python3-modules >= 1:3.2
eaf5760c 31BuildRequires: python3-setuptools
4c6d6332
ER
32%if %{with tests}
33BuildRequires: python3-nose
34%endif
eaf5760c
ER
35%endif
36Requires: python-setuptools
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41d2to1 allows using distutils2-like setup.cfg files for a package's
42metadata with a distribute/setuptools setup.py script. It works by
43providing a distutils2-formatted setup.cfg file containing all of a
44package's metadata, and a very minimal setup.py which will slurp its
45arguments from the setup.cfg.
46
5933ce47
JB
47%description -l pl.UTF-8
48d2to1 pozwala na używanie plików setup.cfg w stylu distutils2 jako
49metadanych pakietu ze skryptem setup.py typowym dla
50distribute/setuptools. Działa poprzez dostarczenie pliku setup.cfg w
51formacie distutils2, zawierającego wszystkie metadane pakietu oraz
52minimalnego pliku setup.py, który pobiera wszystkie argumenty z pliku
53setup.cfg.
54
eaf5760c 55%package -n python3-d2to1
5933ce47
JB
56Summary: Allow using distutils2-like setup.cfg files with setup.py (Python 3 version)
57Summary(pl.UTF-8): Możliwość używania setup.cfg w stylu distutils2 z setup.py (wersja dla Pythona 3)
eaf5760c
ER
58Group: Libraries/Python
59Requires: python3-setuptools
60
61%description -n python3-d2to1
62d2to1 allows using distutils2-like setup.cfg files for a package's
63metadata with a distribute/setuptools setup.py script. It works by
64providing a distutils2-formatted setup.cfg file containing all of a
65package's metadata, and a very minimal setup.py which will slurp its
66arguments from the setup.cfg.
67
5933ce47
JB
68%description -n python3-d2to1 -l pl.UTF-8
69d2to1 pozwala na używanie plików setup.cfg w stylu distutils2 jako
70metadanych pakietu ze skryptem setup.py typowym dla
71distribute/setuptools. Działa poprzez dostarczenie pliku setup.cfg w
72formacie distutils2, zawierającego wszystkie metadane pakietu oraz
73minimalnego pliku setup.py, który pobiera wszystkie argumenty z pliku
74setup.cfg.
75
eaf5760c
ER
76%prep
77%setup -q -n %{module}-%{version}
78
5933ce47 79%{__rm} -r %{module}.egg-info
eaf5760c
ER
80
81%build
82%if %{with python2}
ae58a0a0 83%py_build %{?with_tests:test}
eaf5760c
ER
84%endif
85
86%if %{with python3}
ae58a0a0 87%py3_build %{?with_tests:test}
eaf5760c
ER
88%endif
89
90%install
91rm -rf $RPM_BUILD_ROOT
92
93%if %{with python2}
ae58a0a0 94%py_install
eaf5760c
ER
95
96%py_postclean
97%endif
98
99%if %{with python3}
ae58a0a0 100%py3_install
eaf5760c
ER
101%endif
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
5933ce47 109%doc CHANGES.rst CONTRIBUTORS LICENSE README.rst
eaf5760c
ER
110%dir %{py_sitescriptdir}/d2to1
111%{py_sitescriptdir}/d2to1/*.py[co]
112%dir %{py_sitescriptdir}/d2to1/extern
113%{py_sitescriptdir}/d2to1/extern/__init__.py[co]
114%{py_sitescriptdir}/d2to1/extern/six.py[co]
115%{py_sitescriptdir}/d2to1-%{version}-py*.egg-info
116%endif
117
118%if %{with python3}
119%files -n python3-d2to1
120%defattr(644,root,root,755)
5933ce47
JB
121%doc CHANGES.rst CONTRIBUTORS LICENSE README.rst
122%{py3_sitescriptdir}/d2to1
123%{py3_sitescriptdir}/d2to1-%{version}-py*.egg-info
eaf5760c 124%endif
This page took 0.178103 seconds and 4 git commands to generate.