Skip to content

Commit

Permalink
Add poetry script to publish in PyPI. #25
Browse files Browse the repository at this point in the history
  • Loading branch information
slomkowski committed Apr 26, 2021
1 parent b94f0ab commit 7ed2e7a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nginxfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

__author__ = "Michał Słomkowski"
__license__ = "Apache 2.0"
__version__ = "1.2.0-SNAPSHOT"
__version__ = "1.2.1"


class FormatterOptions:
Expand Down Expand Up @@ -360,5 +360,9 @@ def _standalone_run(program_arguments):
formatter.format_file(config_file_path, backup_file_path)


if __name__ == "__main__":
def main():
_standalone_run(sys.argv[1:])


if __name__ == "__main__":
main()
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[tool.poetry]
name = "nginxfmt"
version = "1.2.1"
description = "nginx config file formatter with no additional dependencies."
authors = ["Michał Słomkowski"]
license = "Apache 2.0"
readme = "README.md"
homepage = "https://github.com/slomkowski/nginx-config-formatter"
repository = "https://github.com/slomkowski/nginx-config-formatter"
keywords = ["nginx", "formatter"]
include = [
"LICENSE",
]


[tool.poetry.dependencies]
python = ">=3.4"

[tool.poetry.dev-dependencies]

[tool.poetry.scripts]
nginxfmt = "nginxfmt:main"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 7ed2e7a

Please sign in to comment.