Skip to content

Commit

Permalink
Use relative imports, fixing installation with Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
p-e-w committed Jan 31, 2016
1 parent a21e85a commit 5de49d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ That being said, `maybe` **should :warning: NEVER :warning: be used to run untru
pip install maybe
```

either as a superuser or from a [virtualenv](https://virtualenv.pypa.io) environment.
either as a superuser or from a [virtualenv](https://virtualenv.pypa.io) environment. To develop `maybe`, clone the repository and run

```
pip install -e .
```

in its main directory to install the package in editable mode.

### Operating system support

Expand Down
10 changes: 2 additions & 8 deletions maybe/maybe.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# maybe - see what a program does before deciding whether you really want it to happen
#
# Copyright (c) 2016 Philipp Emanuel Weidmann <[email protected]>
Expand All @@ -22,8 +20,8 @@
from ptrace.syscall.posix_constants import SYSCALL_ARG_DICT
from ptrace.syscall.syscall_argument import ARGUMENT_CALLBACK

from syscall_filters import SYSCALL_FILTERS
from utilities import T, SYSCALL_REGISTER, RETURN_VALUE_REGISTER
from .syscall_filters import SYSCALL_FILTERS
from .utilities import T, SYSCALL_REGISTER, RETURN_VALUE_REGISTER


# Python 2/3 compatibility hack
Expand Down Expand Up @@ -182,7 +180,3 @@ def main():
else:
print("%s has not detected any file system operations from %s." %
(T.bold("maybe"), T.bold(command)))


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion maybe/syscall_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from os import O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_TRUNC
from os.path import abspath, dirname, basename, exists

from utilities import T, format_permissions
from .utilities import T, format_permissions


def return_zero(args):
Expand Down

0 comments on commit 5de49d3

Please sign in to comment.