]> git.pld-linux.org Git - packages/python-pathspec.git/blob - python-pathspec.spec
- python2 note
[packages/python-pathspec.git] / python-pathspec.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:        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
10 # keep 0.9.x here for python2 support
11 Version:        0.9.0
12 Release:        4
13 License:        MPL v2.0
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pathspec/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-%{version}.tar.gz
17 # Source0-md5:  9b6b70fa5ffc31e6f5700522880140c0
18 URL:            https://pypi.org/project/pathspec/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.5
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 Requires:       python-modules >= 1:2.7
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 pathspec is a utility library for pattern matching of file paths. So
35 far this only includes Git's wildmatch pattern matching which itself
36 is derived from Rsync's wildmatch. Git uses wildmatch for its
37 gitignore files.
38
39 %description -l pl.UTF-8
40 pathspec to biblioteka narzędziowa do dopasowywania wzorców ścieżek
41 plików. Obecnie obejmuje to tylko algorytm dopasowywania wildmatch
42 Gita, wywodzący się z wildmatch programu Rsync. Git wykorzystuje
43 wildmatch na potrzeby plików gitignore.
44
45 %package -n python3-pathspec
46 Summary:        Utility library for gitignore style pattern matching of file paths
47 Summary(pl.UTF-8):      Biblioteka narzędzioawa do dopasowywania wzorców ścieżek plików w stylu gitignore
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.5
50
51 %description -n python3-pathspec
52 pathspec is a utility library for pattern matching of file paths. So
53 far this only includes Git's wildmatch pattern matching which itself
54 is derived from Rsync's wildmatch. Git uses wildmatch for its
55 gitignore files.
56
57 %description -n python3-pathspec -l pl.UTF-8
58 pathspec to biblioteka narzędziowa do dopasowywania wzorców ścieżek
59 plików. Obecnie obejmuje to tylko algorytm dopasowywania wildmatch
60 Gita, wywodzący się z wildmatch programu Rsync. Git wykorzystuje
61 wildmatch na potrzeby plików gitignore.
62
63 %prep
64 %setup -q -n pathspec-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build
69
70 %if %{with tests}
71 %{__python} -m unittest discover -s pathspec/tests
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 %{__python3} -m unittest discover -s pathspec/tests
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pathspec/tests
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95
96 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pathspec/tests
97 %endif
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %files
104 %defattr(644,root,root,755)
105 %doc CHANGES.rst README.rst
106 %{py_sitescriptdir}/pathspec
107 %{py_sitescriptdir}/pathspec-%{version}-py*.egg-info
108 %endif
109
110 %if %{with python3}
111 %files -n python3-pathspec
112 %defattr(644,root,root,755)
113 %doc CHANGES.rst README.rst
114 %{py3_sitescriptdir}/pathspec
115 %{py3_sitescriptdir}/pathspec-%{version}-py*.egg-info
116 %endif
This page took 0.094772 seconds and 3 git commands to generate.