diff --git a/Makefile b/Makefile
index 11975e13..abe20b3d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
# Compatibility for us old-timers.
-PHONY=check test dist
+PHONY=check clean dist test
all: check
dist:
python ./setup.py sdist bdist
check:
nosetests
+clean:
+ python ./setup.py $@
test: check
.PHONY: $(PHONY)
diff --git a/example/audio.py b/example/audio.py
index 2aeab6a4..0457701e 100755
--- a/example/audio.py
+++ b/example/audio.py
@@ -21,10 +21,6 @@ libcdio distribution for a more complete program.
import sys, os
from optparse import OptionParser
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
diff --git a/example/cd-read.py b/example/cd-read.py
index c195f5e1..47c62598 100755
--- a/example/cd-read.py
+++ b/example/cd-read.py
@@ -21,10 +21,6 @@ for a more complete program.
import sys, os
from optparse import OptionParser
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
diff --git a/example/cdchange.py b/example/cdchange.py
index 0fcfee9d..66ae69dc 100755
--- a/example/cdchange.py
+++ b/example/cdchange.py
@@ -18,10 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import sys, time
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
from time import sleep
diff --git a/example/device.py b/example/device.py
index 5e89c972..c04ca422 100755
--- a/example/device.py
+++ b/example/device.py
@@ -17,10 +17,6 @@
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
diff --git a/example/drives.py b/example/drives.py
index 294e6264..e7934fc1 100755
--- a/example/drives.py
+++ b/example/drives.py
@@ -23,10 +23,6 @@ for a more complete program."""
#
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
diff --git a/example/eject.py b/example/eject.py
index 85e1d65f..0a466bfb 100755
--- a/example/eject.py
+++ b/example/eject.py
@@ -17,10 +17,6 @@
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio
diff --git a/example/iso1.py b/example/iso1.py
index d2846987..03e743c1 100755
--- a/example/iso1.py
+++ b/example/iso1.py
@@ -23,10 +23,6 @@
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import iso9660
# The default ISO 9660 image if none given
diff --git a/example/iso2.py b/example/iso2.py
index 3fa65856..359713bb 100755
--- a/example/iso2.py
+++ b/example/iso2.py
@@ -23,10 +23,6 @@ show using iso9660 to extract a file from an ISO-9660 image."""
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import iso9660
diff --git a/example/iso3.py b/example/iso3.py
index b57baaad..70b53435 100755
--- a/example/iso3.py
+++ b/example/iso3.py
@@ -21,10 +21,6 @@ used."""
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import iso9660
diff --git a/example/tracks.py b/example/tracks.py
index c4aaea3d..91b58975 100755
--- a/example/tracks.py
+++ b/example/tracks.py
@@ -17,10 +17,6 @@
# along with this program. If not, see .
import os, sys
-libdir = os.path.join(os.path.dirname(__file__), '..')
-if libdir[-1] != os.path.sep:
- libdir += os.path.sep
-sys.path.insert(0, libdir)
import pycdio
import cdio