summaryrefslogtreecommitdiffstats
path: root/python-di.spec
blob: f8d74c9fc38fe7a787a9bdeabb8c53953aee17c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%if 0%{?rhel} && 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

Name:           python-di
Version:        0.1
Release:        1%{?dist}
Summary:        Python library for dependency injection support

License:        GPLv2+
URL:            http://fedorapeople.org/cgit/msivak/public_git/python-di.git/

# 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; python setup.py sdist
# it will be in the dist directory
Source0:        http://pypi.python.org/packages/source/d/di/di-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#BuildRequires:  
#Requires:       
BuildArch:      noarch

%description
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.

%prep
%setup -q -n di-%{version}

%build
%{__python} setup.py build

%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