Skip to content

Commit

Permalink
write scm version to the package (#1654)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Aug 9, 2022
1 parent d58758e commit 36aa2cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "oldest-supported-numpy"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "reacnetgenerator/_version.py"
fallback_version = "Unknown"
2 changes: 1 addition & 1 deletion reacnetgenerator/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
try:
__version__ = get_distribution('reacnetgenerator').version
except DistributionNotFound:
__version__ = ''
__version__ = 'Unknown'
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def readme():
'reacnetgeneratorgui=reacnetgenerator.gui:gui'
]
},
test_suite='reacnetgenerator.test',
tests_require=tests_require,
extras_require={
"test": tests_require,
Expand All @@ -131,7 +130,7 @@ def readme():
'sphinx-favicon',
],
},
use_scm_version=os.path.exists(os.path.join(this_directory, ".git")),
use_scm_version=True,
setup_requires=[
'setuptools>=18.0',
'setuptools_scm',
Expand Down Expand Up @@ -165,5 +164,4 @@ def readme():
"build_py": BuildPyCommand,
"build_ext": BuildExtCommand,
},
version="1.0.0",
)

0 comments on commit 36aa2cb

Please sign in to comment.