I am trying create python2 program. I keep an unresolved
dependacy that keeps my program from being installed:
# zypper install openastro.org
Retrieving repository 'home:pelliott11:openastro.org/openSUSE_11.1' metadata [done]
Building repository 'home:pelliott11:openastro.org/openSUSE_11.1' cache [done]
Retrieving repository 'packman 11.1' metadata [done]
Building repository 'packman 11.1' cache [done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides python = 2.6. needed by openastro.org-1.1.23-41.1.i586
Solution 1: do not ask to install a solvable providing openastro.org
Choose the above solution using '1' or cancel using 'c' [1/C]: c
hrnowl:~ #
I have commented out all the Requires: lines and the %py_requires
line.
The problem still manifests. Where is this dependency comming
from? Why can it not resolve in opensuse 11.1?
I include the spec file with commented out requires.
------------------------------
# norootforbuild
#
Name: openastro.org
Version: 1.1.23
Release: 1%{?dist}
Summary: Open Astrology program
Group: Development/Libraries
License: GPLv3
URL: http://openastro.org/
Source0: https://launchpad.net/~pellesimon/+archive/+files/%{name}_%{version}.orig.tar.gz
#patch file produced with #diff -uNr old-dir new-dir
#this patch edits openastro.org.desktop to make it work
Patch0: rpm-desktop.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
#Requires: python >= 2.6.0
#Requires: python-gtk, python-dateutil
#fedora requires python-setuptools-devel
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%else
BuildRequires: python-setuptools
%endif
#rh fed use gnome-python2-desktop
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
#Requires: gnome-python2-desktop
%else
#Requires: gnome-python-desktop
%endif
#Requires: python-cairo, ImageMagick, librsvg2
#suse version uses fdupes
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: fdupes
%endif
#suse requires desktop file update
%if 0%{?suse_version} >= 1101 || 0%{?sles_version}
#This is a horrible kludge that will remain only till
#this bug is fixed:
# https://bugzilla.novell.com/show_bug.cgi?id=430965
BuildRequires: update-desktop-files
%endif
#%{python_sitearch} is where setup.py puts the files
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
#only suse supports %py_requires.
%if 0%{?suse_version} || 0%{?sles_version}
#%py_requires
%endif
%description
A fully featured Open Source Astrology software
Current features include:
* Natal/Radix Charts
* Transit Charts
* Synastry/Combine/Composite Charts
* Customizeable Planets & Aspects
* Additional celestial bodies: Chiron, Pholus, Ceres, Pallas, Juno, Vesta
* Fictional points: North/South Node, Day/Night Pars
* Online Atlas (Geocoder) using geonames (virtually every location)
* Offline Atlas (Geonames database) with about 80.000 major cities!
* Database export/import, Save as JPG, PNG, SVG
* Import from skylendar (*.skif), oroboros (*.xml), astrolog32 (*.dat), Zet8 (*.zbs)
* Ephemeris files for 1800 AD - 2400 AD
* PySwisseph swiss ephemeris wrapper
%prep
%setup -q -n %{name}-%{version}.orig
%patch0 -p1
#if rhel or centos.
%if 0%{?rhel_version} >= 501 || 0%{?centos_version} >= 504
%build
%{__python} -c 'import setuptools; execfile("setup.py")' build
%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
export CFLAGS="$RPM_OPT_FLAGS"
%{__python} -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --prefix=%{_prefix} --root %{buildroot}
%else
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
export CFLAGS="$RPM_OPT_FLAGS"
%{__python} setup.py install -O1 --skip-build --prefix=%{_prefix} \
--root %{buildroot}
#if suse do fdupes to detect duplicates.
%if 0%{?suse_version} || 0%{?sles_version}
%fdupes $RPM_BUILD_ROOT%{python_sitearch}
%endif
#update suse desktop file
%if 0%{?suse_version} >= 1101 || 0%{?sles_version}
#This is a horrible kludge that will remain only till
#this bug is fixed:
# https://bugzilla.novell.com/show_bug.cgi?id=430965
%suse_update_desktop_file -i %{name} Graphics 2DGraphics
%endif
%endif
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/openastro.py
%{_datadir}/openastro.org
%{_datadir}/swisseph
%{_datadir}/applications/openastro.org.desktop
%{_datadir}/openastro.org
%{python_sitearch}
%changelog
* Wed Nov 10 2010 Paul Elliott