dspsim-library 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dspsim_library-0.0.2/.github/workflows/build_wheels.yml +95 -0
- dspsim_library-0.0.2/.gitignore +20 -0
- dspsim_library-0.0.2/.python-version +1 -0
- dspsim_library-0.0.2/CMakeLists.txt +38 -0
- dspsim_library-0.0.2/LICENSE +661 -0
- dspsim_library-0.0.2/PKG-INFO +16 -0
- dspsim_library-0.0.2/README.md +0 -0
- dspsim_library-0.0.2/pyproject.toml +129 -0
- dspsim_library-0.0.2/src/dspsim/library/__init__.py +1 -0
- dspsim_library-0.0.2/src/dspsim/library/hdl/HellModel.sv +50 -0
- dspsim_library-0.0.2/src/dspsim/library/hdl/SimpleModel.sv +17 -0
- dspsim_library-0.0.2/src/dspsim/library/hdl/Skid.sv +61 -0
- dspsim_library-0.0.2/tests/test_simple_model.py +38 -0
- dspsim_library-0.0.2/uv.lock +299 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- v*
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- release/*
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_sdist:
|
|
12
|
+
name: Build source distribution
|
|
13
|
+
runs-on: ["ubuntu-latest"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v4
|
|
18
|
+
|
|
19
|
+
- name: "Set up Python"
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version-file: ".python-version"
|
|
23
|
+
|
|
24
|
+
- name: Build sdist
|
|
25
|
+
run: uv build --sdist
|
|
26
|
+
|
|
27
|
+
- uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: cibw-sdist
|
|
30
|
+
path: ./dist/*
|
|
31
|
+
|
|
32
|
+
build_linux_wheels:
|
|
33
|
+
name: Python cibuildwheel linux
|
|
34
|
+
runs-on: ["ubuntu-latest"]
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- name: Install uv
|
|
39
|
+
uses: astral-sh/setup-uv@v4
|
|
40
|
+
|
|
41
|
+
- name: "Set up Python"
|
|
42
|
+
uses: actions/setup-python@v5
|
|
43
|
+
with:
|
|
44
|
+
python-version-file: ".python-version"
|
|
45
|
+
|
|
46
|
+
- name: Build Linux wheels
|
|
47
|
+
run: uvx cibuildwheel --output-dir ./dist
|
|
48
|
+
|
|
49
|
+
- uses: actions/upload-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: cibw-wheels-linux
|
|
52
|
+
path: ./dist/*.whl
|
|
53
|
+
|
|
54
|
+
# build_windows_wheels:
|
|
55
|
+
# name: Python cibuildwheel Windows
|
|
56
|
+
# runs-on: ["windows-2022"]
|
|
57
|
+
|
|
58
|
+
# steps:
|
|
59
|
+
# - uses: actions/checkout@v4
|
|
60
|
+
# - name: Install uv
|
|
61
|
+
# uses: astral-sh/setup-uv@v4
|
|
62
|
+
|
|
63
|
+
# - name: "Set up Python"
|
|
64
|
+
# uses: actions/setup-python@v5
|
|
65
|
+
# with:
|
|
66
|
+
# python-version-file: ".python-version"
|
|
67
|
+
|
|
68
|
+
# - name: Build Windows wheels
|
|
69
|
+
# run: uvx cibuildwheel --output-dir ./dist
|
|
70
|
+
|
|
71
|
+
# - uses: actions/upload-artifact@v4
|
|
72
|
+
# with:
|
|
73
|
+
# name: cibw-wheels-windows
|
|
74
|
+
# path: ./dist/*.whl
|
|
75
|
+
|
|
76
|
+
upload_pypi:
|
|
77
|
+
if: startsWith(github.event.ref, 'refs/tags/v')
|
|
78
|
+
# needs: [build_sdist, build_linux_wheels, build_windows_wheels, ]
|
|
79
|
+
needs: [build_sdist, build_linux_wheels]
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
environment:
|
|
82
|
+
name: pypi
|
|
83
|
+
url: https://pypi.org/p/dspsim
|
|
84
|
+
permissions:
|
|
85
|
+
id-token: write
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
# unpacks all CIBW artifacts into dist/
|
|
90
|
+
pattern: cibw-*
|
|
91
|
+
path: dist
|
|
92
|
+
merge-multiple: true
|
|
93
|
+
|
|
94
|
+
- name: publish distribution to pypi.org
|
|
95
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheelhouse
|
|
7
|
+
*.egg-info
|
|
8
|
+
.pytest_cache
|
|
9
|
+
|
|
10
|
+
# Virtual environment and build directories
|
|
11
|
+
.venv
|
|
12
|
+
build
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
.env
|
|
16
|
+
.vscode
|
|
17
|
+
*.code-workspace
|
|
18
|
+
|
|
19
|
+
obj_dir/
|
|
20
|
+
traces/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.24)
|
|
2
|
+
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
# Force release build.
|
|
5
|
+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
6
|
+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
|
7
|
+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
|
8
|
+
endif()
|
|
9
|
+
|
|
10
|
+
# Simplest way of exporting symbols for windows.
|
|
11
|
+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Set warning level
|
|
16
|
+
if (MSVC)
|
|
17
|
+
# warning level 4
|
|
18
|
+
add_compile_options(/W2)
|
|
19
|
+
else()
|
|
20
|
+
# additional warnings
|
|
21
|
+
add_compile_options(-Wall -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-maybe-uninitialized)
|
|
22
|
+
endif()
|
|
23
|
+
|
|
24
|
+
# Find dspsim package
|
|
25
|
+
find_package(dspsim REQUIRED HINTS ${CMAKE_PREFIX_PATH}/dspsim/framework/cmake)
|
|
26
|
+
|
|
27
|
+
# RPath
|
|
28
|
+
# Set the RPATH to where dspsim/framework will be installed relative to this module.
|
|
29
|
+
list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/../framework")
|
|
30
|
+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
31
|
+
|
|
32
|
+
# Set project paths.
|
|
33
|
+
# set(DSPSIM_LIBRARY_PKG_DIR ${CMAKE_SOURCE_DIR}/src/dspsim/library)
|
|
34
|
+
# set(DSPSIM_LIBRARY_HDL_DIR ${CMAKE_SOURCE_DIR}/src/dspsim/library/hdl)
|
|
35
|
+
set(DSPSIM_LIBRARY_INSTALL_DIR dspsim/library)
|
|
36
|
+
|
|
37
|
+
# Generate and build the library module.
|
|
38
|
+
dspsim_add_module(_library ${CMAKE_SOURCE_DIR}/pyproject.toml ${DSPSIM_LIBRARY_INSTALL_DIR})
|