From 0b8e48021e626ff0d95874cca5af6825fdd4e456 Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Tue, 11 Jan 2011 00:41:35 -0800 Subject: [PATCH] support bdist_rpm --- rpm/install | 13 +++++++++++++ setup.cfg | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 rpm/install create mode 100644 setup.cfg diff --git a/rpm/install b/rpm/install new file mode 100644 index 00000000..319b1a0e --- /dev/null +++ b/rpm/install @@ -0,0 +1,13 @@ +%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT + +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +INSTALLED_FILES="\ +%{python_sitelib}/* +%{_bindir}/* +%doc doc +" +echo "$INSTALLED_FILES" > INSTALLED_FILES diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..73c3895d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[bdist_rpm] +packager = Randall Leeds +build-requires = python2-devel python-setuptools +requires = python-setuptools >= 0.6c6 python-ctypes +install_script = rpm/install