source: projects/specs/trunk/p/python-netifaces/python-netifaces-vl.spec @ 10604

Revision 10604, 5.0 KB checked in by tomop, 8 years ago (diff)

python-netifaces-0.10.4-5

Line 
1%{!?__python3:%global __python3 /usr/bin/python3}
2%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
3%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
4%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
5%{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
6%{!?__python2: %global __python2 /usr/bin/python2}
7%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
8%define py2_setup setup.py
9%define py2_shbang_opts -s
10%define py2_build() %{expand:\
11 CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1}\
12}
13%define py2_install() %{expand:\
14 CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
15}
16%define py3_setup setup.py
17%define py3_shbang_opts -s
18%define py3_build() %{expand:\
19 CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?1}\
20}
21%define py3_install() %{expand:\
22 CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
23}
24%define py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
25
26
27%global with_python3 1
28
29%global pypi_name netifaces
30
31Name:           python-netifaces
32Version:        0.10.4
33Release:        5%{?_dist_release}
34Summary:        Python library to retrieve information about network interfaces
35
36Group:          Development/Libraries
37License:        MIT
38URL:            https://pypi.python.org/pypi/netifaces
39
40Vendor:         Project Vine
41Distribution:   Vine Linux
42
43Source0:        https://pypi.python.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
44
45BuildRequires:  python-devel
46BuildRequires:  python-setuptools
47
48
49%description
50This package provides a cross platform API for getting address information
51from network interfaces.
52
53%if 0%{?with_python3}
54%package -n python3-%{pypi_name}
55Summary:        Python library to retrieve information about network interfaces
56BuildRequires:  python3-devel
57BuildRequires:  python3-setuptools
58
59%description -n python3-%{pypi_name}
60This package provides a cross platform API for getting address information
61from network interfaces.
62%endif
63
64
65%prep
66%setup -q -n %{pypi_name}-%{version}
67
68%if 0%{?with_python3}
69rm -rf %{py3dir}
70cp -a . %{py3dir}
71%endif
72
73
74%build
75%{__python2} setup.py build
76
77%if 0%{?with_python3}
78pushd %{py3dir}
79%{__python3} setup.py build
80popd
81%endif
82
83
84%install
85%{__python2} setup.py install --root $RPM_BUILD_ROOT
86
87%if 0%{?with_python3}
88pushd %{py3dir}
89%{__python3} setup.py install --root $RPM_BUILD_ROOT
90popd
91%endif
92
93%clean
94%if 0%{?with_python3}
95rm -rf %{py3dir}
96%endif
97rm -rf %{buildroot}
98
99
100%files
101%doc README.rst
102%{python2_sitearch}/%{pypi_name}-%{version}-*.egg-info/
103%{python2_sitearch}/%{pypi_name}.so
104
105%if 0%{?with_python3}
106%files -n python3-%{pypi_name}
107%doc README.rst
108%{python3_sitearch}/%{pypi_name}-%{version}-*.egg-info/
109%{python3_sitearch}/%{pypi_name}*.so
110%endif
111
112%changelog
113* Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.10.4-5
114- initial build for Vine Linux.
115
116* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.4-4
117- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
118
119* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-3
120- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
121
122* Tue Jun 16 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-2
123- Add python3 subpackage
124
125* Mon Feb 23 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-1
126- Upstream 0.10.4
127- Packaging cleanups
128
129* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-8
130- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
131
132* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5-7
133- Replace python-setuptools-devel BR with python-setuptools
134
135* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
136- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
137
138* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
139- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
140
141* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
142- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
143
144* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
145- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
146
147* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-2
148- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
149
150* Wed Jun 1 2011 Ryan Rix <ry@n.rix.si> 0.5-1
151- Initial packaging effort
Note: See TracBrowser for help on using the repository browser.