← Back to team overview

openshot.developers team mailing list archive

[Bug 439205] Re: OpenShot has not been installed in the Python path

 

Jonathan, thanks for the pointer. I had  looked for a post-install
script in the openshot-mlt but didn't find one and didn't imagine the
MLT post-install would occur in the openshot package.

Here's the offending code from the openshot postinst script:
----------
# loop through each item in the Python path list
for path in sys.path:
	# does this contain 'site-packages'
	if str.lower(path).find("site-packages") > 0 or str.lower(path).find("dist-packages") > 0:

		print "--------------------------------------------"
		print "Copying MLT python bindings to: %s" % path
		
		# copy the bindings into the site-packages folder
		subprocess.call('sudo cp /usr/local/share/openshot/main/install/mlt.py %s' % path, shell=True)
		subprocess.call('sudo cp /usr/local/share/openshot/main/install/_mlt.so %s' % path, shell=True)
		subprocess.call('sudo cp /usr/local/share/openshot/main/install/mlt_wrap.o %s' % path, shell=True)
		
		# stop looping
		break

# refresh shared libraries
subprocess.call('sudo ldconfig', shell=True)
----------

There ought to  be (have been) a matching prerm script in the same
package that reversed this operation so that when the package removal
operations (apt-get remove, dpkg -r) or replacement by the PPA package
are called the package cleans up after itself.

What I will do is add a pre-install script to the PPA openshot package
to clean this up. Ideally as it is dealing with MLT it would go into the
python-mlt package, but I don't want to 'pollute' that package with
scripts handling files modified by openshot.

The manual fix for now is to remove these files:

sudo rm
/usr/lib/python2.{5/site,6/dist}-packages/{_mlt.so,mlt_wrap.o,mlt.py}

** Changed in: openshot
   Importance: Undecided => Medium

** Changed in: openshot
     Assignee: (unassigned) => TJ (intuitivenipple)

** Changed in: openshot
       Status: Confirmed => In Progress

-- 
OpenShot has not been installed in the Python path
https://bugs.launchpad.net/bugs/439205
You received this bug notification because you are a member of OpenShot
Developers, which is subscribed to OpenShot Video Editor.

Status in OpenShot Video Editor: In Progress

Bug description:
I'm using Ubuntu 9.04.

After installing 0.9.42 from PPA, when I run openshot that is what I get:
-------------------------------------------------------------------------------------------------------------------
Added /usr/share/openshot to system path
--------------------------------
   OpenShot (version 0.9.42)
--------------------------------
-------------------------------------------------------
Error:  OpenShot has not been installed in the Python path.
(Both the site-packages and /usr/share/openshot folders were checked)

Use the following command to install OpenShot:
  $ sudo python setup.py install
-------------------------------------------------------------------------------------------------------------------

I couldn't find 'setup.py' on the openshot package.
I have other PPA respositories in use so maybe there is an issue with them. I can't really be sure about this.