]> git.pld-linux.org Git - packages/python3-dugong.git/blob - python3-dugong.spec
- fix shebangs
[packages/python3-dugong.git] / python3-dugong.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define         module  dugong
6 Summary:        A HTTP 1.1 client module
7 # Name must match the python module/package name (as in 'import' statement)
8 Name:           python3-%{module}
9 Version:        3.7.3
10 Release:        2
11 License:        PSF
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/d/dugong/dugong-%{version}.tar.bz2
14 # Source0-md5:  7e1b12a36da16bd3502858893e9555be
15 URL:            https://bitbucket.org/nikratio/python-dugong
16 BuildRequires:  rpmbuild(macros) >= 1.710
17 BuildRequires:  python3-devel
18 BuildRequires:  python3-distribute
19 BuildRequires:  python3-modules
20 BuildRequires:  rpm-pythonprov
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 A HTTP 1.1 client module.
26
27 %package apidocs
28 Summary:        %{module} API documentation
29 Summary(pl.UTF-8):      Dokumentacja API %{module}
30 Group:          Documentation
31
32 %description apidocs
33 API documentation for %{module}.
34
35 %description apidocs -l pl.UTF-8
36 Dokumentacja API %{module}.
37
38 %prep
39 %setup -q -n %{module}-%{version}
40
41 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
42       examples/extract_links.py \
43       examples/httpcat.py \
44       examples/pipeline1.py
45
46 %build
47 %py3_build %{?with_tests:test}
48
49 %if %{with doc}
50 cd docs
51 %{__make} -j1 html
52 rm -rf _build/html/_sources
53 %endif
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 %py3_install
59
60 # in case there are examples provided
61 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
62 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
63 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
64         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %files
70 %defattr(644,root,root,755)
71 %doc Changes.rst
72 %{py3_sitescriptdir}/%{module}
73 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
74 %{_examplesdir}/python3-%{module}-%{version}
75
76 %if %{with doc}
77 %files apidocs
78 %defattr(644,root,root,755)
79 %doc docs/_build/html/*
80 %endif
This page took 0.099571 seconds and 3 git commands to generate.