1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
6 name = python-setuptools
10 thisapp = distribute-%{version}
12 maintainer = Michael Tremer <michael.tremer@ipfire.org>
13 groups = Development/Libraries
14 url = http://pypi.python.org/pypi/setuptools
15 license = Python or ZPLv2.0
16 summary = Easily build and distribute Python packages.
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.
24 source_dl = http://pypi.python.org/packages/source/d/distribute/
28 pakfire-builder >= 0.9.23-2
33 DIR_APP3 = %{DIR_APP}-python3
36 cp -av %{DIR_APP} %{DIR_APP3}
39 for file in setuptools/command/easy_install.py distribute_setup.py ; do
40 sed -i '1s|^#!python|#!%{python3}|' $file
44 # Scripts seem to have a wrong hashbang
45 for file in setuptools/command/easy_install.py distribute_setup.py ; do
46 sed -i '1s|^#!python|#!%{python}|' $file
49 # Fix file permissions.
50 chmod -R 644 {%{DIR_APP},%{DIR_APP3}}/distribute.egg-info
55 CFLAGS="%{CFLAGS}" %{python3} setup.py build
58 CFLAGS="%{CFLAGS}" %{python} setup.py build
63 %{python3} setup.py install --skip-build --root=%{BUILDROOT}
65 rm -rvf %{BUILDROOT}%{python3_sitelib}/setuptools/tests
66 chmod +x %{BUILDROOT}%{python3_sitelib}/setuptools/command/easy_install.py
69 %{python} setup.py install --skip-build --root=%{BUILDROOT}
71 rm -rvf %{BUILDROOT}%{python_sitelib}/setuptools/tests
72 chmod +x %{BUILDROOT}%{python_sitelib}/setuptools/command/easy_install.py
74 find %{BUILDROOT}{%{python_sitelib},%{python3_sitelib}} -name "*.exe" | xargs rm -vf
81 package python3-setuptools
84 files += %{bindir}/easy_install-3*