commit:     a3b98d25abca54b394db944e3f3258100ab89e09
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 14:29:14 2015 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 14:29:14 2015 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=a3b98d25

 update setup.py to support repoman

 setup.py | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/setup.py b/setup.py
index e68da85..85f5fbb 100644
--- a/setup.py
+++ b/setup.py
@@ -8,21 +8,19 @@ except ImportError:
        use_setuptools()
        from setuptools import setup
 
-version = os.path.split(os.path.abspath(__file__))[-2].split('-')[-1]
-
-packages = ['tbc']
-
-package_dir = {'tbc': 'tbc/pym'}
-
+def find_packages():
+        for dirpath, dirnames, filenames in os.walk('tbc/pym'):
+                if '__init__.py' in filenames:
+                        yield os.path.relpath(dirpath, 'tbc/pym')
 setup(
-       name="tbc",
-       version=version,
-       author='Zorry',
-       author_email='[email protected]',
-       url='https://anongit.gentoo.org/git/proj/tinderbox-cluster.git',
-       description='Tinderbox cluster',
-       platforms=["any"],
-       license="GPL2",
-       packages=packages,
-       package_dir=package_dir,
-)
\ No newline at end of file
+        version = os.path.split(os.path.abspath(__file__))[-2].split('-')[-1],
+        packages = list(find_packages()),
+        package_dir = {'': 'tbc/pym'},
+        name="tbc",
+        author='Zorry',
+        author_email='[email protected]',
+        url='https://anongit.gentoo.org/git/proj/tinderbox-cluster.git',
+        description='Tinderbox cluster',
+        platforms=["any"],
+        license="GPL2",
+)

Reply via email to