--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,11 @@
 with open("README.rst", "r") as fh:
     long_description = fh.read()
 
+if sys.version_info[0] < 3:
+    pyversion = ''
+else:
+    pyversion = '3'
+
 setup(
     name='pyjavaproperties',
     version='0.7',
@@ -25,6 +30,8 @@
         'Topic :: Software Development :: Libraries :: Python Modules',
       ],
     py_modules=['pyjavaproperties'],
-    packages=[''],
-    package_dir={'': '.'},
+    data_files=[('share/python' + pyversion + '-pyjavaproperties',
+                 ['pyjavaproperties_test.py']),
+                ('share/python' + pyversion + '-pyjavaproperties/testdata',
+                 ['testdata/complex.properties'])],
     )
