summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2012-11-23 15:10:19 (GMT)
committerMartin Sivak <msivak@redhat.com>2012-11-23 16:57:48 (GMT)
commit9c3b555b4ca3c999857e3948e463f4e560c94b7d (patch)
treec70338b6d22b85a1cee7531da02d789805c4143d
parent8a2ad82232251a7e91dc01bcefcf21d79ba38b79 (diff)
downloadpython-di-9c3b555b4ca3c999857e3948e463f4e560c94b7d.zip
python-di-9c3b555b4ca3c999857e3948e463f4e560c94b7d.tar.gz
python-di-9c3b555b4ca3c999857e3948e463f4e560c94b7d.tar.xz
Tweaking of the Fedora spec file
-rw-r--r--python-di.spec29
1 files changed, 23 insertions, 6 deletions
diff --git a/python-di.spec b/python-di.spec
index 9efd750..2f1a643 100644
--- a/python-di.spec
+++ b/python-di.spec
@@ -10,15 +10,21 @@ Summary: Python library for dependency injection support
License: GPLv2+
URL: http://fedorapeople.org/cgit/msivak/public_git/python-di.git/
-Source0: python-di-%{version}-%{release}.tar.gz
+
+# get the current source file using the following two commands
+# git clone git://fedorapeople.org/home/fedora/msivak/public_git/python-di.git
+# cd python-di; git archive --prefix=%{name}-%{version}/ HEAD | gzip -9 >%{name}-%{version}.tar.gz
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildRequires:
#Requires:
+BuildArch: noarch
%description
-This python package provides a "di" module. That module contains couple of
-decorators which try to implement Dependency Injection pattern without
-requiring the user to change local variables in his methods.
+This python package provides a "di" module. The module contains a couple of
+decorators which try to implement the Dependency Injection (IoC) pattern
+without requiring the user to change local variables in his methods.
It is intended to be used in unit testing environments.
@@ -26,16 +32,27 @@ It is intended to be used in unit testing environments.
%setup -q
%build
-%{__python} setup.py make
+%{__python} setup.py build
%install
-%{__python} setup.py install
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+rm -rf ${buildroot}%{python_sitelib}/setuptools/tests
+
+%check
+%{__python} setup.py test
+
+%clean
+rm -rf $RPM_BUILD_ROOT
%files
%{python_sitelib}/di
+%{python_sitelib}/di-*.egg-info
%doc
%changelog
+* Fri Nov 23 2012 Martin Sivak <msivak@euryale.brq.redhat.com> - 0.1-1
+- Inital release
+