Skip to content

Commit c9730ff

Browse files
committed
add pyproject.toml
1 parent 17f25da commit c9730ff

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

hls4ml/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import absolute_import
22

3-
__version__ = '0.6.0'
4-
53
from hls4ml import converters
64
from hls4ml import report
75
from hls4ml import utils

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[build-system]
2+
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD!
3+
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"]
4+
build-backend = "setuptools.build_meta"
5+
6+
[tool.setuptools_scm]
7+
# See configuration details in https://github.com/pypa/setuptools_scm
8+
version_scheme = "no-guess-dev"

setup.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,8 @@ def read(rel_path):
99
with codecs.open(os.path.join(this_directory, rel_path), 'r') as fp:
1010
return fp.read()
1111

12-
def get_version(rel_path):
13-
for line in read(rel_path).splitlines():
14-
if line.startswith('__version__'):
15-
delim = '"' if '"' in line else "'"
16-
return line.split(delim)[1]
17-
else:
18-
raise RuntimeError("Unable to find version string.")
19-
2012
setup(name='hls4ml',
21-
version=get_version("hls4ml/__init__.py"),
13+
use_scm_version={"version_scheme": "no-guess-dev"},
2214
description='Machine learning in FPGAs using HLS',
2315
long_description=read('README.md'),
2416
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)