From 1fb13fefff677cd515f0160f8f46405764f5e634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 10 May 2018 15:57:36 +0200 Subject: [PATCH] Add setup.py to allow local pip installs of tfw --- Dockerfile | 2 +- lib/{envvars.py => envvars/__init__.py} | 0 setup.py | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) rename lib/{envvars.py => envvars/__init__.py} (100%) create mode 100644 setup.py diff --git a/Dockerfile b/Dockerfile index 2a3d9d4..95976be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ COPY nginx/default.conf ${TFW_NGINX_DEFAULT} COPY nginx/components/ ${TFW_NGINX_COMPONENTS} COPY lib LICENSE ${TFW_LIB_DIR} -RUN for dir in "${TFW_LIB_DIR}"/{tfw,tao,envvars.py} "/etc/nginx" "/etc/supervisor"; do \ +RUN for dir in "${TFW_LIB_DIR}"/{tfw,tao,envvars} "/etc/nginx" "/etc/supervisor"; do \ chown -R root:root "$dir" && chmod -R 700 "$dir"; \ done diff --git a/lib/envvars.py b/lib/envvars/__init__.py similarity index 100% rename from lib/envvars.py rename to lib/envvars/__init__.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9e95d29 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +from setuptools import setup, find_packages +from os.path import dirname, realpath, join + + +LIB_DIR = dirname(realpath(__file__)) + +version = None +with open(join(LIB_DIR, 'VERSION'), 'r') as ifile: + version = ifile.read().strip('\n') + +setup(name='tfw', + version=version, + description='Avatao tutorial-framework', + url='https://github.com/avatao-content/baseimage-tutorial-framework', + author='Avatao.com Innovative Learning Kft.', + author_email='support@avatao.com', + license='custom', + packages=find_packages('lib'), + package_dir={'': 'lib'}, + zip_safe=False)