From 6bd8566c48cd8a7d97541cd22d476e80fc1894e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alain=20P=C3=A9teut?= Date: Mon, 26 Dec 2011 13:41:35 +0100 Subject: [PATCH] setup.py: fix to catch all modules MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alain Péteut --- setup.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 4bdf62e4..e46835de 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3.2 +# vim: noexpandtab:tabstop=8:softtabstop=8 """ Migen's distutils distribution and installation script. """ import sys, os @@ -7,9 +8,19 @@ from distutils.core import setup here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README")).read() -if sys.version_info < (3, 2): - raise SystemExit("migen requires python 3.2 or greater") +required_version = (3, 2) +if sys.version_info < required_version: + raise SystemExit("migen requires python {0} or greater".format( + ".".join(map(str, required_version)))) +packages = ['migen'] +packages_dir = os.path.sep.join((here, packages[0])) +for entry in os.listdir(packages_dir): + if (os.path.isdir(os.path.sep.join((packages_dir, entry))) and + os.path.isfile(os.path.sep.join((packages_dir, entry, '__init__.py')))): + packages.append('.'.join((packages[0], entry))) + +packages_dir={'': 'migen'} setup( name="migen", version="unknown", @@ -19,7 +30,7 @@ setup( author_email="sebastien@milkymist.org", url="http://www.milkymist.org", download_url="https://github.com/milkymist/migen", - packages=['', 'migen'], + packages=packages, license="GPL", platforms=["Any"], keywords="HDL ASIC FPGA hardware design", -- 2.30.2