| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hey all,
Quick question I have enclosed a spec file and it is reasonably rpmlint
clean the last is relating to documentation not being utf-compliant.
Is it ok to install the python package the way I have done it. Ignore
the #comments since I will be removing them later since I was trying to
install everything and make the required files executible.
The other question I have is that the desktop file works but the icons
relating to that desktop file are located under
%{python_sitelib}/%{name}/icons
I was advised by someone to create a symbolic link but every time I
create that I get an error and it won't create the spec file.
Any guidance or pointing to documentation would be appreciated as well.
Cheers,
Marc
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: drpython
Version: 165
Release: 1%{?dist}
Summary: A simple Python IDE designed with teaching in mind
Group: Development/Tools
License: GPLv2+
URL: http://drpython.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}%{version}.zip
Source1: %{name}.desktop
Patch0: setup.py.postinst.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel, wxPython-devel, desktop-file-utils, python-setuptools-devel
Requires: python, wxPython
Buildarch: noarch
%description
DrPython is a highly customizable cross-platform ide to aid
programming in Python. It was developed with teaching in mind,
and has a clean, simple interface. It is written in Python,
using wxPython as the gui.
%prep
%setup -q -n %{name}
%patch -p1
# Change Windows line endings to Unix line endings
for file in $(find *.txt *.TXT -type f); do
sed -i 's/\r//' $file
done
# Remove Windows related files and patch the setup.py file so it doesn't rely on the file
rm -rf tools/
rm -f postinst.py
rm -f setup.cfg
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install_lib --skip-build -d $RPM_BUILD_ROOT%{python_sitelib}
install -pm 0655 build/lib/%{name}/%{name}.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}
install -pm 0655 build/lib/%{name}/documentation/pyrst2html.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}/documentation/pyrst2html.py
install -pm 0655 build/lib/%{name}/documentation/drdoc.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}/documentation/drdoc.py
install -pm 0655 build/lib/%{name}/drpython* $RPM_BUILD_ROOT%{python_sitelib}/%{name}
install -pm 0655 build/lib/%{name}/lnkDecoderRing.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}
install -pm 0655 build/lib/%{name}/drZip.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}
install -pm 0655 build/lib/%{name}/drSetupPreferences.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}
#install -d $RPM_BUILD_ROOT%{python_sitelib}/%{name}
#install -d $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps/16
#install -d $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps/24
#install -d $RPM_BUILD_ROOT%{python_sitelib}/%{name}/examples/DrScript
#install -d $RPM_BUILD_ROOT%{python_sitelib}/%{name}/documentation/
#install -pm 0644 build/lib/%{name}/%{name}.py $RPM_BUILD_ROOT%{python_sitelib}/%{name}
#install -pD build/lib/drpython/bitmaps/16/* $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps/16
#install -pD build/lib/drpython/bitmaps/24/* $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps/24
#install -p build/lib/drpython/bitmaps/*png $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps
#install -pD build/lib/drpython/examples/DrScript/* $RPM_BUILD_ROOT%{python_sitelib}/%{name}/examples/DrScript
#install -pD build/lib/drpython/documentation/* $RPM_BUILD_ROOT%{python_sitelib}/%{name}/documentation
desktop-file-install --vendor="fedora" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE1}
#/bin/ln -s $RPM_BUILD_ROOT%{python_sitelib}/%{name}/bitmaps/drpython.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/drpython.png
#/bin/cp -l bitmaps/drpython.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/drpython.png
#install -pm 0644 bitmaps/drpython.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/drpython.png
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Notes.txt todo.txt README.TXT Changelog.txt History.txt
%docdir %{python_sitelib}/%{name}/documentation/
%{python_sitelib}/%{name}/
%{_datadir}/applications/fedora-drpython.desktop
#%{_datadir}/pixmaps/drpython.png
%changelog
* Wed Dec 26 2007 Marc Wiriadisastra <marc@xxxxxxxxxxxxxx> 165-1
- Initial spec file
-- Fedora-mentors-list mailing list Fedora-mentors-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-mentors-list
[Home] [Fedora Legacy] [Fedora Desktop] [Red Hat 9 Bible] [Fedora Bible] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]