test/fifo: convert to new API
[litex.git] / setup.py
index e46835dece08a9160060990147bf5db6a277ddd8..14bb95bb39792e45415da2b85c7dc5409b057aaf 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -1,46 +1,39 @@
-#!/usr/bin/env python3.2
-# vim: noexpandtab:tabstop=8:softtabstop=8
-""" Migen's distutils distribution and installation script. """
+#!/usr/bin/env python3
 
-import sys, os
-from distutils.core import setup
+import sys
+import os
+from setuptools import setup
+from setuptools import find_packages
 
 here = os.path.abspath(os.path.dirname(__file__))
-README = open(os.path.join(here, "README")).read()
+README = open(os.path.join(here, "README.md")).read()
 
-required_version = (3, 2)
+required_version = (3, 3)
 if sys.version_info < required_version:
-       raise SystemExit("migen requires python {0} or greater".format(
-               ".".join(map(str, 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",
-       description="Python toolbox for building complex digital hardware",
-       long_description=README,
-       author="Sebastien Bourdeauducq",
-       author_email="sebastien@milkymist.org",
-       url="http://www.milkymist.org",
-       download_url="https://github.com/milkymist/migen",
-       packages=packages,
-       license="GPL",
-       platforms=["Any"],
-       keywords="HDL ASIC FPGA hardware design",
-       classifiers=[
-               "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
-               "Environment :: Console",
-               "Development Status :: Alpha",
-               "Intended Audience :: Developers",
-               "License :: OSI Approved :: GNU General Public License (GPL)",
-               "Operating System :: OS Independent",
-               "Programming Language :: Python",
-       ],
+    name="migen",
+    version="0.0+dev",
+    description="Python toolbox for building complex digital hardware",
+    long_description=README,
+    author="Sebastien Bourdeauducq",
+    author_email="sb@m-labs.hk",
+    url="http://m-labs.hk",
+    download_url="https://github.com/m-labs/migen",
+    packages=find_packages(here),
+    test_suite="migen.test",
+    license="BSD",
+    platforms=["Any"],
+    keywords="HDL ASIC FPGA hardware design",
+    classifiers=[
+        "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
+        "Environment :: Console",
+        "Development Status :: Alpha",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: BSD License",
+        "Operating System :: OS Independent",
+        "Programming Language :: Python",
+    ],
 )