]>
Commit | Line | Data |
---|---|---|
a53b817c JB |
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: Utility library for gitignore style pattern matching of file paths | |
8 | Summary(pl.UTF-8): Biblioteka narzędzioawa do dopasowywania wzorców ścieżek plików w stylu gitignore | |
9 | Name: python-pathspec | |
c8adbbd8 | 10 | Version: 0.9.0 |
aca25f91 | 11 | Release: 2 |
a53b817c JB |
12 | License: MPL v2.0 |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/pathspec/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-%{version}.tar.gz | |
c8adbbd8 | 16 | # Source0-md5: 9b6b70fa5ffc31e6f5700522880140c0 |
a53b817c JB |
17 | URL: https://pypi.org/project/pathspec/ |
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.5 | |
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 | pathspec is a utility library for pattern matching of file paths. So | |
34 | far this only includes Git's wildmatch pattern matching which itself | |
35 | is derived from Rsync's wildmatch. Git uses wildmatch for its | |
36 | gitignore files. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | pathspec to biblioteka narzędziowa do dopasowywania wzorców ścieżek | |
40 | plików. Obecnie obejmuje to tylko algorytm dopasowywania wildmatch | |
41 | Gita, wywodzący się z wildmatch programu Rsync. Git wykorzystuje | |
42 | wildmatch na potrzeby plików gitignore. | |
43 | ||
44 | %package -n python3-pathspec | |
45 | Summary: Utility library for gitignore style pattern matching of file paths | |
46 | Summary(pl.UTF-8): Biblioteka narzędzioawa do dopasowywania wzorców ścieżek plików w stylu gitignore | |
47 | Group: Libraries/Python | |
48 | Requires: python3-modules >= 1:3.5 | |
49 | ||
50 | %description -n python3-pathspec | |
51 | pathspec is a utility library for pattern matching of file paths. So | |
52 | far this only includes Git's wildmatch pattern matching which itself | |
53 | is derived from Rsync's wildmatch. Git uses wildmatch for its | |
54 | gitignore files. | |
55 | ||
56 | %description -n python3-pathspec -l pl.UTF-8 | |
57 | pathspec to biblioteka narzędziowa do dopasowywania wzorców ścieżek | |
58 | plików. Obecnie obejmuje to tylko algorytm dopasowywania wildmatch | |
59 | Gita, wywodzący się z wildmatch programu Rsync. Git wykorzystuje | |
60 | wildmatch na potrzeby plików gitignore. | |
61 | ||
62 | %prep | |
63 | %setup -q -n pathspec-%{version} | |
64 | ||
65 | %build | |
66 | %if %{with python2} | |
67 | %py_build | |
68 | ||
69 | %if %{with tests} | |
70 | %{__python} -m unittest discover -s pathspec/tests | |
71 | %endif | |
72 | %endif | |
73 | ||
74 | %if %{with python3} | |
75 | %py3_build | |
76 | ||
77 | %if %{with tests} | |
78 | %{__python3} -m unittest discover -s pathspec/tests | |
79 | %endif | |
80 | %endif | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %if %{with python2} | |
86 | %py_install | |
87 | ||
b87da2a4 | 88 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pathspec/tests |
a53b817c JB |
89 | %py_postclean |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
93 | %py3_install | |
b87da2a4 JB |
94 | |
95 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pathspec/tests | |
a53b817c JB |
96 | %endif |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %if %{with python2} | |
102 | %files | |
103 | %defattr(644,root,root,755) | |
104 | %doc CHANGES.rst README.rst | |
105 | %{py_sitescriptdir}/pathspec | |
106 | %{py_sitescriptdir}/pathspec-%{version}-py*.egg-info | |
107 | %endif | |
108 | ||
109 | %if %{with python3} | |
110 | %files -n python3-pathspec | |
111 | %defattr(644,root,root,755) | |
112 | %doc CHANGES.rst README.rst | |
113 | %{py3_sitescriptdir}/pathspec | |
114 | %{py3_sitescriptdir}/pathspec-%{version}-py*.egg-info | |
115 | %endif |