litex: reorganize things, first work working version
[litex.git] / setup.py
index a2cbc0b2676b3b656e9085dc58ef4518098c78b3..f1bb2abe9cc7080fdd32e793ae816a8e24ecb4d0 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -1,46 +1,41 @@
 #!/usr/bin/env python3
-# vim: noexpandtab:tabstop=8:softtabstop=8
-""" Migen's distutils distribution and installation script. """
 
-import sys, os
-from distutils.core import setup
+import sys
+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()
 
-required_version = (3, 1)
-if sys.version_info < required_version:
-       raise SystemExit("migen requires python {0} or greater".format(
-               ".".join(map(str, required_version))))
+if sys.version_info[:3] < (3, 3):
+    raise SystemExit("You need Python 3.3+")
 
-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="litex",
+    version="1.0",
+    description="Python tools to design FPGA cores and SoCs",
+    long_description=open("README").read(),
+    author="Florent Kermarrec",
+    author_email="florent@enjoy-digital.fr",
+    url="http://enjoy-digital.fr",
+    download_url="https://github.com/enjoy-digital/litex",
+    license="BSD",
+    platforms=["Any"],
+    keywords="HDL ASIC FPGA hardware design",
+    classifiers=[
+        "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
+        "Environment :: Console",
+        "Development Status :: Beta",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: BSD License",
+        "Operating System :: OS Independent",
+        "Programming Language :: Python",
+    ],
+    packages=find_packages(),
+    include_package_data=True,
+    entry_points={
+        "console_scripts": [
+            "flterm=litex.soc.tools.flterm:main",
+            "mkmscimg=litex.soc.tools.mkmscimg:main",
+        ],
+    },
 )