]> git.pld-linux.org Git - packages/python-d2to1.git/blame - python-d2to1.spec
tests BR
[packages/python-d2to1.git] / python-d2to1.spec
CommitLineData
eaf5760c
ER
1# TODO
2# - extern/six -> python-six?
3
4#
5# Conditional build:
6%bcond_without doc # don't build doc
7%bcond_without tests # do not perform "make test"
8%bcond_without python2 # CPython 2.x module
9%bcond_with python3 # CPython 3.x module
10
11%define module d2to1
12Summary: Allows using distutils2-like setup.cfg files with setup.py
13Name: python-%{module}
14Version: 0.2.11
15Release: 1
16License: BSD
17Group: Libraries/Python
18Source0: http://pypi.python.org/packages/source/d/d2to1/%{module}-%{version}.tar.gz
19# Source0-md5: 81addef3dde584ab89b35ada8177c0d0
20URL: http://pypi.python.org/pypi/d2to1
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.219
23%if %{with python2}
24BuildRequires: python-modules
25BuildRequires: python-setuptools
4c6d6332
ER
26%if %{with tests}
27BuildRequires: python-nose
28%endif
eaf5760c
ER
29%endif
30%if %{with python3}
31BuildRequires: python3-modules
32BuildRequires: python3-setuptools
4c6d6332
ER
33%if %{with tests}
34BuildRequires: python3-nose
35%endif
eaf5760c
ER
36%endif
37Requires: python-setuptools
38BuildArch: noarch
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42d2to1 allows using distutils2-like setup.cfg files for a package's
43metadata with a distribute/setuptools setup.py script. It works by
44providing a distutils2-formatted setup.cfg file containing all of a
45package's metadata, and a very minimal setup.py which will slurp its
46arguments from the setup.cfg.
47
48%package -n python3-d2to1
49Summary: Allows using distutils2-like setup.cfg files with setup.py
50Group: Libraries/Python
51Requires: python3-setuptools
52
53%description -n python3-d2to1
54d2to1 allows using distutils2-like setup.cfg files for a package's
55metadata with a distribute/setuptools setup.py script. It works by
56providing a distutils2-formatted setup.cfg file containing all of a
57package's metadata, and a very minimal setup.py which will slurp its
58arguments from the setup.cfg.
59
60%prep
61%setup -q -n %{module}-%{version}
62
63rm -r %{module}.egg-info
64
65%build
66%if %{with python2}
67%{__python} setup.py build --build-base build-2 %{?with_tests:test}
68%endif
69
70%if %{with python3}
71%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77%if %{with python2}
78%{__python} setup.py \
79 build --build-base build-2 \
80 install --skip-build \
81 --optimize=2 \
82 --root=$RPM_BUILD_ROOT
83
84%py_postclean
85%endif
86
87%if %{with python3}
88%{__python3} setup.py \
89 build --build-base build-3 \
90 install --skip-build \
91 --optimize=2 \
92 --root=$RPM_BUILD_ROOT
93%endif
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
99%files
100%defattr(644,root,root,755)
101%doc CHANGES.rst LICENSE README.rst
102%dir %{py_sitescriptdir}/d2to1
103%{py_sitescriptdir}/d2to1/*.py[co]
104%dir %{py_sitescriptdir}/d2to1/extern
105%{py_sitescriptdir}/d2to1/extern/__init__.py[co]
106%{py_sitescriptdir}/d2to1/extern/six.py[co]
107%{py_sitescriptdir}/d2to1-%{version}-py*.egg-info
108%endif
109
110%if %{with python3}
111%files -n python3-d2to1
112%defattr(644,root,root,755)
113%doc CHANGES.rst LICENSE README.rst
114%{py3_sitescriptdir}/*
115%endif
This page took 0.097498 seconds and 4 git commands to generate.