1414"""
1515
1616import os
17+
1718import pybind11
1819from setuptools import find_packages
1920from skbuild import setup
2021
21- NAME = ' diptest'
22+ NAME = " diptest"
2223
2324MAJOR = 0
24- REVISION = 5
25- PATCH = 2
25+ REVISION = 6
26+ PATCH = 0
2627DEV = False
2728
28- VERSION = '{major}.{revision}.{patch}' .format (major = MAJOR , revision = REVISION , patch = PATCH )
29+ VERSION = "{major}.{revision}.{patch}" .format (
30+ major = MAJOR , revision = REVISION , patch = PATCH
31+ )
2932FULL_VERSION = VERSION
3033if DEV :
31- FULL_VERSION += ' .dev'
34+ FULL_VERSION += " .dev"
3235
3336# read the contents of readme file
3437with open ("README.md" , encoding = "utf-8" ) as f :
3538 long_description = f .read ()
3639
3740
38- def write_version_py (filename : str = ' diptest/version.py' ) -> None :
41+ def write_version_py (filename : str = " diptest/version.py" ) -> None :
3942 """Write package version to version.py.
4043
4144 This will ensure that the version in version.py is in sync with us.
@@ -55,17 +58,23 @@ def write_version_py(filename: str = 'diptest/version.py') -> None:
5558release = {is_release!s}
5659"""
5760
58- with open (filename , 'w' ) as version_file :
61+ with open (filename , "w" ) as version_file :
5962 version_file .write (
60- version_str .format (name = NAME .lower (), version = VERSION , full_version = FULL_VERSION , is_release = not DEV )
63+ version_str .format (
64+ name = NAME .lower (),
65+ version = VERSION ,
66+ full_version = FULL_VERSION ,
67+ is_release = not DEV ,
68+ )
6169 )
6270
6371
64- if __name__ == ' __main__' :
72+ if __name__ == " __main__" :
6573 write_version_py ()
66- if ' DIPTEST_MANUAL_BUILD' in os .environ :
74+ if " DIPTEST_MANUAL_BUILD" in os .environ :
6775 from setuptools import setup
68- print ('Diptest: running pip install without extension' )
76+
77+ print ("Diptest: running pip install without extension" )
6978
7079 setup (
7180 name = NAME ,
@@ -75,5 +84,5 @@ def write_version_py(filename: str = 'diptest/version.py') -> None:
7584 f"-DDIPTEST_VERSION_INFO:STRING={ VERSION } " ,
7685 f"-Dpybind11_DIR:STRING={ pybind11 .get_cmake_dir ()} " ,
7786 "-DDIPTEST_ENABLE_ARCH_FLAGS:BOOL=ON" ,
78- ]
87+ ],
7988 )
0 commit comments