]> git.pld-linux.org Git - packages/python-toposort.git/blob - python-toposort.spec
8289c045fb5da347790a3fdd2b5bffc5340e71d8
[packages/python-toposort.git] / python-toposort.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Topological sort algorithm
8 Summary(pl.UTF-8):      Algorytm sortowania topologicznego
9 Name:           python-toposort
10 Version:        1.5
11 Release:        3
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/toposort/
15 Source0:        https://files.pythonhosted.org/packages/source/t/toposort/toposort-%{version}.tar.gz
16 # Source0-md5:  472cf86871d19b66d7cb18412c026959
17 URL:            https://pypi.org/project/toposort/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.3
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.7
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This module implements a topological sort algorithm.
34
35 Topological sort (topsort, toposort) or topological ordering of a
36 directed graph is a linear ordering of its vertices such that for
37 every directed edge uv from vertex u to vertex v, u comes before v in
38 the ordering.
39
40 %description -l pl.UTF-8
41 Ten moduł implementuje algorytm sortowania topologicznego.
42
43 Sortowanie topologiczne (topsort, toposort), inaczej porządek
44 topologiczny grafu skierowanego to porządek liniowy wierzchołków tego
45 grafu taki, że dla każdej skierowanej krawędzi uv od wierzchołka u do
46 wierzchołka v, u występuje przed v.
47
48 %package -n python3-toposort
49 Summary:        Topological sort algorithm
50 Summary(pl.UTF-8):      Algorytm sortowania topologicznego
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.3
53
54 %description -n python3-toposort
55 This module implements a topological sort algorithm.
56
57 Topological sort (topsort, toposort) or topological ordering of a
58 directed graph is a linear ordering of its vertices such that for
59 every directed edge uv from vertex u to vertex v, u comes before v in
60 the ordering.
61
62 %description -n python3-toposort -l pl.UTF-8
63 Ten moduł implementuje algorytm sortowania topologicznego.
64
65 Sortowanie topologiczne (topsort, toposort), inaczej porządek
66 topologiczny grafu skierowanego to porządek liniowy wierzchołków tego
67 grafu taki, że dla każdej skierowanej krawędzi uv od wierzchołka u do
68 wierzchołka v, u występuje przed v.
69
70 %prep
71 %setup -q -n toposort-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build
76
77 %if %{with tests}
78 %{__python} -m test.test_toposort
79 %endif
80 %endif
81
82 %if %{with python3}
83 %py3_build
84
85 %if %{with tests}
86 %{__python3} -m test.test_toposort
87 %endif
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %py_install
95
96 %py_postclean
97 %endif
98
99 %if %{with python3}
100 %py3_install
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %files
108 %defattr(644,root,root,755)
109 %doc CHANGES.txt NOTICE README.txt
110 %{py_sitescriptdir}/toposort.py[co]
111 %{py_sitescriptdir}/toposort-%{version}-py*.egg-info
112 %endif
113
114 %if %{with python3}
115 %files -n python3-toposort
116 %defattr(644,root,root,755)
117 %doc CHANGES.txt NOTICE README.txt
118 %{py3_sitescriptdir}/toposort.py
119 %{py3_sitescriptdir}/__pycache__/toposort.cpython-*.py[co]
120 %{py3_sitescriptdir}/toposort-%{version}-py*.egg-info
121 %endif
This page took 0.054158 seconds and 2 git commands to generate.