summaryrefslogtreecommitdiffstats
path: root/SPECS/python-ghp-import.spec
blob: 83b9789491f31101e35730952d188b436d9355f7 (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
%global gitname ghp-import
%global with_python3 1
Name:           python-%{gitname}
Version:        0.4.1
Release:        1%{?dist}
Summary:        Copies docs directly to the gh-pages branch of a GitHub repo

License:        Tumbolia Public License
URL:            https://github.com/davisp/%{gitname}
Source0:        https://pypi.python.org/packages/source/g/%{gitname}/%{gitname}-%{version}.tar.gz
Patch0:        0001-open-README.md-in-setup-as-utf8-for-py3.patch

BuildArch:      noarch
BuildRequires:  python-devel
Requires:       git
%description
ghp-import manages content in the gh-pages branch of your GitHub repo. 
Use it to publish documentation or other content that requires sources 
in your main branch.

%if 0%{?with_python3}
%package -n python3-ghp-import
Summary:        Copies docs directly to the gh-pages branch of a GitHub repo
BuildRequires:  python3-devel
Requires:       git
%description -n python3-ghp-import
ghp-import manages content in the gh-pages branch of your GitHub repo. 
Use it to publish documentation or other content that requires sources 
in your main branch.
%endif

%prep
%setup -q -n %{gitname}-%{version}
#%patch0 -p1 -b .utf8_import

%build
%{__python} setup.py build
mv build build2

%if 0%{?with_python3}
%{__python3} setup.py build
mv build build3
%endif


%install
export LANG=C
#sed -i -e 's/, encoding="utf-8"//' build/setup.py
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%if 0%{?with_python3}
rm -rf build
mv build3 build
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%endif 

%files
%doc
# For noarch packages: sitelib
#%{python_sitelib}/*
# For arch-specific packages: sitearch


%changelog
* Thu Dec  4 2014 Pete Travis <me@petetravis.com>
- Initial build.