]> git.pld-linux.org Git - packages/python3-dugong.git/blame - python3-dugong.spec
- fix shebangs
[packages/python3-dugong.git] / python3-dugong.spec
CommitLineData
9ef393d1
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4
51580594 5%define module dugong
9ef393d1
AM
6Summary: A HTTP 1.1 client module
7# Name must match the python module/package name (as in 'import' statement)
8Name: python3-%{module}
51580594 9Version: 3.7.3
729bac12 10Release: 2
9ef393d1
AM
11License: PSF
12Group: Libraries/Python
ca271a9f 13Source0: https://pypi.python.org/packages/source/d/dugong/dugong-%{version}.tar.bz2
51580594 14# Source0-md5: 7e1b12a36da16bd3502858893e9555be
9ef393d1 15URL: https://bitbucket.org/nikratio/python-dugong
e88ca811 16BuildRequires: rpmbuild(macros) >= 1.710
9ef393d1
AM
17BuildRequires: python3-devel
18BuildRequires: python3-distribute
19BuildRequires: python3-modules
20BuildRequires: rpm-pythonprov
cdc95f17 21BuildArch: noarch
9ef393d1
AM
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25A HTTP 1.1 client module.
26
27%package apidocs
28Summary: %{module} API documentation
29Summary(pl.UTF-8): Dokumentacja API %{module}
30Group: Documentation
31
32%description apidocs
33API documentation for %{module}.
34
35%description apidocs -l pl.UTF-8
36Dokumentacja API %{module}.
37
38%prep
39%setup -q -n %{module}-%{version}
40
cdc95f17
JR
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
9ef393d1 46%build
33f684fc 47%py3_build %{?with_tests:test}
9ef393d1
AM
48
49%if %{with doc}
50cd docs
51%{__make} -j1 html
52rm -rf _build/html/_sources
53%endif
54
55%install
56rm -rf $RPM_BUILD_ROOT
57
33f684fc 58%py3_install
9ef393d1
AM
59
60# in case there are examples provided
61install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
62cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
63find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
64 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
65
66%clean
67rm -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.057345 seconds and 4 git commands to generate.