Skip to content

Commit

Permalink
Moved some stuff from setup.py into pyproject.toml
Browse files Browse the repository at this point in the history
Improved stuff in setup.py a bit
  • Loading branch information
KOLANICH committed Jun 17, 2020
1 parent e80ea0f commit d23a0fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = ["setuptools>=41", "wheel", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to_template = "__version__ = \"{version}\"\n"
write_to = "parglare/version.py"
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@
if os.system("pip list | grep twine"):
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
os.system("python -m pep517 -bs .")
if sys.argv[-1] == 'publishtest':
os.system("twine upload -r test dist/*")
else:
os.system("twine upload dist/*")
sys.exit()

if __name__ == "__main__":
setup(use_scm_version={
"write_to": str(this_dir / "parglare" / "version.py"),
"write_to_template": '__version__ = "{version}"\n',
})
setup()

0 comments on commit d23a0fd

Please sign in to comment.