Skip to content

Commit 7ed2e7a

Browse files
committed
Add poetry script to publish in PyPI. #25
1 parent b94f0ab commit 7ed2e7a

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

nginxfmt.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
__author__ = "Michał Słomkowski"
2020
__license__ = "Apache 2.0"
21-
__version__ = "1.2.0-SNAPSHOT"
21+
__version__ = "1.2.1"
2222

2323

2424
class FormatterOptions:
@@ -360,5 +360,9 @@ def _standalone_run(program_arguments):
360360
formatter.format_file(config_file_path, backup_file_path)
361361

362362

363-
if __name__ == "__main__":
363+
def main():
364364
_standalone_run(sys.argv[1:])
365+
366+
367+
if __name__ == "__main__":
368+
main()

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.poetry]
2+
name = "nginxfmt"
3+
version = "1.2.1"
4+
description = "nginx config file formatter with no additional dependencies."
5+
authors = ["Michał Słomkowski"]
6+
license = "Apache 2.0"
7+
readme = "README.md"
8+
homepage = "https://github.com/slomkowski/nginx-config-formatter"
9+
repository = "https://github.com/slomkowski/nginx-config-formatter"
10+
keywords = ["nginx", "formatter"]
11+
include = [
12+
"LICENSE",
13+
]
14+
15+
16+
[tool.poetry.dependencies]
17+
python = ">=3.4"
18+
19+
[tool.poetry.dev-dependencies]
20+
21+
[tool.poetry.scripts]
22+
nginxfmt = "nginxfmt:main"
23+
24+
[build-system]
25+
requires = ["poetry-core>=1.0.0"]
26+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)