Skip to content
This repository was archived by the owner on Nov 11, 2018. It is now read-only.

Commit 5de49d3

Browse files
committed
Use relative imports, fixing installation with Python 3
1 parent a21e85a commit 5de49d3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ That being said, `maybe` **should :warning: NEVER :warning: be used to run untru
3434
pip install maybe
3535
```
3636

37-
either as a superuser or from a [virtualenv](https://virtualenv.pypa.io) environment.
37+
either as a superuser or from a [virtualenv](https://virtualenv.pypa.io) environment. To develop `maybe`, clone the repository and run
38+
39+
```
40+
pip install -e .
41+
```
42+
43+
in its main directory to install the package in editable mode.
3844

3945
### Operating system support
4046

maybe/maybe.py

100755100644
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
# maybe - see what a program does before deciding whether you really want it to happen
42
#
53
# Copyright (c) 2016 Philipp Emanuel Weidmann <[email protected]>
@@ -22,8 +20,8 @@
2220
from ptrace.syscall.posix_constants import SYSCALL_ARG_DICT
2321
from ptrace.syscall.syscall_argument import ARGUMENT_CALLBACK
2422

25-
from syscall_filters import SYSCALL_FILTERS
26-
from utilities import T, SYSCALL_REGISTER, RETURN_VALUE_REGISTER
23+
from .syscall_filters import SYSCALL_FILTERS
24+
from .utilities import T, SYSCALL_REGISTER, RETURN_VALUE_REGISTER
2725

2826

2927
# Python 2/3 compatibility hack
@@ -182,7 +180,3 @@ def main():
182180
else:
183181
print("%s has not detected any file system operations from %s." %
184182
(T.bold("maybe"), T.bold(command)))
185-
186-
187-
if __name__ == "__main__":
188-
main()

maybe/syscall_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from os import O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_TRUNC
1515
from os.path import abspath, dirname, basename, exists
1616

17-
from utilities import T, format_permissions
17+
from .utilities import T, format_permissions
1818

1919

2020
def return_zero(args):

0 commit comments

Comments
 (0)