summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Travis <immanetize@fedoraproject.org>2015-02-19 23:08:53 -0700
committerPete Travis <immanetize@fedoraproject.org>2015-02-19 23:08:53 -0700
commit4092642e927bf529e9008f409e2c4257a110b652 (patch)
tree0d14a003ef7cfb0484e8743f6891c889c508bb3c
parent08b01b8f3f227bda87ee2591c7e6ccb379fad187 (diff)
downloadrpmbuild-python-cached_property.tar.gz
rpmbuild-python-cached_property.tar.xz
rpmbuild-python-cached_property.zip
initial python-cached-property buildpython-cached_property
-rw-r--r--SPECS/python-cached_property.spec65
-rw-r--r--SRPMS/python-cached-property-1.0.0-1.fc23.src.rpmbin0 -> 15413 bytes
2 files changed, 65 insertions, 0 deletions
diff --git a/SPECS/python-cached_property.spec b/SPECS/python-cached_property.spec
new file mode 100644
index 0000000..f3c2357
--- /dev/null
+++ b/SPECS/python-cached_property.spec
@@ -0,0 +1,65 @@
+# sitelib for noarch packages, sitearch for others (remove the unneeded one)
+%{!?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))")}
+
+%global projectname cached-property
+Name: python-%{projectname}
+Version: 1.0.0
+Release: 1%{?dist}
+Summary: A cached-property for decorating methods in Python classes.
+
+License: BSD
+URL: https://github.com/pydanny/cached-property
+Source0: https://github.com/pydanny/%{projectname}/archive/%{version}.tar.gz
+
+BuildArch: noarch
+BuildRequires: python-devel
+BuildRequires: python-tox
+BuildRequires: python-freezegun
+BuildRequires: python3-devel
+BuildRequires: python3-freezegun
+
+%description
+cached_property allows properties in Python classes to be cached until the cache
+is invalidated or expired.
+
+%package -n python3-%{projectname}
+Summary: A cached-property for decorating methods in Python classes.
+
+%description -n python3-%{projectname}
+cached_property allows properties in Python classes to be cached until the cache
+is invalidated or expired.
+
+%prep
+%setup -q -n %{projectname}-%{version}
+cp -a . %{py3dir}
+
+%build
+# Remove CFLAGS=... for noarch packages (unneeded)
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+
+%install
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+
+%check
+tox --sitepackages --skip-missing-interpreters
+
+%files
+%doc AUTHORS.rst HISTORY.rst CONTRIBUTING.rst README.rst
+%license LICENSE
+%{python_sitelib}/cached_property*
+
+%files -n python3-%{projectname}
+%doc AUTHORS.rst HISTORY.rst CONTRIBUTING.rst README.rst
+%license LICENSE
+%{python3_sitelib}/cached_property*
+%{python3_sitelib}/__pycache__/cached_property*
+
+%changelog
+* Fri Feb 20 2015 Pete Travis <me@petetravis.com>
+- Initial packaging.
diff --git a/SRPMS/python-cached-property-1.0.0-1.fc23.src.rpm b/SRPMS/python-cached-property-1.0.0-1.fc23.src.rpm
new file mode 100644
index 0000000..d802343
--- /dev/null
+++ b/SRPMS/python-cached-property-1.0.0-1.fc23.src.rpm
Binary files differ