Skip to content

Commit d5f17b3

Browse files
committed
Migrate to pyproject.toml and move src into src/
1 parent 649519b commit d5f17b3

File tree

400 files changed

+55
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+55
-61
lines changed

README.md

Lines changed: 1 addition & 1 deletion

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "systemrdl-compiler"
7+
dynamic = ["version"]
8+
requires-python = ">=3.6"
9+
dependencies = [
10+
"antlr4-python3-runtime >= 4.11, < 4.14",
11+
"colorama",
12+
"markdown",
13+
]
14+
authors = [
15+
{name="Alex Mykyta"},
16+
]
17+
description="Parse and elaborate front-end for SystemRDL 2.0"
18+
readme = "README.md"
19+
license = {file = "LICENSE"}
20+
keywords = [
21+
"SystemRDL", "CSR", "compiler", "tool", "registers", "generator",
22+
"register abstraction layer", "FPGA", "ASIC",
23+
]
24+
classifiers = [
25+
"Development Status :: 5 - Production/Stable",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.6",
29+
"Programming Language :: Python :: 3.7",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3 :: Only",
36+
"Intended Audience :: Developers",
37+
"License :: OSI Approved :: MIT License",
38+
"Operating System :: OS Independent",
39+
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
40+
"Topic :: Software Development :: Compilers",
41+
"Topic :: Software Development :: Code Generators",
42+
]
43+
44+
[project.urls]
45+
Source = "https://github.com/SystemRDL/systemrdl-compiler"
46+
Tracker = "https://github.com/SystemRDL/systemrdl-compiler/issues"
47+
Changelog = "https://github.com/SystemRDL/systemrdl-compiler/releases"
48+
Documentation = "http://systemrdl-compiler.readthedocs.io"
49+
50+
[tool.setuptools.dynamic]
51+
version = {attr = "systemrdl.__about__.__version__"}

setup.py

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,14 @@
44
import fnmatch
55
import setuptools
66

7-
with open("README.md", "r", encoding='utf-8') as fh:
8-
long_description = fh.read()
9-
10-
# Replace relative image path with github-hosted one
11-
long_description = long_description.replace(
12-
"docs/img/overview.svg",
13-
"https://raw.githubusercontent.com/SystemRDL/systemrdl-compiler/main/docs/img/overview.svg?sanitize=true"
14-
)
15-
16-
with open(os.path.join("systemrdl", "__about__.py"), encoding='utf-8') as f:
17-
v_dict = {}
18-
exec(f.read(), v_dict)
19-
rdl_version = v_dict['__version__']
20-
217
target = platform.system().lower()
228
PLATFORMS = {'windows', 'linux', 'darwin', 'cygwin'}
239
for known in PLATFORMS:
2410
if target.startswith(known):
2511
target = known
2612

27-
2813
def run_setup(with_binary):
2914
if with_binary:
30-
3115
extra_compile_args = {
3216
'windows': ['/DANTLR4CPP_STATIC', '/Zc:__cplusplus', '/std:c++17'],
3317
'linux': ['-std=c++17'],
@@ -40,11 +24,11 @@ def run_setup(with_binary):
4024
name='systemrdl.parser.sa_systemrdl_cpp_parser',
4125

4226
# Add the Antlr runtime source directory to the include search path
43-
include_dirs=["systemrdl/parser/ext/antlr4-cpp-runtime"],
27+
include_dirs=["src/systemrdl/parser/ext/antlr4-cpp-runtime"],
4428

4529
# Rather than listing each C++ file (Antlr has a lot!), discover them automatically
46-
sources=get_files("systemrdl/parser/ext", "*.cpp"),
47-
depends=get_files("systemrdl/parser/ext", "*.h"),
30+
sources=get_files("src/systemrdl/parser/ext", "*.cpp"),
31+
depends=get_files("src/systemrdl/parser/ext", "*.h"),
4832

4933
extra_compile_args=extra_compile_args.get(target, [])
5034
)
@@ -53,49 +37,8 @@ def run_setup(with_binary):
5337
ext_modules = []
5438

5539
setuptools.setup(
56-
name="systemrdl-compiler",
57-
version=rdl_version,
58-
author="Alex Mykyta",
59-
author_email="amykyta3@github.com",
60-
description="Parse and elaborate front-end for SystemRDL 2.0",
61-
long_description=long_description,
62-
long_description_content_type="text/markdown",
63-
url="https://github.com/SystemRDL/systemrdl-compiler",
64-
packages=setuptools.find_packages(exclude=["test"]),
65-
include_package_data=True,
6640
ext_modules=ext_modules,
6741
cmdclass={"build_ext": ve_build_ext},
68-
python_requires='>=3.6',
69-
install_requires=[
70-
"antlr4-python3-runtime >= 4.11, < 4.14",
71-
"colorama",
72-
"markdown",
73-
],
74-
classifiers=[
75-
"Development Status :: 5 - Production/Stable",
76-
"Programming Language :: Python",
77-
"Programming Language :: Python :: 3",
78-
"Programming Language :: Python :: 3.6",
79-
"Programming Language :: Python :: 3.7",
80-
"Programming Language :: Python :: 3.8",
81-
"Programming Language :: Python :: 3.9",
82-
"Programming Language :: Python :: 3.10",
83-
"Programming Language :: Python :: 3.11",
84-
"Programming Language :: Python :: 3.12",
85-
"Programming Language :: Python :: 3 :: Only",
86-
"Intended Audience :: Developers",
87-
"License :: OSI Approved :: MIT License",
88-
"Operating System :: OS Independent",
89-
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
90-
"Topic :: Software Development :: Compilers",
91-
"Topic :: Software Development :: Code Generators",
92-
],
93-
project_urls={
94-
"Documentation": "http://systemrdl-compiler.readthedocs.io",
95-
"Source": "https://github.com/SystemRDL/systemrdl-compiler",
96-
"Tracker": "https://github.com/SystemRDL/systemrdl-compiler/issues",
97-
"Changelog": "https://github.com/SystemRDL/systemrdl-compiler/releases",
98-
},
9942
)
10043

10144

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)