]> git.pld-linux.org Git - packages/python-d2to1.git/blame - python-d2to1.spec
new, version 0.2.11
[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
26%endif
27%if %{with python3}
28BuildRequires: python3-modules
29BuildRequires: python3-setuptools
30%endif
31Requires: python-setuptools
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36d2to1 allows using distutils2-like setup.cfg files for a package's
37metadata with a distribute/setuptools setup.py script. It works by
38providing a distutils2-formatted setup.cfg file containing all of a
39package's metadata, and a very minimal setup.py which will slurp its
40arguments from the setup.cfg.
41
42%package -n python3-d2to1
43Summary: Allows using distutils2-like setup.cfg files with setup.py
44Group: Libraries/Python
45Requires: python3-setuptools
46
47%description -n python3-d2to1
48d2to1 allows using distutils2-like setup.cfg files for a package's
49metadata with a distribute/setuptools setup.py script. It works by
50providing a distutils2-formatted setup.cfg file containing all of a
51package's metadata, and a very minimal setup.py which will slurp its
52arguments from the setup.cfg.
53
54%prep
55%setup -q -n %{module}-%{version}
56
57rm -r %{module}.egg-info
58
59%build
60%if %{with python2}
61%{__python} setup.py build --build-base build-2 %{?with_tests:test}
62%endif
63
64%if %{with python3}
65%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
66%endif
67
68%install
69rm -rf $RPM_BUILD_ROOT
70
71%if %{with python2}
72%{__python} setup.py \
73 build --build-base build-2 \
74 install --skip-build \
75 --optimize=2 \
76 --root=$RPM_BUILD_ROOT
77
78%py_postclean
79%endif
80
81%if %{with python3}
82%{__python3} setup.py \
83 build --build-base build-3 \
84 install --skip-build \
85 --optimize=2 \
86 --root=$RPM_BUILD_ROOT
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%if %{with python2}
93%files
94%defattr(644,root,root,755)
95%doc CHANGES.rst LICENSE README.rst
96%dir %{py_sitescriptdir}/d2to1
97%{py_sitescriptdir}/d2to1/*.py[co]
98%dir %{py_sitescriptdir}/d2to1/extern
99%{py_sitescriptdir}/d2to1/extern/__init__.py[co]
100%{py_sitescriptdir}/d2to1/extern/six.py[co]
101%{py_sitescriptdir}/d2to1-%{version}-py*.egg-info
102%endif
103
104%if %{with python3}
105%files -n python3-d2to1
106%defattr(644,root,root,755)
107%doc CHANGES.rst LICENSE README.rst
108%{py3_sitescriptdir}/*
109%endif
This page took 0.098035 seconds and 4 git commands to generate.