mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-07 12:23:16 -04:00
Fixed PYTHONV bug
This commit is contained in:
parent
06ffc7a5f4
commit
7b879edbcc
@ -50,28 +50,6 @@ if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
|
|||||||
|
|
||||||
os.chdir(PANDASOURCE)
|
os.chdir(PANDASOURCE)
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## Locate the Python SDK
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
if sys.platform == "win32":
|
|
||||||
PythonSDK="python2.2"
|
|
||||||
if 0: # Needs testing:
|
|
||||||
if (os.path.isdir("C:/Python22")): PythonSDK = "C:/Python22"
|
|
||||||
elif (os.path.isdir("C:/Python23")): PythonSDK = "C:/Python23"
|
|
||||||
elif (os.path.isdir("C:/Python24")): PythonSDK = "C:/Python24"
|
|
||||||
elif (os.path.isdir("C:/Python25")): PythonSDK = "C:/Python25"
|
|
||||||
else: sys.exit("Cannot find the python SDK")
|
|
||||||
else:
|
|
||||||
if (os.path.isdir("/usr/include/python2.5")): PythonSDK = "/usr/include/python2.5"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.4")): PythonSDK = "/usr/include/python2.4"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.3")): PythonSDK = "/usr/include/python2.3"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.2")): PythonSDK = "/usr/include/python2.2"
|
|
||||||
else: sys.exit("Cannot find the python SDK")
|
|
||||||
# this is so that the user can find out which version of python was used.
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
## Read the default version number from dtool/PandaVersion.pp
|
## Read the default version number from dtool/PandaVersion.pp
|
||||||
@ -121,13 +99,16 @@ The Panda3D engine.
|
|||||||
%build
|
%build
|
||||||
makepanda/makepanda.py --version VERSION --everything MOREARGUMENTS
|
makepanda/makepanda.py --version VERSION --everything MOREARGUMENTS
|
||||||
%install
|
%install
|
||||||
|
|
||||||
|
PYTHONV=`cat built/bin/pythonversion`
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/include
|
mkdir -p $RPM_BUILD_ROOT/usr/include
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/panda3d
|
mkdir -p $RPM_BUILD_ROOT/usr/share/panda3d
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/PYTHONV/lib-dynload
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/$PYTHONV/lib-dynload
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/PYTHONV/site-packages
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/$PYTHONV/site-packages
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
|
|
||||||
@ -149,12 +130,12 @@ cp doc/LICENSE $RPM_BUILD_ROOT/usr/share/panda3d/LICENSE
|
|||||||
cp doc/LICENSE $RPM_BUILD_ROOT/usr/include/panda3d/LICENSE
|
cp doc/LICENSE $RPM_BUILD_ROOT/usr/include/panda3d/LICENSE
|
||||||
cp doc/ReleaseNotes $RPM_BUILD_ROOT/usr/share/panda3d/ReleaseNotes
|
cp doc/ReleaseNotes $RPM_BUILD_ROOT/usr/share/panda3d/ReleaseNotes
|
||||||
echo "/usr/lib/panda3d" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/panda3d.conf
|
echo "/usr/lib/panda3d" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/panda3d.conf
|
||||||
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/PYTHONV/site-packages/panda3d.pth
|
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/$PYTHONV/site-packages/panda3d.pth
|
||||||
cp built/bin/* $RPM_BUILD_ROOT/usr/bin/
|
cp built/bin/* $RPM_BUILD_ROOT/usr/bin/
|
||||||
|
|
||||||
for x in built/lib/* ; do
|
for x in built/lib/* ; do
|
||||||
base=`basename $x`
|
base=`basename $x`
|
||||||
ln -sf /usr/lib/panda3d/$base $RPM_BUILD_ROOT/usr/lib/PYTHONV/lib-dynload/$base
|
ln -sf /usr/lib/panda3d/$base $RPM_BUILD_ROOT/usr/lib/$PYTHONV/lib-dynload/$base
|
||||||
done
|
done
|
||||||
for x in $RPM_BUILD_ROOT/usr/share/panda3d/direct/src/* ; do
|
for x in $RPM_BUILD_ROOT/usr/share/panda3d/direct/src/* ; do
|
||||||
if [ `basename $x` != extensions ] ; then
|
if [ `basename $x` != extensions ] ; then
|
||||||
@ -169,8 +150,6 @@ chmod -R 555 $RPM_BUILD_ROOT/usr/share/panda3d
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
rm -rf /usr/lib/PYTHONV/direct
|
|
||||||
rm -rf /usr/lib/PYTHONV/SceneEditor
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%clean
|
%clean
|
||||||
@ -190,7 +169,6 @@ MORE=''
|
|||||||
for x in sys.argv[2:]: MORE=MORE+x+' '
|
for x in sys.argv[2:]: MORE=MORE+x+' '
|
||||||
SPEC=SPEC.replace("VERSION",str(VERSION))
|
SPEC=SPEC.replace("VERSION",str(VERSION))
|
||||||
SPEC=SPEC.replace("MOREARGUMENTS",MORE)
|
SPEC=SPEC.replace("MOREARGUMENTS",MORE)
|
||||||
SPEC=SPEC.replace("PYTHONV",os.path.basename(PythonSDK))
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
|
Loading…
x
Reference in New Issue
Block a user