setup.py: fix to catch all modules
Signed-off-by: Alain Péteut <peteut@space.unibe.ch>
This commit is contained in:
parent
5f53e6473a
commit
6bd8566c48
17
setup.py
17
setup.py
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3.2
|
#!/usr/bin/env python3.2
|
||||||
|
# vim: noexpandtab:tabstop=8:softtabstop=8
|
||||||
""" Migen's distutils distribution and installation script. """
|
""" Migen's distutils distribution and installation script. """
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
|
@ -7,9 +8,19 @@ from distutils.core import setup
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
README = open(os.path.join(here, "README")).read()
|
README = open(os.path.join(here, "README")).read()
|
||||||
|
|
||||||
if sys.version_info < (3, 2):
|
required_version = (3, 2)
|
||||||
raise SystemExit("migen requires python 3.2 or greater")
|
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(
|
setup(
|
||||||
name="migen",
|
name="migen",
|
||||||
version="unknown",
|
version="unknown",
|
||||||
|
@ -19,7 +30,7 @@ setup(
|
||||||
author_email="sebastien@milkymist.org",
|
author_email="sebastien@milkymist.org",
|
||||||
url="http://www.milkymist.org",
|
url="http://www.milkymist.org",
|
||||||
download_url="https://github.com/milkymist/migen",
|
download_url="https://github.com/milkymist/migen",
|
||||||
packages=['', 'migen'],
|
packages=packages,
|
||||||
license="GPL",
|
license="GPL",
|
||||||
platforms=["Any"],
|
platforms=["Any"],
|
||||||
keywords="HDL ASIC FPGA hardware design",
|
keywords="HDL ASIC FPGA hardware design",
|
||||||
|
|
Loading…
Reference in New Issue