Commit 9e4fe65c authored by Ehsan Azarnasab's avatar Ehsan Azarnasab

add __version__ and import extension to the package

parent 26b9de70
......@@ -167,7 +167,6 @@ def run_process(cmds, timeout=None):
t.start()
_time = time.time()
elapsed = 0
e = None
try:
while t.isAlive():
......@@ -271,8 +270,11 @@ class build(_build):
dist_dir = os.path.join(script_dir, "./dist/dlib")
# create the module init files
with open(os.path.join(dist_dir, '__init__.py'), 'w'):
pass
with open(os.path.join(dist_dir, '__init__.py'), 'w') as f:
# just so that we can `import dlib` and not `from dlib import dlib`
f.write('from .dlib import *\n')
# add version here
f.write('__version__ = {ver}\n'.format(ver=read_version()))
with open(os.path.join(dist_dir_examples, '__init__.py'), 'w'):
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment