]> git.pld-linux.org Git - packages/python-d2to1.git/commitdiff
new, version 0.2.11 auto/th/python-d2to1-0.2.11-1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 8 Dec 2014 08:23:10 +0000 (10:23 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 8 Dec 2014 08:24:28 +0000 (10:24 +0200)
based on fedora package 776df76

python-d2to1.spec [new file with mode: 0644]

diff --git a/python-d2to1.spec b/python-d2to1.spec
new file mode 100644 (file)
index 0000000..e9acd81
--- /dev/null
@@ -0,0 +1,109 @@
+# TODO
+# - extern/six -> python-six?
+
+#
+# Conditional build:
+%bcond_without doc             # don't build doc
+%bcond_without tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_with    python3 # CPython 3.x module
+
+%define        module  d2to1
+Summary:       Allows using distutils2-like setup.cfg files with setup.py
+Name:          python-%{module}
+Version:       0.2.11
+Release:       1
+License:       BSD
+Group:         Libraries/Python
+Source0:       http://pypi.python.org/packages/source/d/d2to1/%{module}-%{version}.tar.gz
+# Source0-md5: 81addef3dde584ab89b35ada8177c0d0
+URL:           http://pypi.python.org/pypi/d2to1
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%endif
+Requires:      python-setuptools
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+d2to1 allows using distutils2-like setup.cfg files for a package's
+metadata with a distribute/setuptools setup.py script. It works by
+providing a distutils2-formatted setup.cfg file containing all of a
+package's metadata, and a very minimal setup.py which will slurp its
+arguments from the setup.cfg.
+
+%package -n python3-d2to1
+Summary:       Allows using distutils2-like setup.cfg files with setup.py
+Group:         Libraries/Python
+Requires:      python3-setuptools
+
+%description -n python3-d2to1
+d2to1 allows using distutils2-like setup.cfg files for a package's
+metadata with a distribute/setuptools setup.py script. It works by
+providing a distutils2-formatted setup.cfg file containing all of a
+package's metadata, and a very minimal setup.py which will slurp its
+arguments from the setup.cfg.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+rm -r %{module}.egg-info
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.rst LICENSE README.rst
+%dir %{py_sitescriptdir}/d2to1
+%{py_sitescriptdir}/d2to1/*.py[co]
+%dir %{py_sitescriptdir}/d2to1/extern
+%{py_sitescriptdir}/d2to1/extern/__init__.py[co]
+%{py_sitescriptdir}/d2to1/extern/six.py[co]
+%{py_sitescriptdir}/d2to1-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-d2to1
+%defattr(644,root,root,755)
+%doc CHANGES.rst LICENSE README.rst
+%{py3_sitescriptdir}/*
+%endif
This page took 0.159155 seconds and 4 git commands to generate.