Skip to content

Commit

Permalink
Just put setup_requires in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Nov 16, 2020
1 parent fd306db commit a8ff2ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[options]
setup_requires = setuptools_scm

[flake8]
ignore = E203, E266, E501, W503, F401, E741
max-line-length = 88
Expand Down
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,22 @@
]
PLATFORMS = "Any"
INSTALL_REQUIRES = ["numpy", "pandas", "xarray", "netCDF4", "packaging"]
# Configuration for setuptools-scm
SETUP_REQUIRES = ["setuptools_scm"]
USE_SCM_VERSION = {
"relative_to": __file__,
"local_scheme": "node-and-date",
"write_to": "_version.py",
"write_to_template": '__version__ = "{version}"\n',
}

if __name__ == "__main__":
setup(
name=NAME,
fullname=FULLNAME,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
use_scm_version={
"write_to": "_version.py",
"write_to_template": 'version = "{version}"\n',
},
use_scm_version=USE_SCM_VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
maintainer=MAINTAINER,
Expand All @@ -60,4 +65,5 @@
classifiers=CLASSIFIERS,
keywords=KEYWORDS,
install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES,
)

0 comments on commit a8ff2ff

Please sign in to comment.