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