From 8ac72bda5bd29fb5aa61bf88bcb18dd159ab5ace Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Wed, 18 Mar 2020 11:05:50 +0100 Subject: [PATCH] piped --- oshipka.py | 4 +-- setup.py | 30 ++++++++++++++++++++ {persistance => src}/__init__.py | 0 src/persistance/__init__.py | 0 {persistance => src/persistance}/models.py | 0 {persistance => src/persistance}/populate.py | 2 +- {webapp => src/webapp}/__init__.py | 0 7 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 setup.py rename {persistance => src}/__init__.py (100%) create mode 100644 src/persistance/__init__.py rename {persistance => src/persistance}/models.py (100%) rename {persistance => src/persistance}/populate.py (93%) rename {webapp => src/webapp}/__init__.py (100%) diff --git a/oshipka.py b/oshipka.py index 50adb87..2813b42 100644 --- a/oshipka.py +++ b/oshipka.py @@ -1,5 +1,5 @@ -from persistance.populate import init_db -from webapp import app +from src.persistance import init_db +from src.webapp import app if __name__ == "__main__": init_db(app) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..7decfae --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +from setuptools import setup + + +def gen_from_file(): + return [ + 'click==7.1.1', + 'Flask==1.1.1', + 'Flask-SQLAlchemy==2.4.1', + 'itsdangerous==1.1.0', + 'Jinja2==2.11.1', + 'MarkupSafe==1.1.1', + 'SQLAlchemy==1.3.15', + 'Werkzeug==1.0.0', + ] + # with open("requirements.txt") as f: + # return [line.strip() for line in f.readlines()] + + +setup(name='oshipka', + version='0.1', + description='oshipka', + url='http://gitlab.com/pisquared/oshipka', + author='Flying Circus', + install_requires=gen_from_file(), + author_email='', + license='MIT', + packages=['oshipka'], + package_dir={'oshipka': 'src/oshipka'}, + package_data={'oshipka': ['data/*.db']}, + zip_safe=False) diff --git a/persistance/__init__.py b/src/__init__.py similarity index 100% rename from persistance/__init__.py rename to src/__init__.py diff --git a/src/persistance/__init__.py b/src/persistance/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/persistance/models.py b/src/persistance/models.py similarity index 100% rename from persistance/models.py rename to src/persistance/models.py diff --git a/persistance/populate.py b/src/persistance/populate.py similarity index 93% rename from persistance/populate.py rename to src/persistance/populate.py index 93f2830..51f85c0 100644 --- a/persistance/populate.py +++ b/src/persistance/populate.py @@ -1,7 +1,7 @@ import os from config import SQLALCHEMY_DATABASE_URI, MAKEDIRS, DATABASE_FILE -from persistance.models import db +from src.persistance.models import db def populate_db(app): diff --git a/webapp/__init__.py b/src/webapp/__init__.py similarity index 100% rename from webapp/__init__.py rename to src/webapp/__init__.py