File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ name = "cmlibs.maths"
1010dynamic = [" version" ]
1111keywords = [" Math" , " CMLibs" , " Zinc" ]
1212readme = " README.rst"
13- license = { file = " LICENSE " }
13+ license = " Apache-2.0 "
1414authors = [
1515 {
name =
" Hugh Sorby" ,
email =
" [email protected] " },
1616]
@@ -20,13 +20,12 @@ description = "A collection of math functions and algorithms."
2020requires-python = " >=3.8"
2121classifiers = [
2222 " Programming Language :: Python :: 3" ,
23- " License :: OSI Approved :: Apache Software License" ,
2423 " Operating System :: OS Independent" ,
2524 " Topic :: Scientific/Engineering :: Medical Science Apps." ,
2625]
2726
2827[project .urls ]
2928Homepage = " https://cmlibs.org"
30- Repository = " https://github.com/CMLibs-Python/cmlibs.utils "
29+ Repository = " https://github.com/CMLibs-Python/cmlibs.maths "
3130
3231[tool .setuptools_scm ]
Original file line number Diff line number Diff line change 1- import importlib . metadata
1+ from importlib import metadata
22
3- __version__ = importlib .metadata .version ("cmlibs_maths" )
3+
4+ def get_version (package_name : str , fallback : str = "X.Y.Z" ) -> str :
5+ try :
6+ return metadata .version (package_name )
7+ except metadata .PackageNotFoundError :
8+ try :
9+ return metadata .version (package_name .replace ("." , "_" ))
10+ except metadata .PackageNotFoundError :
11+ return fallback
12+
13+
14+ __version__ = get_version ("cmlibs.maths" )
You can’t perform that action at this time.
0 commit comments