]> git.pld-linux.org Git - packages/python-pyperclip.git/blob - python-pyperclip.spec
d09d2228ac9af04872be204c69fb87ef57401b15
[packages/python-pyperclip.git] / python-pyperclip.spec
1 # Conditional build:
2 %bcond_without  doc     # don't build doc
3 %bcond_with     tests   # do perform "make test" (broken)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        A cross-platform clipboard module for Python
8 Name:           python-pyperclip
9 Version:        1.5.27
10 Release:        5
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/7b/a5/48eaa1f2d77f900679e9759d2c9ab44895e66e9612f7f6b5333273b68f29/pyperclip-%{version}.zip
14 # Source0-md5:  18b86c2e6d10ed827cdd42aed80b4cbe
15 URL:            https://pypi.python.org/pypi/pyperclip
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.714
18 %if %{with python2}
19 BuildRequires:  python-setuptools
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-setuptools
23 %endif
24 Requires:       python-modules
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 A cross-platform clipboard module for Python. (only handles plain text
30 for now)
31
32 %package -n python3-pyperclip
33 Summary:        A cross-platform clipboard module for Python
34 Group:          Libraries/Python
35 Requires:       python3-modules
36
37 %description -n python3-pyperclip
38 A cross-platform clipboard module for Python. (only handles plain text
39 for now)
40
41 %package apidocs
42 Summary:        API documentation for Python pyperclip module
43 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyperclip
44 Group:          Documentation
45
46 %description apidocs
47 API documentation for Pythona pyperclip module.
48
49 %description apidocs -l pl.UTF-8
50 Dokumentacja API modułu Pythona pyperclip.
51
52 %prep
53 %setup -q -n pyperclip-%{version}
54
55 %build
56 %if %{with python2}
57 %py_build %{?with_tests:test}
58 %endif
59
60 %if %{with python3}
61 %py3_build %{?with_tests:test}
62 %endif
63
64 %if %{with doc}
65 cd docs
66 %{__make} -j1 html
67 rm -rf _build/html/_sources
68 %endif
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72
73 %if %{with python2}
74 %py_install
75
76 %py_postclean
77 %endif
78
79 %if %{with python3}
80 %py3_install
81 %endif
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %files
88 %defattr(644,root,root,755)
89 %{py_sitescriptdir}/pyperclip
90 %{py_sitescriptdir}/pyperclip-%{version}-py*.egg-info
91 %if %{with doc}
92 %doc docs/_build/html/*
93 %endif
94 %endif
95
96 %if %{with python3}
97 %files -n python3-pyperclip
98 %defattr(644,root,root,755)
99 %{py3_sitescriptdir}/pyperclip
100 %{py3_sitescriptdir}/pyperclip-%{version}-py*.egg-info
101 %if %{with doc}
102 %doc docs/_build/html/*
103 %endif
104 %endif
This page took 0.05235 seconds and 2 git commands to generate.