3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Topological sort algorithm
8 Summary(pl.UTF-8): Algorytm sortowania topologicznego
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/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
23 BuildRequires: python3-modules >= 1:3.3
24 BuildRequires: python3-setuptools
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.714
28 Requires: python-modules >= 1:2.7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 This module implements a topological sort algorithm.
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
40 %description -l pl.UTF-8
41 Ten moduł implementuje algorytm sortowania topologicznego.
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.
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
54 %description -n python3-toposort
55 This module implements a topological sort algorithm.
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
62 %description -n python3-toposort -l pl.UTF-8
63 Ten moduł implementuje algorytm sortowania topologicznego.
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.
71 %setup -q -n toposort-%{version}
78 %{__python} -m test.test_toposort
86 %{__python3} -m test.test_toposort
91 rm -rf $RPM_BUILD_ROOT
104 rm -rf $RPM_BUILD_ROOT
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
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