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