2022-10-25 21:22:18 +02:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2024-01-03 23:32:44 +01:00
|
|
|
# Copyright (c) 2016-2024 Regents of the University of California and The Board
|
2022-10-25 21:22:18 +02:00
|
|
|
# of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
# (acting for and on behalf of Oklahoma State University)
|
|
|
|
|
# All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
from setuptools import setup, find_namespace_packages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Include these folder from the root of repo as submodules
|
2022-11-04 23:10:44 +01:00
|
|
|
include = ["compiler", "docker", "technology", "macros"]
|
2022-10-25 21:22:18 +02:00
|
|
|
# Exclude files/folders with these words
|
2023-02-08 07:20:29 +01:00
|
|
|
exclude = ["docs", "images", "miniconda"]
|
2022-10-25 21:22:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Find all modules inside the 'compiler' folder
|
|
|
|
|
dirs = []
|
|
|
|
|
for dir in find_namespace_packages():
|
|
|
|
|
if any(x in dir for x in exclude):
|
|
|
|
|
continue
|
|
|
|
|
dirs.append(dir)
|
|
|
|
|
|
|
|
|
|
# Replace 'compiler' with 'openram' for package names
|
|
|
|
|
packages = []
|
|
|
|
|
for dir in dirs:
|
2022-11-04 23:10:44 +01:00
|
|
|
packages.append(dir)
|
2022-10-25 21:22:18 +02:00
|
|
|
|
|
|
|
|
# Make the included folders submodules of openram package
|
|
|
|
|
for i in range(len(packages)):
|
|
|
|
|
if any(x in packages[i] for x in include):
|
|
|
|
|
packages[i] = "openram." + packages[i]
|
|
|
|
|
|
|
|
|
|
# Fix directory paths
|
|
|
|
|
for i in range(len(dirs)):
|
|
|
|
|
dirs[i] = dirs[i].replace(".", "/")
|
|
|
|
|
|
2022-11-04 23:10:44 +01:00
|
|
|
# Insert the root as the openram module
|
|
|
|
|
packages.insert(0, "openram")
|
|
|
|
|
dirs.insert(0, "")
|
|
|
|
|
|
2022-10-25 21:22:18 +02:00
|
|
|
# Zip package names and their paths
|
|
|
|
|
package_dir = {k: v for k, v in zip(packages, dirs)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create a list of required packages
|
|
|
|
|
with open("requirements.txt") as f:
|
|
|
|
|
reqs = f.read().splitlines()
|
|
|
|
|
|
|
|
|
|
|
2023-02-07 19:30:48 +01:00
|
|
|
# Read version from file
|
|
|
|
|
version = open("VERSION", "r").read().rstrip()
|
|
|
|
|
|
|
|
|
|
|
2023-03-03 00:37:02 +01:00
|
|
|
with open("README.md") as f:
|
|
|
|
|
long_description = f.read()
|
|
|
|
|
|
|
|
|
|
|
2022-10-25 21:22:18 +02:00
|
|
|
# Call the setup to create the package
|
|
|
|
|
setup(
|
2023-02-07 19:30:48 +01:00
|
|
|
name="openram",
|
|
|
|
|
version=version,
|
|
|
|
|
description="An open-source static random access memory (SRAM) compiler",
|
2023-03-03 00:37:02 +01:00
|
|
|
long_description=long_description,
|
|
|
|
|
long_description_content_type="text/markdown",
|
2023-02-07 19:30:48 +01:00
|
|
|
url="https://openram.org/",
|
2023-03-03 00:37:02 +01:00
|
|
|
download_url="https://github.com/VLSIDA/OpenRAM/releases",
|
|
|
|
|
project_urls={
|
|
|
|
|
"Bug Tracker": "https://github.com/VLSIDA/OpenRAM/issues",
|
|
|
|
|
"Documentation": "https://github.com/VLSIDA/OpenRAM/blob/stable/docs/source/index.md",
|
|
|
|
|
"Source Code": "https://github.com/VLSIDA/OpenRAM",
|
|
|
|
|
},
|
2023-02-07 19:30:48 +01:00
|
|
|
author="Matthew Guthaus",
|
2023-03-03 00:37:02 +01:00
|
|
|
author_email="mrg+vlsida@ucsc.edu",
|
2023-02-07 19:30:48 +01:00
|
|
|
keywords=[ "sram", "magic", "gds", "netgen", "ngspice", "netlist" ],
|
2023-03-06 05:37:53 +01:00
|
|
|
license="BSD 3-Clause",
|
2023-03-15 20:41:50 +01:00
|
|
|
python_requires=">=3.5",
|
2023-03-06 05:37:53 +01:00
|
|
|
classifiers=[
|
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
|
"Intended Audience :: Science/Research",
|
|
|
|
|
"License :: OSI Approved :: BSD License",
|
|
|
|
|
"Natural Language :: English",
|
|
|
|
|
"Operating System :: Unix",
|
|
|
|
|
"Programming Language :: Python",
|
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
|
"Topic :: Scientific/Engineering",
|
|
|
|
|
"Topic :: Software Development",
|
|
|
|
|
"Topic :: System :: Hardware",
|
|
|
|
|
],
|
2022-10-25 21:22:18 +02:00
|
|
|
packages=packages,
|
|
|
|
|
package_dir=package_dir,
|
|
|
|
|
include_package_data=True,
|
2022-10-26 01:13:04 +02:00
|
|
|
install_requires=reqs,
|
2022-11-30 23:50:43 +01:00
|
|
|
)
|