[PyCDE] Fix versioning

Versioning now working again locally. Hopefully closes #6178.
This commit is contained in:
John Demme 2023-09-22 02:45:04 +00:00
parent 1b901c33b8
commit c1734d05e2
3 changed files with 26 additions and 22 deletions

View File

@ -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/"

View File

@ -99,17 +99,11 @@ class NoopBuildExtension(build_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,

View File

@ -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 @@ class MSFTModuleLike:
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"])
]