]> git.pld-linux.org Git - packages/python-d2to1.git/blame - python-d2to1.spec
- release 2 (by relup.sh)
[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
c28ed2b1 15Release: 2
eaf5760c
ER
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}
ae58a0a0 67%py_build %{?with_tests:test}
eaf5760c
ER
68%endif
69
70%if %{with python3}
ae58a0a0 71%py3_build %{?with_tests:test}
eaf5760c
ER
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77%if %{with python2}
ae58a0a0 78%py_install
eaf5760c
ER
79
80%py_postclean
81%endif
82
83%if %{with python3}
ae58a0a0 84%py3_install
eaf5760c
ER
85%endif
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
91%files
92%defattr(644,root,root,755)
93%doc CHANGES.rst LICENSE README.rst
94%dir %{py_sitescriptdir}/d2to1
95%{py_sitescriptdir}/d2to1/*.py[co]
96%dir %{py_sitescriptdir}/d2to1/extern
97%{py_sitescriptdir}/d2to1/extern/__init__.py[co]
98%{py_sitescriptdir}/d2to1/extern/six.py[co]
99%{py_sitescriptdir}/d2to1-%{version}-py*.egg-info
100%endif
101
102%if %{with python3}
103%files -n python3-d2to1
104%defattr(644,root,root,755)
105%doc CHANGES.rst LICENSE README.rst
106%{py3_sitescriptdir}/*
107%endif
This page took 0.09671 seconds and 4 git commands to generate.