
21 changed files with 72 additions and 25 deletions
@ -0,0 +1,19 @@ |
|||
PREFIX = /home/heck/local-default/ |
|||
DEBUG = 0 |
|||
BUILD_DIR = ./build |
|||
|
|||
BUILD_EXT_OPTS = --prefix=$(PREFIX) |
|||
|
|||
ifeq ($(DEBUG),1) |
|||
BUILD_EXT_OPTS+=--debug |
|||
endif |
|||
|
|||
.PHONY: all build clean |
|||
|
|||
all: build_ext |
|||
|
|||
build_ext: |
|||
python3 setup.py build_ext $(BUILD_EXT_OPTS) |
|||
|
|||
clean: |
|||
rm -r $(BUILD_DIR) |
@ -0,0 +1,30 @@ |
|||
# pEp package |
|||
# This file is being exectued upon 'import pEp' |
|||
# |
|||
# __all__ could be used to limit the symbols exported when using from <pkg> import * |
|||
|
|||
|
|||
# Import all symbols EXCEPT the ones beginning with underscore into the current namespace |
|||
from native_pEp import * |
|||
|
|||
# import the module |
|||
import native_pEp |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
# Executed on module import |
|||
def init(): |
|||
print("init() called") |
|||
# native_pEp._init() |
|||
|
|||
# Executed when run as script |
|||
def main(): |
|||
print("I am being run as a script") |
|||
|
|||
# MAIN |
|||
if __name__ == "__main__": |
|||
main() |
|||
else: |
|||
init() |
@ -0,0 +1,6 @@ |
|||
#!/usr/bin/env python3 |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
import pEp |
|||
|
|||
pEp.is_sync_active() |
Loading…
Reference in new issue