From c1734d05e2c9da3a696f40a7f54d97de94f50813 Mon Sep 17 00:00:00 2001 From: John Demme Date: Fri, 22 Sep 2023 02:45:04 +0000 Subject: [PATCH] [PyCDE] Fix versioning Versioning now working again locally. Hopefully closes #6178. --- frontends/PyCDE/pyproject.toml | 38 ++++++++++++------- frontends/PyCDE/setup.py | 6 --- lib/Bindings/Python/dialects/_msft_ops_ext.py | 4 +- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/frontends/PyCDE/pyproject.toml b/frontends/PyCDE/pyproject.toml index 3964bdc429ec..94874cacf1e7 100644 --- a/frontends/PyCDE/pyproject.toml +++ b/frontends/PyCDE/pyproject.toml @@ -1,26 +1,25 @@ [build-system] requires = [ - "setuptools>=42", - "setuptools_scm>=6.2", - "wheel", - "cmake>=3.12", - - # MLIR build depends. - "numpy", - "pybind11>=2.9", - "PyYAML", + "setuptools>=68", + "setuptools_scm>=8.0", + "wheel", + "cmake>=3.12", - # PyCDE depends - "cocotb>=1.6.2", - "cocotb-test>=0.2.2", - "jinja2" + # MLIR build depends. + "numpy", + "pybind11>=2.9", + "PyYAML", + + # PyCDE depends + "cocotb>=1.6.2", + "cocotb-test>=0.2.2", + "jinja2", ] build-backend = "setuptools.build_meta" # Enable version inference from Git. [tool.setuptools_scm] root = "../.." -relative_to = "setup.py" tag_regex = "^pycde-(\\d+\\.\\d+\\.\\d+)?$" local_scheme = "no-local-version" git_describe_command = "git describe --dirty --tags --long --match pycde*" @@ -32,3 +31,14 @@ manylinux-x86_64-image = "ghcr.io/circt/images/pycde-build" [tool.cibuildwheel.linux] # Use our internal auditwheel script so as to not mess up the collateral. repair-wheel-command = "frontends/PyCDE/auditwheel.sh {dest_dir} {wheel}" + +[project] +name = "pycde" +dynamic = ["version"] +description = "Python CIRCT Design Entry" +authors = [{ name = "John Demme", email = "John.Demme@microsoft.com" }] +dependencies = ['numpy', 'jinja2'] +requires-python = ">=3.8" + +[project.urls] +"Homepage" = "https://circt.llvm.org/docs/PyCDE/" diff --git a/frontends/PyCDE/setup.py b/frontends/PyCDE/setup.py index 9b42b988cc73..f6dffd7056d9 100644 --- a/frontends/PyCDE/setup.py +++ b/frontends/PyCDE/setup.py @@ -99,17 +99,11 @@ def build_extension(self, ext): setup(name="pycde", - version="0.0.1", - author="John Demme", - author_email="John.Demme@microsoft.com", - description="Python CIRCT Design Entry", - long_description="", include_package_data=True, ext_modules=[ CMakeExtension("pycde.circt._mlir_libs._mlir"), CMakeExtension("pycde.circt._mlir_libs._circt"), ], - install_requires=["numpy", "jinja2"], cmdclass={ "build": CustomBuild, "built_ext": NoopBuildExtension, diff --git a/lib/Bindings/Python/dialects/_msft_ops_ext.py b/lib/Bindings/Python/dialects/_msft_ops_ext.py index 6f82fb259d11..0b7ddacb2fa8 100644 --- a/lib/Bindings/Python/dialects/_msft_ops_ext.py +++ b/lib/Bindings/Python/dialects/_msft_ops_ext.py @@ -2,7 +2,7 @@ # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -from typing import Dict, Type +from typing import Dict, List, Type from . import hw, msft as _msft from . import _hw_ops_ext as _hw_ext @@ -152,7 +152,7 @@ def is_external(self): return len(self.regions[0].blocks) == 0 @property - def parameters(self) -> list[hw.ParamDeclAttr]: + def parameters(self) -> List[hw.ParamDeclAttr]: return [ hw.ParamDeclAttr(a) for a in ArrayAttr(self.attributes["parameters"]) ]