[packages/python-wheel] new, version 0.24.0

glen glen at pld-linux.org
Sat May 23 15:44:38 CEST 2015


commit 9739dc1f74a5b93497b9cc2d7dcdd1d0fa0de8bd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 23 16:43:45 2015 +0300

    new, version 0.24.0
    
    based on fedora package bbc3044

 python-wheel.spec | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 136 insertions(+)
---
diff --git a/python-wheel.spec b/python-wheel.spec
new file mode 100644
index 0000000..3f79373
--- /dev/null
+++ b/python-wheel.spec
@@ -0,0 +1,136 @@
+#
+# Conditional build:
+%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module
+
+%define 	module	wheel
+Summary:	A built-package format for Python
+Name:		python-%{module}
+Version:	0.24.0
+Release:	0.1
+License:	MIT
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/source/w/%{module}/%{module}-%{version}.tar.gz
+# Source0-md5:	3b0d66f0d127ea8befaa5d11453107fd
+URL:		https://bitbucket.org/pypa/wheel
+%if %{with python2}
+BuildRequires:	python-argparse
+BuildRequires:	python-devel
+BuildRequires:	python-jsonschema
+BuildRequires:	python-keyring
+BuildRequires:	python-pytest
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel
+BuildRequires:	python3-jsonschema
+BuildRequires:	python3-keyring
+BuildRequires:	python3-pytest
+BuildRequires:	python3-setuptools
+%endif
+Requires:	python-argparse
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A built-package format for Python.
+
+A wheel is a ZIP-format archive with a specially formatted filename
+and the .whl extension. It is designed to contain all the files for a
+PEP 376 compatible install in a way that is very close to the on-disk
+format.
+
+%package -n python3-%{module}
+Summary:	A built-package format for Python
+Group:		Libraries/Python
+
+%description -n python3-%{module}
+A built-package format for Python.
+
+A wheel is a ZIP-format archive with a specially formatted filename
+and the .whl extension. It is designed to contain all the files for a
+PEP 376 compatible install in a way that is very close to the on-disk
+format.
+
+This is package contains Python 3 version of the package.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+# remove unneeded shebangs
+sed -ie '1d' %{module}/{egg2wheel,wininst2wheel}.py
+
+%if %{with python3}
+set -- *
+install -d py3
+cp -a "$@" py3
+%endif
+
+%build
+%if %{with python2}
+%{__python} setup.py build
+%endif
+
+%if %{with python3}
+cd py3
+%{__python3} setup.py build
+%endif
+
+%if %{with test}
+# remove setup.cfg that makes pytest require pytest-cov (unnecessary dep)
+rm setup.cfg
+PYTHONPATH=$(pwd) py.test --ignore build -k 'not test_keygen'
+
+# no test for Python 3, no python3-jsonschema yet
+%if %{with python3} && 0
+cd py3
+rm setup.cfg
+PYTHONPATH=$(pwd) py.test-%{py3_ver} --ignore build
+%endif
+
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python3}
+cd py3
+%{__python3} setup.py install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+cd $RPM_BUILD_ROOT%{_bindir}
+	for f in $(ls); do mv $f python3-$f; done
+cd -
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/test
+%endif
+
+%if %{with python2}
+%{__python} setup.py install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/test
+
+%py_postclean
+%endif
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt CHANGES.txt README.txt
+%attr(755,root,root) %{_bindir}/wheel
+%{py_sitescriptdir}/wheel
+%{py_sitescriptdir}/wheel-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc LICENSE.txt CHANGES.txt README.txt
+%attr(755,root,root) %{__python}3-wheel
+%{py3_sitescriptdir}/%{module}*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-wheel.git/commitdiff/9739dc1f74a5b93497b9cc2d7dcdd1d0fa0de8bd



More information about the pld-cvs-commit mailing list