]> git.pld-linux.org Git - packages/python-pyglet.git/blob - python-pyglet.spec
e6d77146d455604f6cbc0954bbe65db487894f70
[packages/python-pyglet.git] / python-pyglet.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     tests   # unit tests (display required)
6
7 %define         module  pyglet
8 Summary:        A cross-platform windowing and multimedia library for Python
9 Summary(pl.UTF-8):      Międzyplatformowa biblioteka Pythona do obsługi okien i multimediów
10 Name:           python-%{module}
11 Version:        1.4.4
12 Release:        3
13 License:        BSD
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/pyglet/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pyglet/%{module}-%{version}.zip
17 # Source0-md5:  ebd53b60f55b5d50e63f86e7df121e7a
18 URL:            http://www.pyglet.org/
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  OpenGL >= 3
24 BuildRequires:  python-mock
25 BuildRequires:  python-pytest
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  OpenGL >= 3
33 BuildRequires:  python3-pytest
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 Requires:       python-modules >= 1:2.7
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 pyglet provides an object-oriented programming interface for
44 developing games and other visually-rich applications.
45
46 %description -l pl.UTF-8
47 pyglet dostarcza interfejs do programowania zorientowanego obiektowo
48 dla rozwoju gier i innych aplikacji wizualnych.
49
50 %package -n python3-%{module}
51 Summary:        A cross-platform windowing and multimedia library for Python
52 Summary(pl.UTF-8):      Międzyplatformowa biblioteka Pythona do obsługi okien i multimediów
53 Group:          Libraries/Python
54 Requires:       python3-modules >= 1:3.4
55
56 %description -n python3-%{module}
57 pyglet provides an object-oriented programming interface for
58 developing games and other visually-rich applications.
59
60 %description -n python3-%{module} -l pl.UTF-8
61 pyglet dostarcza interfejs do programowania zorientowanego obiektowo
62 dla rozwoju gier i innych aplikacji wizualnych.
63
64 %prep
65 %setup -q -n %{module}-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 %{__python} -m pytest tests
73 %endif
74 %endif
75
76 %if %{with python3}
77 %py3_build
78
79 %if %{with tests}
80 %{__python3} -m pytest tests
81 %endif
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc LICENSE NOTICE README.rst RELEASE_NOTES
104 %{py_sitescriptdir}/pyglet
105 %{py_sitescriptdir}/pyglet-%{version}-py*.egg-info
106 %endif
107
108 %if %{with python3}
109 %files -n python3-%{module}
110 %defattr(644,root,root,755)
111 %doc LICENSE NOTICE README.rst RELEASE_NOTES
112 %{py3_sitescriptdir}/pyglet
113 %{py3_sitescriptdir}/pyglet-%{version}-py*.egg-info
114 %endif
This page took 0.075976 seconds and 2 git commands to generate.