summaryrefslogtreecommitdiffstats
path: root/python-workdays.spec
blob: 64f8fd9147a5bbaaa736a9b68ee242c1032ca3d9 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%if 0%{?fedora}
%global with_python3 1
%endif

%define srcname workdays

Name:           python-%{srcname}
Version:        1.4
Release:        1%{?dist}
Summary:        Workday date utility functions to extend python's datetime
License:        BSD
URL:            http://github.com/ogt/workdays
Source0:        https://pypi.python.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz


BuildRequires:  python-devel >= 2.6
BuildRequires:  python-setuptools
%if 0%{?with_python3}
BuildRequires:  python3-devel
%endif # with_python3

BuildArch:      noarch

%description
Extend python datetime with excel-like workday addition/subtraction


%package -n python2-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Extend python datetime with excel-like workday addition/subtraction

%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary:        %{summary}
Requires:       python3
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Extend python datetime with excel-like workday addition/subtraction
%endif # with_python3

%prep
%autosetup -n %{srcname}-%{version} -p1

%build
%{py2_build}

%if 0%{?with_python3}
%{py3_build}
%endif # with_python3

%install
%py2_install

%if 0%{?with_python3}
%py3_install
%endif # with_python3

%files -n python2-%{srcname}
%{python_sitelib}/*

%if 0%{?with_python3}
%files -n python3-%{srcname}
%{python3_sitelib}/*
%endif # with_python3


%changelog
* Fri Apr 07 2017 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.4-1
- initial package