From 78e84ee8dfa8818c48f35e0da8fa2e80d740bc0e Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Tue, 7 Feb 2023 10:30:48 -0800 Subject: [PATCH] Add version file --- MANIFEST.in | 1 + VERSION | 1 + compiler/globals.py | 3 ++- pyproject.toml | 12 ------------ setup.py | 13 +++++++++++++ 5 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 VERSION diff --git a/MANIFEST.in b/MANIFEST.in index 82a701d7..cb0967e3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ include install_conda.sh include docker/* recursive-include compiler * recursive-include technology * +include VERSION exclude .DS_Store exclude .idea exclude **/model_data diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..6085e946 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.2.1 diff --git a/compiler/globals.py b/compiler/globals.py index 2bbdf400..626b5d22 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -22,7 +22,8 @@ from openram import debug from openram import options -VERSION = "1.2.0" +from openram import OPENRAM_HOME +VERSION = open(OPENRAM_HOME + "/../VERSION").read().rstrip() NAME = "OpenRAM v{}".format(VERSION) USAGE = "sram_compiler.py [options] \nUse -h for help.\n" diff --git a/pyproject.toml b/pyproject.toml index 5aebe600..fed528d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,3 @@ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" - -[project] -name = "openram" -version = "1.2.0" -description = "An open-source static random access memory (SRAM) compiler" -authors = [ - { name="Matthew Guthaus", email="mrg@ucsc.edu" }, -] -keywords = [ "sram", "magic", "gds", "netgen", "ngspice", "netlist" ] -readme = "README.md" -license = { text = "BSD-3-Clause License" } -requires-python = ">=3.6" \ No newline at end of file diff --git a/setup.py b/setup.py index ee86e65c..292fabb1 100644 --- a/setup.py +++ b/setup.py @@ -48,8 +48,21 @@ with open("requirements.txt") as f: reqs = f.read().splitlines() +# Read version from file +version = open("VERSION", "r").read().rstrip() + + # Call the setup to create the package setup( + name="openram", + version=version, + description="An open-source static random access memory (SRAM) compiler", + url="https://openram.org/", + author="Matthew Guthaus", + author_email="mrg@ucsc.edu", + keywords=[ "sram", "magic", "gds", "netgen", "ngspice", "netlist" ], + readme="README.md", + license="BSD-3", packages=packages, package_dir=package_dir, include_package_data=True,