Skip to content

Add setup.py and requirements.py for command line tool #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@ Environment

Run
-------
$ python main.py

```
python main.py
```

Or install the command-line tool.

```
python ./setup.py install

BBox-Label-Tool
```

Usage
-----
Expand Down
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,11 @@ def gotoImage(self):
## self.mainPanel.config(height = self.tkimg.height())
## self.mainPanel.create_image(0, 0, image = self.tkimg, anchor=NW)

if __name__ == '__main__':
def main():
root = Tk()
tool = LabelTool(root)
root.resizable(width = True, height = True)
root.mainloop()

if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pillow
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
try:
from setuptools import setup
setup()
except ImportError:
from distutils.core import setup

setup(
name="BBox-Label-Tool",
version="1.0.0",
author="puzzledqs",
url="https://github.com/puzzledqs/BBox-Label-Tool",
description="A simple tool for labeling object bounding boxes in images",
packages=["."],
zip_safe=False,
entry_points={
"console_scripts": [
"BBox-Label-Tool=main:main",
],
})