Skip to content

Commit f76296b

Browse files
committed
Added setup.py for PIP package. #20
1 parent 227483c commit f76296b

File tree

6 files changed

+114
-2
lines changed

6 files changed

+114
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ __pycache__
66
*.pyc
77
.swo
88
.swp
9-
plugins
9+
plugins
10+
build
11+
dist
12+
gdbfrontend.egg-info

__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# gdb-frontend is a easy, flexible and extensionable gui debugger
4+
#
5+
# https://github.com/rohanrhu/gdb-frontend
6+
# https://oguzhaneroglu.com/projects/gdb-frontend/
7+
#
8+
# Licensed under GNU/GPLv3
9+
# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>

__main__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# gdb-frontend is a easy, flexible and extensionable gui debugger
4+
#
5+
# https://github.com/rohanrhu/gdb-frontend
6+
# https://oguzhaneroglu.com/projects/gdb-frontend/
7+
#
8+
# Licensed under GNU/GPLv3
9+
# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>
10+
11+
import importlib
12+
import os
13+
import sys
14+
15+
path = os.path.dirname(__file__)
16+
17+
os.chdir(path)
18+
sys.path.insert(0, path)
19+
20+
spec = importlib.util.spec_from_file_location("run", os.path.join(os.path.dirname(__file__), "run.py"))
21+
run = importlib.util.module_from_spec(spec)
22+
spec.loader.exec_module(run)

commands/gdbfrontend

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
PYCMD=python
4+
5+
if command -v python3 > /dev/null
6+
then
7+
PYCMD=python3
8+
fi
9+
10+
$PYCMD -m gdbfrontend $@

setup.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# gdb-frontend is a easy, flexible and extensionable gui debugger
4+
#
5+
# https://github.com/rohanrhu/gdb-frontend
6+
# https://oguzhaneroglu.com/projects/gdb-frontend/
7+
#
8+
# Licensed under GNU/GPLv3
9+
# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>
10+
11+
import os
12+
import glob
13+
import setuptools
14+
15+
exluded_files = ["build", "dist", "gdbfrontend.egg-info"]
16+
17+
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.md")) as f:
18+
long_description = f.read()
19+
20+
package_data = []
21+
for d in glob.glob("*"):
22+
if d.split(os.path.sep)[-1] in exluded_files:
23+
continue
24+
25+
if os.path.isdir(d):
26+
for d2 in glob.glob(d + "/**", recursive=True):
27+
package_data.append(d2)
28+
else:
29+
package_data.append(d)
30+
31+
32+
setuptools.setup(
33+
name = "gdbfrontend",
34+
version = "0.3.3",
35+
description = "GDBFrontend is a easy, flexible and extensionable gui debugger.",
36+
long_description = long_description,
37+
long_description_content_type='text/markdown',
38+
author = "Oğuzhan Eroğlu",
39+
author_email = "rohanrhu2@gmail.com",
40+
url = "https://github.com/rohanrhu/gdb-frontend",
41+
package_dir = {
42+
"gdbfrontend": "."
43+
},
44+
packages = [
45+
"gdbfrontend"
46+
],
47+
package_data = {
48+
"gdbfrontend": package_data
49+
},
50+
scripts = [
51+
"commands/gdbfrontend"
52+
],
53+
python_requires = '>=3.6',
54+
classifiers=[
55+
"Development Status :: 4 - Beta",
56+
"Programming Language :: Python :: 3",
57+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
58+
"Operating System :: POSIX",
59+
"Operating System :: POSIX :: Linux",
60+
"Operating System :: Unix",
61+
"Programming Language :: C",
62+
"Programming Language :: C++",
63+
"Topic :: Software Development",
64+
"Topic :: Software Development :: Debuggers",
65+
"Topic :: Software Development :: Disassemblers",
66+
"Topic :: Software Development :: Testing",
67+
],
68+
)

statics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Licensed under GNU/GPLv3
99
# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>
1010

11-
VERSION = [0, 4, 0, "git"]
11+
VERSION = [0, 3, 3, "beta"]
1212
VERSION_STRING = "v"+".".join([str(i) for i in VERSION[:-1]])+"-"+VERSION[-1]
1313

1414
"""

0 commit comments

Comments
 (0)