Skip to content

Commit a190960

Browse files
committed
Updates to license, dependencies, CI, and pyproject.toml.
1 parent 4e52b8e commit a190960

11 files changed

Lines changed: 68 additions & 34 deletions

LICENSE renamed to LICENSE.BSD3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2017-2023, Paulo Meira
4-
Copyright (c) 2017-2023, DSS Python contributors
3+
Copyright (c) 2017-2026, Paulo Meira
4+
Copyright (c) 2017-2026, Contributors to DSS-Extensions
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without

OPENDSS_LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Copyright (c) 2008-2021, Electric Power Research Institute, Inc.
1+
* Copyright (c) 2008-2026, Electric Power Research Institute, Inc.
22
* All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@
66

77
`dss_python_backend` provides low-level bindings for an implementation of EPRI's OpenDSS, using [CFFI](https://cffi.readthedocs.io/) and our [DSS C-API library and headers](https://github.com/dss-extensions/dss_capi/). It contains the native libraries (and DLLs) required by DSS-Python. This is considered an implementation detail.
88

9-
**This is not intended for direct usage, [see DSS-Python](https://github.com/dss-extensions/dss_python/) and [OpenDSSDirect.py](https://github.com/dss-extensions/OpenDSSDirect.py/) instead!**
9+
**This is not intended for direct usage, [see DSS-Python](https://github.com/dss-extensions/DSS-Python/), [OpenDSSDirect.py](https://github.com/dss-extensions/OpenDSSDirect.py/), and [AltDSS-Python](https://github.com/dss-extensions/AltDSS-Python/) instead!**
1010

1111
After several years integrated into DSS-Python, this package was created in April 2023 to make the maintenance easier. See https://github.com/dss-extensions/dss_python/issues/51
1212

13-
This package includes:
14-
- CFFI modules for DSS C-API
13+
The Python package includes:
14+
- FastDSS modules for AltDSS/DSS C-API
15+
- CFFI modules for AltDSS/DSS C-API
1516
- CFFI modules for user-models (only the code for generator user-models is being compiled nowadays)
16-
- DSS C-API libraries, DLLs, and headers
17+
- AltDSS/DSS C-API related libraries (AltDSS Engine, Oddie, Loader, etc.), DLLs, and headers
1718

19+
This module contains source-code licensed under BSD3 and LGPL3. See each file for SPDX comments.
20+
21+
Although this repository does not contain code from OpenDSS, the license is listed in `OPENDSS_LICENSE` for reference. The final packages do include software derived from OpenDSS code and other libraries, such as KLUSolveX and KLU (from SuiteSparse), both licensed under the LGPL. Since the files listed in this repository contain multiple licenses, SPDX identifiers are now included in the file headers.
22+
23+
*Note: this package might be renamed in the future to reflect the new developments.*

ci/build_wheel.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mkdir -p artifacts
22
cd dss_python_backend
3-
$PYTHON -m pip install --upgrade pip setuptools
4-
$PYTHON -m pip install cffi wheel
3+
$PYTHON -m pip install --upgrade pip setuptools packaging trove-classifiers cffi wheel
54
$PYTHON setup.py --quiet bdist_wheel --py-limited-api cp37 --dist-dir=$ARTIFACTS_FOLDER

dss_python_backend/_func_info.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: (C) 2024-2025 Paulo Meira & contributors to DSS-Extensions
2+
# SPDX-License-Identifier: LGPL-3.0-only
13

24
from enum import Enum
35

dss_python_backend/enums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: (C) 2023-2025 Paulo Meira & contributors to DSS-Extensions
2+
# SPDX-License-Identifier: BSD-3
3+
14
try:
25
from enum import IntEnum, IntFlag
36
except (ModuleNotFoundError, ImportError):

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
[project]
2+
name = "dss_python_backend"
3+
dynamic = ["version"]
4+
readme = {file = "README.md", content-type = "text/markdown"}
5+
description = "Low-level Python bindings and native libs for DSS-Python, OpenDSSDirect.py and AltDSS-Python. Not intended for direct usage, see the high-level packages instead."
6+
license = "BSD-3-Clause AND LGPL-3.0-only"
7+
license-files = ["LICENSE.BSD3", "LICENSE.LGPL3", "OPENDSS_LICENSE"]
8+
authors = [
9+
{name = "Paulo Meira", email = "pmeira@ieee.org"},
10+
]
11+
maintainers = [
12+
{name = "Paulo Meira", email = "pmeira@ieee.org"},
13+
]
14+
dependencies = [
15+
"cffi>=2,<3",
16+
"numpy>=2,<3",
17+
]
18+
requires-python = ">=3.11" # Following NumPy's requirements
19+
20+
classifiers=[
21+
"Intended Audience :: Science/Research",
22+
"Intended Audience :: Education",
23+
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
28+
"Programming Language :: Python :: Implementation :: CPython",
29+
30+
"Development Status :: 5 - Production/Stable",
31+
32+
"Topic :: Scientific/Engineering",
33+
]
34+
35+
[project.urls]
36+
Homepage = "https://github.com/dss-extensions/dss_python_backend"
37+
Repository = "https://github.com/dss-extensions/dss_python_backend.git"
38+
"Bug Tracker" = "https://github.com/dss-extensions/dss-extensions/issues"
39+
140
[build-system]
241
requires = ["setuptools"]
342
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,9 @@
8888

8989

9090
setup(
91-
name="dss_python_backend",
92-
description="Low-level Python bindings and native libs for DSS-Python. Not intended for direct usage, see DSS-Python instead.",
93-
long_description=long_description,
94-
long_description_content_type='text/markdown',
95-
author="Paulo Meira",
96-
author_email="pmeira@ieee.org",
9791
version=package_version,
98-
license="BSD",
9992
packages=['dss_python_backend'],
100-
setup_requires=["cffi>=1.11.2"],
93+
setup_requires=["cffi>=2.0.0"],
10194
cffi_modules= [
10295
"dss_build.py:ffi_builder_dss",
10396
'dss_build.py:ffi_builder_GenUserModel_altdss',
@@ -111,25 +104,8 @@
111104
],
112105
ext_modules=[dss_build.fastdss_extension],
113106
ext_package="dss_python_backend",
114-
install_requires=["cffi>=1.11.2"],
115107
# tests_require=["pytest"],
116108
zip_safe=False,
117-
classifiers=[
118-
'Intended Audience :: Science/Research',
119-
'Intended Audience :: Education',
120-
121-
'Programming Language :: Python :: 3.7',
122-
'Programming Language :: Python :: 3.8',
123-
'Programming Language :: Python :: 3.9',
124-
'Programming Language :: Python :: 3.10',
125-
'Programming Language :: Python :: 3.11',
126-
'Programming Language :: Python :: 3.12',
127-
'Programming Language :: Python :: Implementation :: CPython',
128-
'Programming Language :: Python :: Implementation :: PyPy',
129-
'Development Status :: 5 - Production/Stable',
130-
'Topic :: Scientific/Engineering',
131-
'License :: OSI Approved :: BSD License'
132-
],
133109
**extra_args
134110
)
135111

src/_fastdss.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: (C) 2024-2025 Paulo Meira & contributors to DSS-Extensions
2+
// SPDX-License-Identifier: LGPL-3.0-only
3+
14
// This is a C extension that contains a few faster alternatives for a subset
25
// of functions from AltDSS/DSS C-API. The rest of the functions are handled
36
// via CFFI.

src/_fastdss_py_members.inc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: (C) 2024-2025 Paulo Meira & contributors to DSS-Extensions
2+
// SPDX-License-Identifier: LGPL-3.0-only
3+
14
static PyMemberDef AltDSS_PyContext_members[] = {
25
{"ActiveClass_Get_ActiveClassName", Py_T_OBJECT_EX, offsetof(AltDSS_PyContextObject, f_ActiveClass_Get_ActiveClassName)},
36
{"ActiveClass_Get_ActiveClassParent", Py_T_OBJECT_EX, offsetof(AltDSS_PyContextObject, f_ActiveClass_Get_ActiveClassParent)},

0 commit comments

Comments
 (0)