[python-lazy/f20] Initial import of python-lazy-1.1

David Shea dshea at fedoraproject.org
Mon Mar 31 13:44:46 UTC 2014


commit b058dd5df317469bde637673a3ad1dbc432d62fd
Author: David Shea <dshea at redhat.com>
Date:   Mon Mar 31 09:28:41 2014 -0400

    Initial import of python-lazy-1.1

 .gitignore       |    1 +
 python-lazy.spec |   88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources          |    1 +
 3 files changed, 90 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5a551da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/lazy-1.1.zip
diff --git a/python-lazy.spec b/python-lazy.spec
new file mode 100644
index 0000000..33abd0e
--- /dev/null
+++ b/python-lazy.spec
@@ -0,0 +1,88 @@
+Name:           python-lazy
+Version:        1.1
+Release:        1%{?dist}
+Summary:        Lazy attributes for Python objects
+
+License:        BSD
+URL:            https://pypi.python.org/pypi/lazy
+Source0:        https://pypi.python.org/packages/source/l/lazy/lazy-%{version}.zip
+
+BuildArch:      noarch
+
+BuildRequires:  python2-devel, python3-devel
+BuildRequires:  python-setuptools, python3-setuptools
+BuildRequires:  python-sphinx, python3-sphinx
+
+%description
+Lazy attributes are computed attributes that are evaluated only once, the first
+time they are used.  Subsequent uses return the results of the first call. They
+come handy when code should run
+
+- *late*, i.e. just before it is needed, and
+- *once*, i.e. not twice, in the lifetime of an object.
+
+You can think of it as deferred initialization.
+The possibilities are endless.
+
+%package -n python3-lazy
+Summary:        Lazy attributes for objects in Python 3
+
+%description -n python3-lazy
+Lazy attributes are computed attributes that are evaluated only once, the first
+time they are used.  Subsequent uses return the results of the first call. They
+come handy when code should run
+
+- *late*, i.e. just before it is needed, and
+- *once*, i.e. not twice, in the lifetime of an object.
+
+You can think of it as deferred initialization.
+The possibilities are endless.
+
+%prep
+%setup -q -n lazy-%{version}
+rm -rf lazy.egg-info
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
+%build
+%{__python2} setup.py build
+make -C docs html SPHINXBUILD=sphinx-build %{?_smp_mflags}
+
+( cd %{py3dir} &&
+  %{__python3} setup.py build &&
+  make -C docs html SPHINXBUILD=sphinx-build-%{python3_version} %{?_smp_mflags}
+)
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+( cd %{py3dir} && %{__python3} setup.py install --skip-build --root %{buildroot} )
+
+mkdir -p %{buildroot}%{_docdir}/python-lazy
+mkdir -p %{buildroot}%{_docdir}/python3-lazy
+
+cp -r docs/_build/html %{buildroot}%{_docdir}/python-lazy
+rm -f %{buildroot}%{_docdir}/python-lazy/html/.buildinfo
+rm -f %{buildroot}%{_docdir}/python-lazy/html/objects.inv
+cp -r %{py3dir}/docs/_build/html %{buildroot}%{_docdir}/python3-lazy
+rm -f %{buildroot}%{_docdir}/python3-lazy/html/.buildinfo
+rm -f %{buildroot}%{_docdir}/python3-lazy/html/objects.inv
+
+%check
+%{__python2} setup.py check
+( cd %{py3dir} && %{__python3} setup.py check )
+
+%files
+%doc CHANGES.txt README.txt
+%{python2_sitelib}/lazy
+%{python2_sitelib}/lazy-%{version}-*.egg-info
+
+%files -n python3-lazy
+%dir %{_docdir}/python3-lazy
+%doc %{_docdir}/python3-lazy/html
+%{python3_sitelib}/lazy
+%{python3_sitelib}/lazy-%{version}-*.egg-info
+
+%changelog
+* Thu Mar 20 2014 David Shea <dshea at redhat.com> - 1.1-1
+- Initial package
diff --git a/sources b/sources
index e69de29..f83cd09 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2b9d2aeeec0e3bdc6c073faaaa802d7a  lazy-1.1.zip


More information about the scm-commits mailing list