From dd796b3f0cad76b88fbd6c69895af4389e8e85f3 Mon Sep 17 00:00:00 2001 From: Gabriel Falcao Date: Thu, 6 Sep 2012 16:22:51 -0400 Subject: [PATCH] improving setup.py --- couleur.py => couleur/__init__.py | 0 setup.py | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) rename couleur.py => couleur/__init__.py (100%) diff --git a/couleur.py b/couleur/__init__.py similarity index 100% rename from couleur.py rename to couleur/__init__.py diff --git a/setup.py b/setup.py index f20d5d9..d1d7997 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,20 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -from setuptools import setup +import os from couleur import version +from setuptools import setup + + +def get_packages(): + # setuptools can't do the job :( + packages = [] + for root, dirnames, filenames in os.walk('couleur'): + if '__init__.py' in filenames: + packages.append(".".join(os.path.split(root)).strip(".")) + + return packages + setup(name='couleur', version=version, @@ -25,7 +37,7 @@ setup(name='couleur', author='Gabriel Falcao', author_email='gabriel@nacaolivre.org', url='http://github.com/gabrielfalcao/couleur', - py_modules=['couleur'], + packages=get_packages(), classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: Apache Software License',