Skip to content

Commit

Permalink
Change entry_point to .main
Browse files Browse the repository at this point in the history
  • Loading branch information
hexatester committed Jan 17, 2021
1 parent 284ec7c commit 4cfcfa1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
14 changes: 1 addition & 13 deletions dapodik/__main__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#!/usr/bin/env python
import sys
from . import __version__, __dapodik_version__


def print_ver():
print("dapodik versi v{}".format(__version__))
print("Client / API python untuk dapodik versi {}".format(__dapodik_version__))
print("Python {}".format(sys.version.replace("\n", " ")))


def main():
print_ver()

from .main import main

if __name__ == "__main__":
main()
18 changes: 18 additions & 0 deletions dapodik/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
import sys
from . import __version__, __dapodik_version__, __semester__


def print_ver():
print("dapodik versi v{}".format(__version__))
print("Client / API python untuk dapodik versi {}".format(__dapodik_version__))
print("Semester {}".format(__semester__))
print("Python {}".format(sys.version.replace("\n", " ")))


def main():
sys.exit(print_ver())


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
],
packages=["dapodik"],
install_requires=["python", "requests", "beautifulsoup4", "attrs"],
entry_points={"console_scripts": ["dapodik=dapodik.__main__:main"]},
entry_points={"console_scripts": ["dapodik=dapodik.main:main"]},
)

0 comments on commit 4cfcfa1

Please sign in to comment.