]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - python-setuptools/python-setuptools.nm
libnl3: New package.
[people/ms/ipfire-3.x.git] / python-setuptools / python-setuptools.nm
CommitLineData
30780b8a 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
30780b8a
SS
4###############################################################################
5
802ea3af 6name = python-setuptools
9f394aa3 7version = 0.6.28
e035b2df 8release = 2
802ea3af 9arch = noarch
9f394aa3 10thisapp = distribute-%{version}
802ea3af
MT
11
12maintainer = Michael Tremer <michael.tremer@ipfire.org>
13groups = Development/Libraries
14url = http://pypi.python.org/pypi/setuptools
15license = Python or ZPLv2.0
16summary = Easily build and distribute Python packages.
17
18description
19 Setuptools is a collection of enhancements to the Python distutils
20 that allow you to more easily build and distribute Python packages,
21 especially ones that have dependencies on other packages.
22end
30780b8a 23
9f394aa3 24source_dl = http://pypi.python.org/packages/source/d/distribute/
30780b8a 25
802ea3af
MT
26build
27 requires
e035b2df 28 pakfire-builder >= 0.9.23-2
802ea3af 29 python-devel
e035b2df 30 python3-devel
802ea3af 31 end
30780b8a 32
e035b2df
MT
33 DIR_APP3 = %{DIR_APP}-python3
34
802ea3af 35 prepare_cmds
e035b2df
MT
36 cp -av %{DIR_APP} %{DIR_APP3}
37
38 pushd %{DIR_APP3}
39 for file in setuptools/command/easy_install.py distribute_setup.py ; do
40 sed -i '1s|^#!python|#!%{python3}|' $file
41 done
42 popd
43
802ea3af 44 # Scripts seem to have a wrong hashbang
9f394aa3 45 for file in setuptools/command/easy_install.py distribute_setup.py ; do
e035b2df 46 sed -i '1s|^#!python|#!%{python}|' $file
9f394aa3
SS
47 done
48
49 # Fix file permissions.
e035b2df 50 chmod -R 644 {%{DIR_APP},%{DIR_APP3}}/distribute.egg-info
802ea3af 51 end
30780b8a 52
802ea3af 53 build
e035b2df
MT
54 pushd %{DIR_APP3}
55 CFLAGS="%{CFLAGS}" %{python3} setup.py build
56 popd
57
58 CFLAGS="%{CFLAGS}" %{python} setup.py build
802ea3af 59 end
30780b8a 60
802ea3af 61 install
e035b2df
MT
62 pushd %{DIR_APP3}
63 %{python3} setup.py install --skip-build --root=%{BUILDROOT}
30780b8a 64
e035b2df
MT
65 rm -rvf %{BUILDROOT}%{python3_sitelib}/setuptools/tests
66 chmod +x %{BUILDROOT}%{python3_sitelib}/setuptools/command/easy_install.py
67 popd
68
69 %{python} setup.py install --skip-build --root=%{BUILDROOT}
70
71 rm -rvf %{BUILDROOT}%{python_sitelib}/setuptools/tests
72 chmod +x %{BUILDROOT}%{python_sitelib}/setuptools/command/easy_install.py
73
74 find %{BUILDROOT}{%{python_sitelib},%{python3_sitelib}} -name "*.exe" | xargs rm -vf
802ea3af
MT
75 end
76end
30780b8a 77
802ea3af
MT
78packages
79 package %{name}
e035b2df
MT
80
81 package python3-setuptools
82 template PYTHON3
83
84 files += %{bindir}/easy_install-3*
85 end
802ea3af 86end