File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.15 )
22
3- project (differintC VERSION 0.0.2.3 LANGUAGES CXX )
3+ file (READ "${PROJECT_VERSION_FILE} " VERSION_CONTENTS )
4+ string (REGEX MATCH "__version__ *= *[\" ']([^\" ']+)[\" ']" _ ${VERSION_CONTENTS} )
5+ set (PYTHON_VERSION_STRING "${CMAKE_MATCH_1} " )
6+ project (differintC VERSION ${PYTHON_VERSION_STRING} LANGUAGES CXX )
47
58# Set compiler optimization flags
69if (MSVC )
Original file line number Diff line number Diff line change @@ -77,4 +77,4 @@ def _load_dll():
7777from ._differintC import * # type: ignore # Directly import from site-packages
7878
7979# Add version attribute
80- __version__ = "0.0.2.3"
80+ from . _version import __version__
Original file line number Diff line number Diff line change 1+ __version__ = "0.0.2.3" # <-- ANY PEP 440 version string allowed
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ build-backend = "scikit_build_core.build"
1010
1111[project ]
1212name = " differintC"
13- version = " 0.0.2.3 "
13+ dynamic = [ " version " ]
1414description = " Fast C++ implementation of fractional calculus operators via pybind11"
1515authors = [{ name = " Parsa Roshanak" }]
1616license = { text = " GPL-3.0-or-later" } # Changed to GPL for compatibility with fftw
@@ -37,6 +37,12 @@ Homepage = "https://github.com/iparsw/differintC"
3737Repository = " https://github.com/iparsw/differintC"
3838Issues = " https://github.com/iparsw/differintC/issues"
3939
40+ [tool .scikit-build .metadata .version ]
41+ provider = " scikit_build_core.metadata.regex"
42+ input = " differintC/_version.py"
43+ regex = " ^__version__\\ s*=\\ s*['\" ](?P<value>[^'\" ]+)['\" ]"
44+
45+
4046[tool .scikit-build ]
4147wheel.packages = [" differintC" ]
4248build-dir = " build"
@@ -79,6 +85,7 @@ exclude = [
7985[tool .scikit-build .cmake ]
8086args = [
8187 " -DFFTW_ROOT=thirdparty/fftw" ,
82- " -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL"
88+ " -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL" ,
89+ " -DPROJECT_VERSION_FILE=differintC/_version.py" ,
8390]
8491
You can’t perform that action at this time.
0 commit comments