[python-profilehooks] Initial import
Bohuslav Kabrda
bkabrda at fedoraproject.org
Mon Jul 2 05:47:31 UTC 2012
commit 4bebf9aac19d3e75a61ba866ae6eaa0c38bba282
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date: Mon Jul 2 07:47:26 2012 +0200
Initial import
.gitignore | 1 +
python-profilehooks.spec | 93 ++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a15ef7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/profilehooks-1.6.tar.gz
diff --git a/python-profilehooks.spec b/python-profilehooks.spec
new file mode 100644
index 0000000..5493be3
--- /dev/null
+++ b/python-profilehooks.spec
@@ -0,0 +1,93 @@
+# Created by pyp2rpm-0.5.0
+%global pypi_name profilehooks
+%global with_python3 1
+
+Name: python-%{pypi_name}
+Version: 1.6
+Release: 1%{?dist}
+Summary: Decorators for profiling/timing/tracing individual functions
+
+License: MIT
+URL: http://pypi.python.org/pypi/profilehooks/1.6
+Source0: http://pypi.python.org/packages/source/p/profilehooks/profilehooks-1.6.tar.gz
+BuildArch: noarch
+
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+
+%if %{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif # if with_python3
+
+%description
+Profilehooks is a collection of decorators for profiling functions.
+
+
+%if 0%{?with_python3}
+%package -n python3-%{pypi_name}
+Summary: Decorators for profiling/timing/tracing individual functions
+
+%description -n python3-%{pypi_name}
+Profilehooks is a collection of decorators for profiling functions.
+%endif # with_python3
+
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+
+%endif # with_python3
+
+
+%build
+%{__python} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+# Must do the subpackages' install first because the scripts in /usr/bin are
+# overwritten with every setup.py install (and we want the python2 version
+# to be the default for now).
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install --skip-build --root %{buildroot}
+
+
+%check
+# tests all available Python versions => don't need to switch to py3dir then
+make test-all-pythons
+
+
+%files
+%doc README.txt
+%{python_sitelib}/%{pypi_name}.py*
+%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{pypi_name}
+%doc README.txt
+%{python3_sitelib}/__pycache__/*
+%{python3_sitelib}/%{pypi_name}.py
+%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%endif # with_python3
+
+
+%changelog
+* Tue Jun 05 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.6-1
+- Initial package.
diff --git a/sources b/sources
index e69de29..6e6e834 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9bdfb453af49f28b70b731c5ac25ce58 profilehooks-1.6.tar.gz
More information about the scm-commits
mailing list