On Sat, 22 Oct 2005, Phillip J. Eby wrote:

Everything is installed in:
/usr/lib/python2.3/site-packages/setuptools-0.6a5-py2.3.egg/

How did you install it there? Via easy_install, or using some other process? I suspect that you installed it some way that didn't include the setuptools.pth file.

I'm the one creating the rpm :) I enclose the spec file.
What it does is this:

python setup.py build
python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT \
    --record=INSTALLED_FILES.tmp

In INSTALLED_FILES.tmp I cannot see any pth file, so it is not included in the rpm, as thes are the files it will include.

Check for a /usr/lib/python2.3/site-packages/setuptools.pth file. It's probably missing. Alternately, you might see if there is an easy-install.pth, or some other .pth file that points to the setuptools egg.

You are right, no pth file included, not a single one.

If there is none, I'm guessing you installed a broken RPM or other broken packaging of setuptools, and you should report the problem to whoever packaged it.

How can I make the pth appear when executing the "python setup.py install" command? Should I execute something else? I'm using the standard Fedora template for creating python rpms.

Thanks a lot for your help!

--

Pau
# TemplateVer:  0.4

%{?!python:%define python python}
%{?!pybasever:%{expand:%%define pybasever %(%{__python} -c "import sys ; print 
sys.version[:3]")}}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define origname setuptools

Name:           %{python}-setuptools 
Version:        0.6a5
Release:        1
Summary:        Download, build, install, upgrade, and uninstall Python 
packages -- easily

Group:          Development/Libraries
License:        Python Software Foundation License
URL:            http://peak.telecommunity.com/DevCenter/setuptools
Source0:        %{origname}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  %{python}-devel
Requires:       python-abi = %{pybasever}

%description
setup tools is acollection of enhancements to the Python ``distutils``
(for Python 2.3 and up) that allow you to more easily build and distribute
Python packages, especially ones that have dependencies on other packages.

%prep
%setup -n %{origname}-%{version} -q

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT 
--record=INSTALLED_FILES.tmp

# Ghost optimized 
sed 's/\(.*\.pyo\)/%ghost \1/' < INSTALLED_FILES.tmp > INSTALLED_FILES
find $RPM_BUILD_ROOT%{python_sitearch} -type d \
| sed "s|^$RPM_BUILD_ROOT|%dir |" >> INSTALLED_FILES

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root,-)
%doc *.txt

%changelog
* Mon Aug 29 2005 Pau Aliagas <[EMAIL PROTECTED]> 0.6a5-1
- first version from svn trunk
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to