-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move project metadata to pyproject.toml #942
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
recursive-include vunit/ *.tcl | ||
recursive-include vunit/vhdl/ * | ||
recursive-include vunit/verilog/ *.sv *.v *.svh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,64 @@ | ||
[build-system] | ||
requires = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the move towards Minimal just the [build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] # this would be version bumps
...
[project]
dynamic = ["version"]
...
[tool.setuptools_scm] # this is required to activate the scm functionality
... As there might be some changes needed due to to the move to |
||
"setuptools >= 35.0.2", | ||
"setuptools_scm >= 2.0.0, <3" | ||
] | ||
requires = ["setuptools >= 35.0.2", "setuptools_scm >= 2.0.0, <3"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "vunit_hdl" | ||
authors = [{ name = "Lars Asplund", email = "[email protected]" }] | ||
license = { text = "Mozilla Public License 2.0 (MPL 2.0)" } | ||
description = "VUnit is an open source unit testing framework for VHDL/SystemVerilog." | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", | ||
"Natural Language :: English", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3.7", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just note if support should be |
||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Topic :: Software Development :: Testing", | ||
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", | ||
] | ||
dependencies = ["colorama"] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://vunit.github.io" | ||
Repository = "https://github.com/VUnit/vunit" | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
packages = [ | ||
"tests", | ||
"tests.lint", | ||
"tests.unit", | ||
"tests.acceptance", | ||
"vunit", | ||
"vunit.com", | ||
"vunit.parsing", | ||
"vunit.parsing.verilog", | ||
"vunit.sim_if", | ||
"vunit.test", | ||
"vunit.ui", | ||
"vunit.vivado", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "vunit.about.version"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This version will be contradicting the one from A little bit unsure about how the versioning is managed or intended to work for this project 😕. So this comment might just be me not geting something 😄 |
||
|
||
[tool.black] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for this one just noticed going through the file. It's of topic but would be a nice fix to get in.
|
||
line-length = 120 | ||
|
||
[tool.towncrier] | ||
package = "vunit" | ||
package_dir = "vunit" | ||
single_file = false | ||
filename="docs/news.inc" | ||
filename = "docs/news.inc" | ||
directory = "docs/news.d/" | ||
title_format = false | ||
issue_format = ":vunit_issue:`{issue}`" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,84 +8,14 @@ | |
PyPI setup script | ||
""" | ||
|
||
import os | ||
import sys | ||
from glob import glob | ||
from pathlib import Path | ||
from logging import warning | ||
from setuptools import setup | ||
|
||
# Ensure that the source tree is on the sys path | ||
sys.path.insert(0, str(Path(__file__).parent.resolve())) | ||
setup() | ||
|
||
from vunit.about import version, doc # pylint: disable=wrong-import-position | ||
from vunit.builtins import osvvm_is_installed # pylint: disable=wrong-import-position | ||
|
||
|
||
def find_all_files(directory, endings=None): | ||
""" | ||
Recursively find all files within directory | ||
""" | ||
result = [] | ||
for root, _, filenames in os.walk(directory): | ||
for filename in filenames: | ||
ending = os.path.splitext(filename)[-1] | ||
if endings is None or ending in endings: | ||
result.append(str(Path(root) / filename)) | ||
return result | ||
|
||
|
||
DATA_FILES = [] | ||
DATA_FILES += find_all_files("vunit", endings=[".tcl"]) | ||
DATA_FILES += find_all_files(str(Path("vunit") / "vhdl")) | ||
DATA_FILES += find_all_files(str(Path("vunit") / "verilog"), endings=[".v", ".sv", ".svh"]) | ||
DATA_FILES = [os.path.relpath(file_name, "vunit") for file_name in DATA_FILES] | ||
|
||
setup( | ||
name="vunit_hdl", | ||
version=version(), | ||
packages=[ | ||
"tests", | ||
"tests.lint", | ||
"tests.unit", | ||
"tests.acceptance", | ||
"vunit", | ||
"vunit.com", | ||
"vunit.parsing", | ||
"vunit.parsing.verilog", | ||
"vunit.sim_if", | ||
"vunit.test", | ||
"vunit.ui", | ||
"vunit.vivado", | ||
], | ||
package_data={"vunit": DATA_FILES}, | ||
zip_safe=False, | ||
url="https://github.com/VUnit/vunit", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", | ||
"Natural Language :: English", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Topic :: Software Development :: Testing", | ||
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", | ||
], | ||
python_requires=">=3.6", | ||
install_requires=["colorama"], | ||
requires=["colorama"], | ||
license="Mozilla Public License 2.0 (MPL 2.0)", | ||
author="Lars Asplund", | ||
author_email="[email protected]", | ||
description="VUnit is an open source unit testing framework for VHDL/SystemVerilog.", | ||
long_description=doc(), | ||
) | ||
|
||
if not osvvm_is_installed(): | ||
if len(glob(str(Path(__file__).parent / "vunit" / "vhdl" / "osvvm" / "*.vhd"))) == 0: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As This returns a iterator that we can call next on with a default value of OSVVM_PATH = Path(__file__).with_name("vunit") / "vhdl" / "osvvm"
if next(OSVVM_PATH.glob("*.vhd"), None) is None:
warning(...) |
||
warning( | ||
""" | ||
Found no OSVVM VHDL files. If you're installing from a Git repository and plan to use VUnit's integration | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done inside the
pyproject.toml
as well 😄 I assume the goal with this is to have all the config in one placeIs the
.do
files intentionally skipped?